diff --git a/internal/template/functions.go b/internal/template/functions.go
index e1926e95..d5a65eca 100644
--- a/internal/template/functions.go
+++ b/internal/template/functions.go
@@ -32,6 +32,7 @@ type funcMap struct {
// Map returns a map of template functions that are compiled during template parsing.
func (f *funcMap) Map() template.FuncMap {
return template.FuncMap{
+ "contains": strings.Contains,
"startsWith": strings.HasPrefix,
"formatFileSize": formatFileSize,
"dict": dict,
diff --git a/internal/template/templates/views/about.html b/internal/template/templates/views/about.html
index 873dbd3a..627740a5 100644
--- a/internal/template/templates/views/about.html
+++ b/internal/template/templates/views/about.html
@@ -13,10 +13,10 @@
-
{{ t "page.about.version" }}
- {{ if startsWith .version "2." }}
- {{ .version }}
- {{ else }}
+ {{ if contains .version "dev" }}
{{ .version }}
+ {{ else }}
+ {{ .version }}
{{ end }}
{{ if .commit }}
diff --git a/internal/version/version.go b/internal/version/version.go
index 4af4eea5..0f07759c 100644
--- a/internal/version/version.go
+++ b/internal/version/version.go
@@ -43,7 +43,9 @@ func getBuildDate() string {
// Falls back to values from the Go module's build info when available.
func init() {
if Version == "" {
- Version = "Development Version"
+ // Some Miniflux clients expect a specific version format.
+ // For example, Flux News converts the string version to an integer.
+ Version = "2.2.x-dev"
}
if Commit == "" {
Commit = getCommit()