From e1598038023797808c53b84649a1d5ef36b1f800 Mon Sep 17 00:00:00 2001 From: Sangeeth Sudheer Date: Tue, 29 Apr 2025 01:03:26 +0530 Subject: Move primary content inside an
tag Main article will now belong in an
tag and the title/header info will be inside a
tag within the
. Shouldn't introduce any style/functional changes besides improve the semantics. Comments section is moved outside the
as it doesn't directly relate to the article's contents. Other changes: - Used `{{-` to remove some of the whitespace while keeping source HTML structure looking correct --- layouts/_default/single.html | 127 +++++++++++++++++++++---------------------- 1 file changed, 63 insertions(+), 64 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6869a46..209524e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,70 +7,69 @@ {{ end }}
- -
- - {{/* Title and Summary */}} - -

{{ .Title }}

- {{ with .Param "summary" }} -

{{ . | markdownify }}

- {{ end }} - - {{/* Reading Time */}} - -

- {{ with .Date }} - {{ $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }} - {{ $dateHuman := . | time.Format (default ":date_long" $.Site.Params.singleDateFormat) }} - - {{end}} - - {{ if .Param "readTime" }} -   ·   - {{ .ReadingTime }} min read - {{end }} -

- -
- - {{ if .Param "showTags" }} - - {{ $taxonomy := "tags" }} - {{ with .Param $taxonomy }} - -
- {{ range $index, $tag := . }} - {{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}} - - #{{ .LinkTitle }} - - {{ end }} - {{ end }} -
- - {{ end }} - {{ end }} - - {{/* Table of Content */}} - - {{ if .Param "toc" }} - - {{ end }} - - {{/* Page content */}} - -
- {{ .Content }} - {{ if .Site.Params.giscus.enable }} - {{ if not .Params.disableComment }} - {{ partial "comments.html" . }} - {{ end }} - {{ end }} -
+
+
+ {{- /* Title and Summary */}} + +

{{ .Title }}

+ {{- with .Param "summary" }} +

{{ . | markdownify }}

+ {{- end }} + + {{- /* Reading Time */}} + +

+ {{- with .Date }} + {{- $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }} + {{- $dateHuman := . | time.Format (default ":date_long" $.Site.Params.singleDateFormat) }} + + {{- end }} + + {{- if .Param "readTime" }} +   ·   + {{- .ReadingTime }} min read + {{- end }} +

+
+ + {{- if .Param "showTags" }} + {{- $taxonomy := "tags" }} + {{- with .Param $taxonomy }} +
+ {{- range $index, $tag := . }} + {{- with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}} + + #{{ .LinkTitle }} + + {{- end }} + {{- end }} +
+ {{- end }} + {{- end }} + + {{- /* Table of Contents */}} + + {{- if .Param "toc" }} + + {{- end }} + + {{- /* Page content */}} + +
+ {{ .Content }} +
+
+ + {{- /* Comments */}} + + {{- if and .Site.Params.giscus.enable (not .Params.disableComment) }} +
+ {{ partial "comments.html" . }} +
+ {{- end }} {{ if .Store.Get "hasMermaid" }} {{ $mermaidDarkTheme := default "dark" (or .Params.mermaidDarkTheme .Site.Params.mermaidDarkTheme) }} -- cgit v1.2.3