Auflistung der Taxonomy geradegezogen
This commit is contained in:
parent
1e520f3f39
commit
23649f935f
11 changed files with 54 additions and 13 deletions
|
@ -1 +1,13 @@
|
|||
{{- partial "taxonomy/description.html" . -}}
|
||||
{{/*
|
||||
Definition der Standardauflistung von Taxonomy und der Seiten eines Elementes der Taxonomy
|
||||
- kann durch terms.html die Hauptlistung der Taxonomy-Elemente überschrieben werden (z.B. tags/)
|
||||
- kann durch layout/taxonomy/tag.html die Seite des Elementes überschrieben werden (z.B. tags/64Bit/)
|
||||
|
||||
Um weitere Informationen zu den Taxonomy-Element zu hinterlegen, muss in der Webseite eine _index.md für jedes Element
|
||||
erzeugt werden. hierfür kann der Befehl `hugo new <taxonomy>/<term>/_index.md" verwendet werden. Mit unserem Beispiel
|
||||
würde es dann wie folgt lauten: `hugo new tags/64Bit/index.md`. Sinnvoll sollte dafür auch Vorlagen unter archtypes/<taxonomy>.md
|
||||
sein. Für unser Beispiel wäre es dann archtypes/tags.md.
|
||||
*/}}
|
||||
{{ define "main" }}
|
||||
{{- partial "taxonomy/summary.html" . -}}
|
||||
{{ end }}
|
||||
|
|
3
layouts/_default/terms.html
Normal file
3
layouts/_default/terms.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ define "main" }}
|
||||
{{- partial "taxonomy/description.html" . -}}
|
||||
{{ end }}
|
|
@ -1,11 +1,9 @@
|
|||
{{ define "main" }}
|
||||
<h1 class="mb-5">{{ .Title }}</h1>
|
||||
{{ range .Pages.ByTitle }}
|
||||
<h1 class="mb-5">{{ .Title }}</h1>
|
||||
{{ range .Pages.ByTitle }}
|
||||
<article class="border-bottom">
|
||||
<h3 class="mb-3">
|
||||
<a href="{{ .RelPermalink | relURL }}">{{ .Title }}</a>
|
||||
</h3>
|
||||
<p>{{ .Summary }}</p>
|
||||
<p>{{ .Description }}</p>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -1,11 +1,9 @@
|
|||
{{ define "main" }}
|
||||
<h1 class="mb-5">{{ .Title }}</h1>
|
||||
{{ range .Pages.ByTitle }}
|
||||
<h1 class="mb-5">{{ .Title }}</h1>
|
||||
{{ range .Pages.ByTitle }}
|
||||
<article class="border-bottom">
|
||||
<h3 class="mb-3">
|
||||
<a href="{{ .RelPermalink | relURL }}">{{ .Title }}</a>
|
||||
</h3>
|
||||
<p>{{ .Summary }}</p>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -1 +0,0 @@
|
|||
{{- partial "taxonomy/summary.html" . -}}
|
|
@ -1 +0,0 @@
|
|||
{{- partial "taxonomy/summary.html" . -}}
|
|
@ -1 +0,0 @@
|
|||
{{- partial "taxonomy/summary.html" . -}}
|
Loading…
Add table
Add a link
Reference in a new issue