From dea636c3ae2e4b406b12e7b4e05af6e68b1a5e35 Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 16 Aug 2021 16:12:14 -0700 Subject: [PATCH] + Adding proper index page building + Favicon to head section of pages * Fixed date formatting in multiple places + Skeleton for posts which I don't think is being used but I could be wrong --- themes/shockrah.xyz/layouts/index.html | 17 +++++++++++++---- themes/shockrah.xyz/layouts/partials/head.html | 3 ++- .../shockrah.xyz/layouts/partials/metadata.html | 8 ++++---- themes/shockrah.xyz/layouts/partials/posts.html | 13 +++++++++++++ 4 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 themes/shockrah.xyz/layouts/partials/posts.html diff --git a/themes/shockrah.xyz/layouts/index.html b/themes/shockrah.xyz/layouts/index.html index 90b835d..66a1b73 100644 --- a/themes/shockrah.xyz/layouts/index.html +++ b/themes/shockrah.xyz/layouts/index.html @@ -3,10 +3,19 @@ {{- partial "head.html" . -}} {{- partial "header.html" . -}} -
-
- - +
+
+
+ + {{ $articles := where .Site.Pages "Params.Category" "article" }} + {{ range $articles }} +

{{ .Title }}

+

{{.Date.Format "January 2, 2006"}}

+ {{ if isset .Params "description" }} +

{{ .Description }}

+ {{ end }} + {{ end }} +
diff --git a/themes/shockrah.xyz/layouts/partials/head.html b/themes/shockrah.xyz/layouts/partials/head.html index 811cdd5..51e37c4 100644 --- a/themes/shockrah.xyz/layouts/partials/head.html +++ b/themes/shockrah.xyz/layouts/partials/head.html @@ -3,7 +3,8 @@ - {{ $title := print .Site.Title " | " .Title }} + + {{ $title := print .Title }} {{ if .IsHome }}{{ $title = .Site.Title}}{{end}} {{ $title }} diff --git a/themes/shockrah.xyz/layouts/partials/metadata.html b/themes/shockrah.xyz/layouts/partials/metadata.html index 141e247..e60623c 100644 --- a/themes/shockrah.xyz/layouts/partials/metadata.html +++ b/themes/shockrah.xyz/layouts/partials/metadata.html @@ -2,9 +2,9 @@ {{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }} {{ with .Params.tags }} -{{ range . }} -{{ $href := print (absURL "tags/") (urlize .) }} -{{ . }} -{{ end }} + {{ range . }} + {{ $href := print (absURL "tags/") (urlize .) }} + {{ . }} + {{ end }} {{ end }} diff --git a/themes/shockrah.xyz/layouts/partials/posts.html b/themes/shockrah.xyz/layouts/partials/posts.html new file mode 100644 index 0000000..61cd393 --- /dev/null +++ b/themes/shockrah.xyz/layouts/partials/posts.html @@ -0,0 +1,13 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ range .Pages.ByPublishDate.Reverse }} +

+

{{ .Title }}

+ {{ partial "metadata.html" }} + +

{{ .Summary }}

+
+

+ {{ end }} +{{ end }} +