From fb66080ef17bf7db29a6be878e2ad417e1e0eb34 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Sat, 1 Oct 2022 22:15:39 -0700 Subject: [PATCH 1/4] Tags and categories are now working with custom layouts. More changes to make but its in the right direction --- .../layouts/_default/index.html | 5 +- .../layouts/_default/list.html | 28 ++++++++--- .../layouts/_default/single.html | 48 ++++++++++++------- .../layouts/_default/taxonomy.html | 11 ----- .../layouts/partials/navbar.html | 1 + .../layouts/taxonomy/tags.html | 0 .../layouts/taxonomy/terms.html | 16 +++++++ 7 files changed, 74 insertions(+), 35 deletions(-) delete mode 100644 themes/hugo-bulma-cookbook/layouts/_default/taxonomy.html create mode 100644 themes/hugo-bulma-cookbook/layouts/taxonomy/tags.html create mode 100644 themes/hugo-bulma-cookbook/layouts/taxonomy/terms.html diff --git a/themes/hugo-bulma-cookbook/layouts/_default/index.html b/themes/hugo-bulma-cookbook/layouts/_default/index.html index 7771080..fd3ba90 100644 --- a/themes/hugo-bulma-cookbook/layouts/_default/index.html +++ b/themes/hugo-bulma-cookbook/layouts/_default/index.html @@ -1,6 +1,9 @@ {{ partial "header.html" . }} {{ partial "hero.html" . }} +

hi from _default/index.html

+
{{ .Content }} -
\ No newline at end of file + + diff --git a/themes/hugo-bulma-cookbook/layouts/_default/list.html b/themes/hugo-bulma-cookbook/layouts/_default/list.html index dc37307..e451baa 100644 --- a/themes/hugo-bulma-cookbook/layouts/_default/list.html +++ b/themes/hugo-bulma-cookbook/layouts/_default/list.html @@ -2,11 +2,14 @@ {{ partial "hero.html" . }}
+
+ {{ range .RegularPages }}
+
{{ with .Params.listthumbnail }} @@ -20,20 +23,33 @@ {{ .Title }}

{{ .Params.subtitle }}

+ {{ with .Params.tags }} - +
+ {{ end }} + + + {{ with .Params.categories }} +
+ {{ range . }} + + {{ end }} +
{{ end }}
{{ end }} - + + {{ partial "footer.html" . }} \ No newline at end of file diff --git a/themes/hugo-bulma-cookbook/layouts/_default/single.html b/themes/hugo-bulma-cookbook/layouts/_default/single.html index 10cdc61..65556b1 100644 --- a/themes/hugo-bulma-cookbook/layouts/_default/single.html +++ b/themes/hugo-bulma-cookbook/layouts/_default/single.html @@ -2,24 +2,38 @@ {{ partial "hero.html" . }}
- - -
- {{ .Content }} -
- -

Posted: {{ .Date.Format "Mon Jan 2, 2006" }}

-
Word Count: {{ .WordCount }} Words
-
-

Tags

- {{ with .Params.tags }} - {{ range . }} - - {{ . }} - - {{ end }} - {{ end }} + +
+ +
+ +
+ +
+
+ {{ .Content }} +
+ +

Posted: {{ .Date.Format "Mon Jan 2, 2006" }}

+
Word Count: {{ .WordCount }} Words
+ +
+

Tags

+ +
+ {{ with .Params.tags }} + + {{ range . }} + + {{ end }} + + {{ end }} +
+
+
diff --git a/themes/hugo-bulma-cookbook/layouts/_default/taxonomy.html b/themes/hugo-bulma-cookbook/layouts/_default/taxonomy.html deleted file mode 100644 index 4c57d5d..0000000 --- a/themes/hugo-bulma-cookbook/layouts/_default/taxonomy.html +++ /dev/null @@ -1,11 +0,0 @@ -{{ partial "header.html" . }} -{{ partial "hero.html" . }} - -
-
- - {{ range .Pages }} - {{ .Render "tags"}} - {{ end }} -
-
diff --git a/themes/hugo-bulma-cookbook/layouts/partials/navbar.html b/themes/hugo-bulma-cookbook/layouts/partials/navbar.html index ee8b8a2..02301cd 100644 --- a/themes/hugo-bulma-cookbook/layouts/partials/navbar.html +++ b/themes/hugo-bulma-cookbook/layouts/partials/navbar.html @@ -14,6 +14,7 @@ diff --git a/themes/hugo-bulma-cookbook/layouts/taxonomy/tags.html b/themes/hugo-bulma-cookbook/layouts/taxonomy/tags.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/hugo-bulma-cookbook/layouts/taxonomy/terms.html b/themes/hugo-bulma-cookbook/layouts/taxonomy/terms.html new file mode 100644 index 0000000..a7a16bf --- /dev/null +++ b/themes/hugo-bulma-cookbook/layouts/taxonomy/terms.html @@ -0,0 +1,16 @@ +{{ partial "header.html" . }} +{{ partial "hero.html" . }} + +
+
+ +
+ {{ range .Data.Pages }} + + {{ end }} +
+
+ +{{ partial "footer.html" . }} \ No newline at end of file From 8ab56b962e82efc42917d560016fbd6693a7f3b1 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Sat, 1 Oct 2022 22:16:41 -0700 Subject: [PATCH 2/4] updated the default template --- .gitignore | 4 +++- archetypes/default.md | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 48749f8..4dccf2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.lock -public/ \ No newline at end of file +public/ + +.DS_Store \ No newline at end of file diff --git a/archetypes/default.md b/archetypes/default.md index fe98720..3b89e88 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,10 +1,16 @@ --- title: "{{ replace .Name "-" " " | title }}" +subtitle: Any Subtext you might want to append date: {{ .Date }} draft: true + tags: [] -thumbnail: -parenturl: +categories: [] + +listthumbnail: "./recipie-folder-name/thumbnail.png" +thumbnail: "./thumbnail.png" + +parenturl: "https://site.com" --- ## Ingredients From 0e5231193fb33d9b8a2473eff0626c11ce7a3908 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Sat, 1 Oct 2022 22:17:08 -0700 Subject: [PATCH 3/4] added sitemap and taxonomy flag --- config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config.yaml b/config.yaml index a9a7a18..501ca4d 100644 --- a/config.yaml +++ b/config.yaml @@ -6,3 +6,12 @@ theme: "hugo-bulma-cookbook" taxonomies: category: 'categories' tag: 'tags' + #season: 'seasons' + +# Used to bring the /tags/ forward +preserveTaxonomyNames: true + +sitemap: + changefreq: monthly + filename: sitemap.xml + priority: 0.5 \ No newline at end of file From 7426f959b2133acd84d0c3b8912622a70f51d695 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Sat, 1 Oct 2022 22:17:29 -0700 Subject: [PATCH 4/4] updated the recipies to follow the new template changes --- .../index.md | 6 +++++- content/recipies/chicken-tikka-masala/index.md | 9 +++++++-- content/recipies/drop-biscuits.md | 3 +++ content/recipies/pasta-e-fagioli-soup/index.md | 5 +++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/content/recipies/chicken-mozzarella-pasta-with-sun-dried-tomatoes/index.md b/content/recipies/chicken-mozzarella-pasta-with-sun-dried-tomatoes/index.md index 498af18..004fdfa 100644 --- a/content/recipies/chicken-mozzarella-pasta-with-sun-dried-tomatoes/index.md +++ b/content/recipies/chicken-mozzarella-pasta-with-sun-dried-tomatoes/index.md @@ -3,9 +3,13 @@ title: "Sun-Dried Tomato Pasta with Chicken and Mozzarella" subtitle: date: 2022-09-28T06:36:00-07:00 draft: false -tags: [Pasta, Itilian, Chicken, Tomatoes] + +tags: [Pasta, Itilian, Chicken, Tomatoes, Summer, Fall] +categories: ["Main Dish"] + listthumbnail: ./chicken-mozzarella-pasta-with-sun-dried-tomatoes/thumbnail.png thumbnail: ./thumbnail.png + parenturl: https://juliasalbum.com/chicken-mozzarella-pasta-with-sun-dried-tomatoes/ --- diff --git a/content/recipies/chicken-tikka-masala/index.md b/content/recipies/chicken-tikka-masala/index.md index ddab5f7..467a216 100644 --- a/content/recipies/chicken-tikka-masala/index.md +++ b/content/recipies/chicken-tikka-masala/index.md @@ -3,9 +3,14 @@ title: "Chicken Tikka Masala" subtitle: date: 2022-06-27T11:30:26-07:00 draft: false + tags: [Dinner, Bon Apptite Recipie, Indian] -thumbnail: -parenturl: +categories: ["Main Dish"] + +listthumbnail: https://assets.bonappetit.com/photos/5b69f163d3d14670539a2174/1:1/w_2240,c_limit/ba-tikka-masala-2.jpg +thumbnail: https://assets.bonappetit.com/photos/5b69f163d3d14670539a2174/1:1/w_2240,c_limit/ba-tikka-masala-2.jpg + +parenturl: https://www.bonappetit.com/recipe/chicken-tikka-masala --- ## Ingredients diff --git a/content/recipies/drop-biscuits.md b/content/recipies/drop-biscuits.md index e07d959..6da9901 100644 --- a/content/recipies/drop-biscuits.md +++ b/content/recipies/drop-biscuits.md @@ -2,7 +2,10 @@ title: "Drop Biscuits" date: 2022-06-27T14:17:21-07:00 draft: false + tags: ["Breakfast", "Sides"] +categories: ["Sides"] + thumbnail: parenturl: https://www.seriouseats.com/recipes/2014/06/quick-easy-drop-biscuits-recipe.html --- diff --git a/content/recipies/pasta-e-fagioli-soup/index.md b/content/recipies/pasta-e-fagioli-soup/index.md index ec4d462..3a846d8 100644 --- a/content/recipies/pasta-e-fagioli-soup/index.md +++ b/content/recipies/pasta-e-fagioli-soup/index.md @@ -3,9 +3,14 @@ title: "Pasta e Fagioli Soup" subtitle: Fantastic winter soup date: 2022-06-28T09:21:26-07:00 draft: false + tags: [Soup, Pasta, Itilian] +categories: ["Main Dish"] +seasons: ["Fall", "Winter"] + listthumbnail: ./pasta-e-fagioli-soup/thumbnail.png thumbnail: ./thumbnail.png + parenturl: https://www.savingdessert.com/pasta-e-fagioli-soup-recipe/ ---