From a654a5f7107d6eacd6c18eca160e52a80da30bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Sat, 16 Aug 2025 13:04:04 -0700 Subject: [PATCH] feat(template): show GitHub links in about page only when tag and commit are available --- Makefile | 2 +- internal/template/functions.go | 1 + internal/template/templates/views/about.html | 18 ++++++++++++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4b449300..c17ee550 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ APP := miniflux DOCKER_IMAGE := miniflux/miniflux -VERSION := $(shell git describe --tags --abbrev=0 2>/dev/null) +VERSION := $(shell git describe --tags --exact-match 2>/dev/null) LD_FLAGS := "-s -w -X 'miniflux.app/v2/internal/version.Version=$(VERSION)'" PKG_LIST := $(shell go list ./... | grep -v /vendor/) DB_URL := postgres://postgres:postgres@localhost/miniflux_test?sslmode=disable diff --git a/internal/template/functions.go b/internal/template/functions.go index 52d1daaf..e1926e95 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{ + "startsWith": strings.HasPrefix, "formatFileSize": formatFileSize, "dict": dict, "truncate": truncate, diff --git a/internal/template/templates/views/about.html b/internal/template/templates/views/about.html index 5e85aadd..a3d49841 100644 --- a/internal/template/templates/views/about.html +++ b/internal/template/templates/views/about.html @@ -11,9 +11,23 @@

Miniflux