From: Sergey Matveev Date: Wed, 4 Feb 2026 13:00:32 +0000 (+0300) Subject: Less duplicate links and entities X-Git-Tag: v0.38.0~2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=32603f2b762065dad3372a108eecff3c0b4a5561;p=sgblog.git Less duplicate links and entities --- diff --git a/cmd/sgblog/http-entry.tmpl b/cmd/sgblog/http-entry.tmpl index 3693057..83bfc24 100644 --- a/cmd/sgblog/http-entry.tmpl +++ b/cmd/sgblog/http-entry.tmpl @@ -1,30 +1,25 @@ - - - {{.Title}} ({{.When}}) - {{with .Cfg.CSS}}{{end}} - {{with .Cfg.Webmaster}}{{end -}} + + + + + {{.Title}} + {{with .Cfg.CSS}}{{end}} + {{with .Cfg.Webmaster}}{{end -}} {{- range .Cfg.GitURLs}} - {{end}} - - - {{if .Parent}}{{end}} + {{end}} + + {{with .Cfg.AboutURL}}{{end}} + + {{if .Parent}}{{end}} -{{with .Cfg.AboutURL}}[{{$.T.Get "about"}}]{{end}} -[{{$.T.Get "top"}}] -{{if .Parent}}[{{$.T.Get "prev"}}]{{end}} -[{{.When}}] -[{{.Commit.Hash.String}}] - {{if .Topics}} -
{{$.T.Get "Topics"}}: {{range .Topics}}[{{.}}]{{end}} {{end}} -

{{.Title}}

 {{range .Lines}}{{. | lineURLize $.Cfg.URLPrefix}}
diff --git a/cmd/sgblog/http-index.tmpl b/cmd/sgblog/http-index.tmpl
index 4bff19b..aca42fd 100644
--- a/cmd/sgblog/http-index.tmpl
+++ b/cmd/sgblog/http-index.tmpl
@@ -1,24 +1,20 @@
 
 
 
-    
-    
-    {{.Cfg.Title}} {{if .Topic}}(topic: {{.Topic}}) {{end}}({{.Offset}}-{{.OffsetNext}})
-    {{with .Cfg.CSS}}{{end}}
-    {{with .Cfg.Webmaster}}{{end}}
-    {{range .Cfg.GitURLs}}{{end}}
-    
-    
-    {{if .CommentsEnabled}}{{end}}
-    {{if .Offset}}{{end}}
-    {{if not .LogEnded}}{{end}}
+	
+	
+	{{.Cfg.Title}} {{if .Topic}}(topic: {{.Topic}}) {{end}}({{.Offset}}-{{.OffsetNext}})
+	{{with .Cfg.CSS}}{{end}}
+	{{with .Cfg.Webmaster}}{{end}}
+	{{range .Cfg.GitURLs}}{{end}}
+	
+	{{if .CommentsEnabled}}{{end}}
+	{{with .Cfg.AboutURL}}{{end}}
+	
+	{{if .Offset}}{{end}}
+	{{if not .LogEnded}}{{end}}
 
 
-{{with .Cfg.AboutURL}}[{{$.T.Get "about"}}]{{end}}
-{{block "links" .}}
-{{if .Offset}}[{{$.T.Get "prev"}}]{{end}}
-{{if not .LogEnded}}[{{$.T.Get "next"}}]{{end}}
-{{end}}
 {{if .Topics}}
{{$.T.Get "Topics"}}: [{{$.T.Get "ALL"}}] {{range .Topics}}[{{.}}] @@ -28,30 +24,29 @@ {{- $datePrev := "0001-01-01" -}} - - - - - - {{if .TopicsEnabled}}{{end}} + + + + + + {{if .TopicsEnabled}}{{end}} {{range .Entries -}} {{- $dateCur := .Commit.Author.When.Format "2006-01-02" -}} {{- if ne $dateCur $datePrev -}} - - {{- $datePrev = $dateCur -}} + + {{- $datePrev = $dateCur -}} {{- end -}} - - - - - - - - {{if $TopicsEnabled}}{{end}} + + + + + + + + {{if $TopicsEnabled}}{{end}} {{end}}
N{{$.T.Get "When"}}{{$.T.Get "Title"}}LIC{{$.T.Get "Linked to"}}{{$.T.Get "Topics"}}N{{$.T.Get "When"}}{{$.T.Get "Title"}}LIC{{$.T.Get "Linked to"}}{{$.T.Get "Topics"}}
{{$dateCur}}
{{$dateCur}}
{{.Num}}{{.Commit.Author.When.Format "15:04"}}{{.Title}}{{.LinesNum}}{{if .ImagesNum}}{{.ImagesNum}}{{else}} {{end}}{{if .CommentsNum}}{{.CommentsNum}}{{else}} {{end}}{{if .DomainURLs}}{{range .DomainURLs}} {{.}} {{end}}{{else}} {{end}}{{if .Topics}}{{range .Topics}} {{.}} {{end}}{{else}} {{end}}{{.Num}}{{.Commit.Author.When.Format "15:04"}}{{.Title}}{{.LinesNum}}{{if .ImagesNum}}{{.ImagesNum}}{{else}} {{end}}{{if .CommentsNum}}{{.CommentsNum}}{{else}} {{end}}{{if .DomainURLs}}{{range .DomainURLs}} {{.}} {{end}}{{else}} {{end}}{{if .Topics}}{{range .Topics}} {{.}} {{end}}{{else}} {{end}}
-{{template "links" .}} diff --git a/internal/version.go b/internal/version.go index 416ad4b..25aab34 100644 --- a/internal/version.go +++ b/internal/version.go @@ -1,3 +1,3 @@ package internal -const Version = "0.37.0" +const Version = "0.38.0"