From 05e84c46d5d5c939929862d8185c0699c55e2e13 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 19 Mar 2023 22:27:56 -0700 Subject: [PATCH] Add cloud.html --- README.md | 10 ++++++++++ exampleSite/content/categories/_index.md | 1 + exampleSite/content/tags/_index.md | 1 + layouts/_default/paige/cloud.html | 17 +++++++++++++++++ layouts/_default/taxonomy.html | 17 +---------------- 5 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 layouts/_default/paige/cloud.html diff --git a/README.md b/README.md index 4c211954..75ed4e87 100644 --- a/README.md +++ b/README.md @@ -315,6 +315,16 @@ paige: ## Layouts +### Cloud + +The `paige/cloud` layout provides a link cloud for sub-pages. + +Example `content/tags/_index.md`: + +```yaml +layout: "paige/cloud" +``` + ### Home The `paige/home` layout provides a home page. diff --git a/exampleSite/content/categories/_index.md b/exampleSite/content/categories/_index.md index a49707d5..74ec7f26 100644 --- a/exampleSite/content/categories/_index.md +++ b/exampleSite/content/categories/_index.md @@ -1,4 +1,5 @@ --- description: "Browse by category." +layout: "paige/cloud" title: "Categories" --- diff --git a/exampleSite/content/tags/_index.md b/exampleSite/content/tags/_index.md index ba6187e6..92bf119f 100644 --- a/exampleSite/content/tags/_index.md +++ b/exampleSite/content/tags/_index.md @@ -1,4 +1,5 @@ --- description: "Browse by tag." +layout: "paige/cloud" title: "Tags" --- diff --git a/layouts/_default/paige/cloud.html b/layouts/_default/paige/cloud.html new file mode 100644 index 00000000..f7ee027c --- /dev/null +++ b/layouts/_default/paige/cloud.html @@ -0,0 +1,17 @@ +{{ define "main" }} +{{ $page := . }} + +{{ partial "paige/article.html" $page }} + +{{ with $page.Pages }} +
+ +
+{{ end }} +{{ end }} diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 80bdfd9f..40c30434 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -2,20 +2,5 @@ {{ $page := . }} {{ partial "paige/article.html" $page }} - -{{ if or (eq $page.RelPermalink "/categories/") (eq $page.RelPermalink "/tags/") }} - {{ if $page.Pages }} -
- -
- {{ end }} -{{ else }} - {{ partial "paige/pages.html" $page }} -{{ end }} +{{ partial "paige/pages.html" $page }} {{ end }}