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 }}
|
||||
description: "Recette"
|
||||
weight: 10
|
||||
categories: ["recette"]
|
||||
tags: []
|
||||
---
|
||||
|
||||
## Ingrédients
|
||||
|
|
|
@ -6,6 +6,7 @@ publishdate: 2025-03-21T22:50:00+01:00
|
|||
description: "Recette"
|
||||
weight: 10
|
||||
tags: ["crêpes", "sucré", "bretagne"]
|
||||
categories: ["recette"]
|
||||
---
|
||||
|
||||
## Ingrédients
|
||||
|
|
|
@ -6,6 +6,7 @@ publishdate: 2025-03-21T22:41:15+01:00
|
|||
description: "Recette"
|
||||
weight: 10
|
||||
tags: ["crêpes", "salé", "sarrasin", "bretagne"]
|
||||
categories: ["recette"]
|
||||
---
|
||||
|
||||
## Ingrédients
|
||||
|
|
|
@ -6,6 +6,7 @@ publishdate: 2025-03-21T22:47:29+01:00
|
|||
description: "Recette"
|
||||
weight: 10
|
||||
tags: ["crêpes", "salé", "sarrasin", "bretagne"]
|
||||
categories: ["recette"]
|
||||
---
|
||||
|
||||
## Ingrédients
|
||||
|
|
|
@ -6,6 +6,7 @@ publishdate: 2025-03-21T21:56:59+01:00
|
|||
description: "Recette du moutabal"
|
||||
weight: 10
|
||||
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
|
||||
|
|
12
hugo.toml
12
hugo.toml
|
@ -63,7 +63,7 @@ enableMissingTranslationPlaceholders = false
|
|||
# See https://gohugo.io/content-management/menus/
|
||||
[menu]
|
||||
[[menu.main]]
|
||||
name = "Accuel"
|
||||
name = "Accueil"
|
||||
url = "/"
|
||||
weight = 1
|
||||
identifier = 'accueil'
|
||||
|
@ -72,6 +72,10 @@ enableMissingTranslationPlaceholders = false
|
|||
url = "/a-propos"
|
||||
weight = 10
|
||||
identifier = 'a-propos'
|
||||
[[menu.main]]
|
||||
name = "Tags"
|
||||
url = "/tags"
|
||||
weight = 30
|
||||
|
||||
# Markup configure section
|
||||
# See https://gohugo.io/getting-started/configuration-markup/
|
||||
|
@ -109,4 +113,8 @@ enableMissingTranslationPlaceholders = false
|
|||
params = [
|
||||
"tags",
|
||||
"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