Introduction des taxonomies avec les tags et catégories
This commit is contained in:
parent
a45cafeed1
commit
e77784f1dc
9 changed files with 30 additions and 3 deletions
|
@ -5,6 +5,8 @@ lastmod: {{ .Date }}
|
||||||
publishdate: {{ .Date }}
|
publishdate: {{ .Date }}
|
||||||
description: "Recette"
|
description: "Recette"
|
||||||
weight: 10
|
weight: 10
|
||||||
|
categories: ["recette"]
|
||||||
|
tags: []
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ingrédients
|
## Ingrédients
|
||||||
|
|
|
@ -6,6 +6,7 @@ publishdate: 2025-03-21T22:50:00+01:00
|
||||||
description: "Recette"
|
description: "Recette"
|
||||||
weight: 10
|
weight: 10
|
||||||
tags: ["crêpes", "sucré", "bretagne"]
|
tags: ["crêpes", "sucré", "bretagne"]
|
||||||
|
categories: ["recette"]
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ingrédients
|
## Ingrédients
|
||||||
|
|
|
@ -6,6 +6,7 @@ publishdate: 2025-03-21T22:41:15+01:00
|
||||||
description: "Recette"
|
description: "Recette"
|
||||||
weight: 10
|
weight: 10
|
||||||
tags: ["crêpes", "salé", "sarrasin", "bretagne"]
|
tags: ["crêpes", "salé", "sarrasin", "bretagne"]
|
||||||
|
categories: ["recette"]
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ingrédients
|
## Ingrédients
|
||||||
|
|
|
@ -6,6 +6,7 @@ publishdate: 2025-03-21T22:47:29+01:00
|
||||||
description: "Recette"
|
description: "Recette"
|
||||||
weight: 10
|
weight: 10
|
||||||
tags: ["crêpes", "salé", "sarrasin", "bretagne"]
|
tags: ["crêpes", "salé", "sarrasin", "bretagne"]
|
||||||
|
categories: ["recette"]
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ingrédients
|
## Ingrédients
|
||||||
|
|
|
@ -6,6 +6,7 @@ publishdate: 2025-03-21T21:56:59+01:00
|
||||||
description: "Recette du moutabal"
|
description: "Recette du moutabal"
|
||||||
weight: 10
|
weight: 10
|
||||||
tags: ["recettes", "moutabal", "oriental"]
|
tags: ["recettes", "moutabal", "oriental"]
|
||||||
|
categories: ["recette"]
|
||||||
---
|
---
|
||||||
|
|
||||||
Le moutabal est un genre de caviar d'aubergines que j'ai découvert lors d'un voyage en
|
Le moutabal est un genre de caviar d'aubergines que j'ai découvert lors d'un voyage en
|
||||||
|
|
10
hugo.toml
10
hugo.toml
|
@ -63,7 +63,7 @@ enableMissingTranslationPlaceholders = false
|
||||||
# See https://gohugo.io/content-management/menus/
|
# See https://gohugo.io/content-management/menus/
|
||||||
[menu]
|
[menu]
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Accuel"
|
name = "Accueil"
|
||||||
url = "/"
|
url = "/"
|
||||||
weight = 1
|
weight = 1
|
||||||
identifier = 'accueil'
|
identifier = 'accueil'
|
||||||
|
@ -72,6 +72,10 @@ enableMissingTranslationPlaceholders = false
|
||||||
url = "/a-propos"
|
url = "/a-propos"
|
||||||
weight = 10
|
weight = 10
|
||||||
identifier = 'a-propos'
|
identifier = 'a-propos'
|
||||||
|
[[menu.main]]
|
||||||
|
name = "Tags"
|
||||||
|
url = "/tags"
|
||||||
|
weight = 30
|
||||||
|
|
||||||
# Markup configure section
|
# Markup configure section
|
||||||
# See https://gohugo.io/getting-started/configuration-markup/
|
# See https://gohugo.io/getting-started/configuration-markup/
|
||||||
|
@ -110,3 +114,7 @@ enableMissingTranslationPlaceholders = false
|
||||||
"tags",
|
"tags",
|
||||||
"categories",
|
"categories",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[taxonomies]
|
||||||
|
category = "categories"
|
||||||
|
tag = "tags"
|
6
layouts/_default/list.html
Normal file
6
layouts/_default/list.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{{- define "main" -}}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{- .Content -}}
|
||||||
|
{{- partial "edit-meta.html" . -}}
|
||||||
|
{{- partial "pagination.html" . -}}
|
||||||
|
{{- end -}}
|
7
layouts/_default/taxonomy.html
Normal file
7
layouts/_default/taxonomy.html
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ .Content }}
|
||||||
|
{{ range .Pages }}
|
||||||
|
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
|
@ -1 +1 @@
|
||||||
Subproject commit a2daa38408002bb0f123f83cbc88442ee1e13a1b
|
Subproject commit 50d2f96b2dbc8199529d1255183f2cee0ad8452e
|
Loading…
Add table
Add a link
Reference in a new issue