From 583c01de122be399dcbf200ccc3f8bb8687c2cd1 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Fri, 26 Sep 2025 17:40:43 +0200 Subject: Added the changes that allow for blogging --- layouts/_default/baseof.html | 11 ++++------- layouts/_default/taxonomy.html | 7 +++++++ layouts/partials/header.html | 8 ++++++++ layouts/posts/page.html | 7 +++++++ layouts/posts/section.html | 12 ++++++++++++ 5 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 layouts/_default/taxonomy.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/posts/page.html create mode 100644 layouts/posts/section.html (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 93eb168..19128ec 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,17 +3,14 @@ + {{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} - + - + {{partial "header.html"}}
{{ block "main" . }}{{ end }}
- + \ No newline at end of file diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html new file mode 100644 index 0000000..c2e7875 --- /dev/null +++ b/layouts/_default/taxonomy.html @@ -0,0 +1,7 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ end }} +{{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..181c75e --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/layouts/posts/page.html b/layouts/posts/page.html new file mode 100644 index 0000000..dd21496 --- /dev/null +++ b/layouts/posts/page.html @@ -0,0 +1,7 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format "2006-01-02" }} + + {{ .Content }} +{{ end }} diff --git a/layouts/posts/section.html b/layouts/posts/section.html new file mode 100644 index 0000000..eedc63e --- /dev/null +++ b/layouts/posts/section.html @@ -0,0 +1,12 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + +{{ end }} -- cgit v1.3.1