Merge pull request #7 from jtom38/features/theme/tags-categories

Features/theme/tags categories
This commit is contained in:
James Tombleson 2022-10-01 22:17:51 -07:00 committed by GitHub
commit 650f84f666
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 114 additions and 41 deletions

4
.gitignore vendored
View File

@ -1,3 +1,5 @@
*.lock
public/
public/
.DS_Store

View File

@ -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

View File

@ -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

View File

@ -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/
---

View File

@ -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

View File

@ -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
---

View File

@ -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/
---

View File

@ -1,6 +1,9 @@
{{ partial "header.html" . }}
{{ partial "hero.html" . }}
<h1>hi from _default/index.html</h1>
<div class="content">
{{ .Content }}
</div>
</div>

View File

@ -2,11 +2,14 @@
{{ partial "hero.html" . }}
<div class="container">
<br>
{{ range .RegularPages }}
<div class="card">
<div class="card-content">
<div class="media">
<div class="media-left">
<figure class="image is-128x128">
{{ with .Params.listthumbnail }}
@ -20,20 +23,33 @@
<a href="{{ .Permalink }}"> {{ .Title }}</a>
</p>
<p class="subtitle is-6">{{ .Params.subtitle }}</p>
{{ with .Params.tags }}
<ul id="tags">
<div class="buttons">
{{ range . }}
<span class="tag">
<a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a>
</span>
<button class="button">
<a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a>
</button>
{{ end }}
</ul>
</div>
{{ end }}
{{ with .Params.categories }}
<div class="buttons">
{{ range . }}
<button class="button">
<a href="{{ "categories" | absURL }}/{{ . | urlize }}">{{ . }}</a>
</button>
{{ end }}
</div>
{{ end }}
</div>
</div>
</div>
</div>
{{ end }}
</div>
</div>
{{ partial "footer.html" . }}

View File

@ -2,24 +2,38 @@
{{ partial "hero.html" . }}
<div class="container">
<img src="{{ .Params.thumbnail }}" />
<div class="content">
{{ .Content }}
</div>
<h4 class="subtitle" id="date"> Posted: {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
<h5 class="subtitle" id="wordcount"> Word Count: {{ .WordCount }} Words </h5>
<br>
<h2 class="title">Tags</h2>
{{ with .Params.tags }}
{{ range . }}
<span class="tag">
<a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a>
</span>
{{ end }}
{{ end }}
<div class="columns">
<div class="column">
<img src="{{ .Params.thumbnail }}" />
</div>
<div class="column">
<div class="content">
{{ .Content }}
</div>
<h4 class="subtitle" id="date"> Posted: {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
<h5 class="subtitle" id="wordcount"> Word Count: {{ .WordCount }} Words </h5>
<br>
<h2 class="title">Tags</h2>
<div class="buttons">
{{ with .Params.tags }}
{{ range . }}
<button class="button">
<a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a>
</button>
{{ end }}
{{ end }}
</div>
</div>
</div>
</div>

View File

@ -1,11 +0,0 @@
{{ partial "header.html" . }}
{{ partial "hero.html" . }}
<main>
<div>
<!-- ranges through each of the content files associated with a particular taxonomy term and renders the summary.html content view -->
{{ range .Pages }}
{{ .Render "tags"}}
{{ end }}
</div>
</main>

View File

@ -14,6 +14,7 @@
<div class="navbar-start">
<a class="navbar-item" href="/recipies">Recipies</a>
<a class="navbar-item" href="/tags">Tags</a>
<a class="navbar-item" href="/categories">Categories</a>
<a class="navbar-item" href="/recipies/index.xml">RSS Feed</a>
</div>
</div>

View File

@ -0,0 +1,16 @@
{{ partial "header.html" . }}
{{ partial "hero.html" . }}
<div class="container">
<br>
<div class="buttons">
{{ range .Data.Pages }}
<button class="button">
<a href="{{.RelPermalink}}">{{ .Title }}</a>
</button>
{{ end }}
</div>
</div>
{{ partial "footer.html" . }}