From d61bee5e0916b5d2b388e66ef85c336312a21a06 Mon Sep 17 00:00:00 2001 From: Jonathan Ling Date: Sun, 19 Jan 2020 08:42:27 -0500 Subject: [PATCH] examples: Fix blog not building The example blog had not been updated for some time and I had to restructure it a little bit. Fixes #6752 Changed tag and category directory structure --- examples/blog/layouts/categories/list.html | 25 +++++++++++++++++++ examples/blog/layouts/indexes/category.html | 24 ------------------ examples/blog/layouts/partials/header.html | 5 ++-- .../{indexes/post.html => post/list.html} | 0 .../{indexes/tag.html => tags/list.html} | 0 5 files changed, 28 insertions(+), 26 deletions(-) create mode 100644 examples/blog/layouts/categories/list.html delete mode 100644 examples/blog/layouts/indexes/category.html rename examples/blog/layouts/{indexes/post.html => post/list.html} (100%) rename examples/blog/layouts/{indexes/tag.html => tags/list.html} (100%) diff --git a/examples/blog/layouts/categories/list.html b/examples/blog/layouts/categories/list.html new file mode 100644 index 00000000000..0390d77c2fd --- /dev/null +++ b/examples/blog/layouts/categories/list.html @@ -0,0 +1,25 @@ +{{ partial "header.html" . }} + + + {{ partial "navbar.html" . }} +
+
+
+
+ Items in category {{ .Title | lower }} +
    + {{ range .Data.Pages }} + {{ .Render "li" }} + {{ end}} +
+
+
+ + +
+ {{ partial "menu.html" . }} +
+
+ {{ partial "footer.copyright.html" . }} +
+ {{ partial "footer.html" . }} \ No newline at end of file diff --git a/examples/blog/layouts/indexes/category.html b/examples/blog/layouts/indexes/category.html deleted file mode 100644 index 653d819649d..00000000000 --- a/examples/blog/layouts/indexes/category.html +++ /dev/null @@ -1,24 +0,0 @@ -{{ partial "header.html" . }} - -{{ partial "navbar.html" . }} -
-
-
-
- Items in category {{ .Title | lower }} -
    - {{ range .Data.Pages }} - {{ .Render "li" }} - {{ end}} -
-
-
- - -
- {{ partial "menu.html" . }} -
-
-{{ partial "footer.copyright.html" . }} -
-{{ partial "footer.html" . }} diff --git a/examples/blog/layouts/partials/header.html b/examples/blog/layouts/partials/header.html index 5863e59ec88..94de4c123bd 100644 --- a/examples/blog/layouts/partials/header.html +++ b/examples/blog/layouts/partials/header.html @@ -1,5 +1,6 @@ + {{ partial "meta.html" . }} @@ -7,6 +8,6 @@ {{ partial "header.includes.html" . }} {{ with .OutputFormats.Get "RSS" -}} - {{ printf "" .Permalink .MediaType .Title | safeHTML }} + {{ printf "" .Permalink .MediaType $.Site.Title | safeHTML }} {{- end }} - + \ No newline at end of file diff --git a/examples/blog/layouts/indexes/post.html b/examples/blog/layouts/post/list.html similarity index 100% rename from examples/blog/layouts/indexes/post.html rename to examples/blog/layouts/post/list.html diff --git a/examples/blog/layouts/indexes/tag.html b/examples/blog/layouts/tags/list.html similarity index 100% rename from examples/blog/layouts/indexes/tag.html rename to examples/blog/layouts/tags/list.html