From f1ad48028e17ef7cd8c9d7fc481153f390d6b3e2 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman Date: Mon, 16 Oct 2023 13:26:55 -0400 Subject: [PATCH] Made adding sections much easier --- CHANGELOG.md | 2 ++ README.md | 6 ------ layouts/entry/single.html | 3 --- layouts/news/list.html | 3 --- layouts/news/single.html | 3 --- layouts/partials/top_list_generic.html | 2 +- layouts/partials/top_list_news.html | 12 ------------ layouts/partials/top_list_projects.html | 12 ------------ layouts/partials/top_list_resource.html | 12 ------------ layouts/partials/top_list_taxonomy.html | 2 +- layouts/projects/list.html | 3 --- layouts/projects/single.html | 3 --- layouts/resource/list.html | 3 --- layouts/resource/single.html | 3 --- 14 files changed, 4 insertions(+), 65 deletions(-) delete mode 100644 layouts/entry/single.html delete mode 100644 layouts/news/list.html delete mode 100644 layouts/news/single.html delete mode 100644 layouts/partials/top_list_news.html delete mode 100644 layouts/partials/top_list_projects.html delete mode 100644 layouts/partials/top_list_resource.html delete mode 100644 layouts/projects/list.html delete mode 100644 layouts/projects/single.html delete mode 100644 layouts/resource/list.html delete mode 100644 layouts/resource/single.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 7005cf9e..2532a079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ * Minor improvement to CSS so `page` types dont get clipped by the menu header. * Added a container shortcode for use on `page` types to get left and right margins. +* Adding new sections is now almost completely dynamic and requires much less + modification of code. See updated `README.me`. ## 1.1.0 diff --git a/README.md b/README.md index 5486a741..dc150cb8 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,8 @@ just yet. ### Renaming -1. Change the name of the `/layouts/partials/top_list_
.html` to the -new name and edit its content. 1. Modify `./clean-build.cjs` at the bottom of the file to include the name of the new section. -1. Rename directory `./layouts/
` to the name of the new section, or - create a new directory using an existing directory as a template. -1. Edit `./layouts/
/list.html` to point to the new section partial -(first line). 1. Change or create a new directory for section content under `/content/` diff --git a/layouts/entry/single.html b/layouts/entry/single.html deleted file mode 100644 index 70976352..00000000 --- a/layouts/entry/single.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ partial "top_single.html" . }} -{{ partial "body_single.html" . }} -{{ partial "bottom_single.html" . }} diff --git a/layouts/news/list.html b/layouts/news/list.html deleted file mode 100644 index 215103d3..00000000 --- a/layouts/news/list.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ partial "top_list_news.html" . }} -{{ partial "body_list.html" . }} -{{ partial "bottom_list.html" . }} diff --git a/layouts/news/single.html b/layouts/news/single.html deleted file mode 100644 index 70976352..00000000 --- a/layouts/news/single.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ partial "top_single.html" . }} -{{ partial "body_single.html" . }} -{{ partial "bottom_single.html" . }} diff --git a/layouts/partials/top_list_generic.html b/layouts/partials/top_list_generic.html index bf84b00f..531ab5c5 100644 --- a/layouts/partials/top_list_generic.html +++ b/layouts/partials/top_list_generic.html @@ -5,7 +5,7 @@
-

{{ .Title }} +

{{ .Title }}{{ if .Description }} {{ .Description }}{{ end }}

diff --git a/layouts/partials/top_list_news.html b/layouts/partials/top_list_news.html deleted file mode 100644 index ead589c0..00000000 --- a/layouts/partials/top_list_news.html +++ /dev/null @@ -1,12 +0,0 @@ -{{ partial "head.html" . }} - -
- {{ partial "menu.html" . }} -
-
-
-

News For current events related to Fedipage. You can follow this page on the fediverse at @fedipage@fedipage.com. -

-
-
-
diff --git a/layouts/partials/top_list_projects.html b/layouts/partials/top_list_projects.html deleted file mode 100644 index 298731e9..00000000 --- a/layouts/partials/top_list_projects.html +++ /dev/null @@ -1,12 +0,0 @@ -{{ partial "head.html" . }} - -
- {{ partial "menu.html" . }} -
-
-
-

Projects Open source projects related to the fedipage project. -

-
-
-
diff --git a/layouts/partials/top_list_resource.html b/layouts/partials/top_list_resource.html deleted file mode 100644 index 336fd1c8..00000000 --- a/layouts/partials/top_list_resource.html +++ /dev/null @@ -1,12 +0,0 @@ -{{ partial "head.html" . }} - -
- {{ partial "menu.html" . }} -
-
-
-

Resources services, assistance, information, and other resources to assist in contributing to the Fedipage project. -

-
-
-
diff --git a/layouts/partials/top_list_taxonomy.html b/layouts/partials/top_list_taxonomy.html index 09d67e2b..0aa5df05 100644 --- a/layouts/partials/top_list_taxonomy.html +++ b/layouts/partials/top_list_taxonomy.html @@ -5,7 +5,7 @@
-

Categories a listing of all the topics we cover organized in one place. +

Categories A listing of all the topics we cover organized in one place.

diff --git a/layouts/projects/list.html b/layouts/projects/list.html deleted file mode 100644 index b7658ea2..00000000 --- a/layouts/projects/list.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ partial "top_list_projects.html" . }} -{{ partial "body_list.html" . }} -{{ partial "bottom_list.html" . }} diff --git a/layouts/projects/single.html b/layouts/projects/single.html deleted file mode 100644 index 70976352..00000000 --- a/layouts/projects/single.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ partial "top_single.html" . }} -{{ partial "body_single.html" . }} -{{ partial "bottom_single.html" . }} diff --git a/layouts/resource/list.html b/layouts/resource/list.html deleted file mode 100644 index 91210d75..00000000 --- a/layouts/resource/list.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ partial "top_list_resource.html" . }} -{{ partial "body_list.html" . }} -{{ partial "bottom_list.html" . }} diff --git a/layouts/resource/single.html b/layouts/resource/single.html deleted file mode 100644 index 70976352..00000000 --- a/layouts/resource/single.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ partial "top_single.html" . }} -{{ partial "body_single.html" . }} -{{ partial "bottom_single.html" . }}