summaryrefslogtreecommitdiffstats
path: root/content/en/templates/single-page-templates.md
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-01-17 12:51:01 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-01-17 12:51:01 +0100
commitef6f101e75256c3bb88a6f1f3b5c1273bf8d7382 (patch)
treedfb035e3998be1faa66623c8a594cac0863208af /content/en/templates/single-page-templates.md
parent41bc6f702aa54200530efbf4267e5c823df3028d (diff)
Squashed 'docs/' changes from 2c0125b52..1214f6ffb
1214f6ffb Document cleanDestinationDir configuration setting 27ca65463 Clarify .Page.Param method (#1953) 3fa1792d2 Document the usage of `hardWrap` option for markdown rendering (#1951) 8b5afdfb4 Update theme 207e7f0a0 fix docs for getting remote font 1f7094b9e Correct typo f9d6445c4 Added missing `/` in URL generator (#1946) 3a22ee7d6 Remove translations b3b900f3f Update introduction.md aca440052 rm Forestry - facing end-of-life shortly (#1944) af0014e14 Update scss-sass.md 1c43bbbc9 Merge branch 'docs/goworkspace' d034175ca netlify: Hugo 0.109.0 d3a6a5c3f Merge branch 'tempv0.109.0' e033dbead docs: Regen docs helper JSON 452bf675c resource/page: Add Page.Ancestors 12edd7363 Add some docs for workspaces 8f0fcba6b Add HUGO_PUBLISHDIR to the Node environment 4e66d98ad Update theme 808aee6f6 config: Update to ga v4 1de2bc5a9 config: Update to ga v4 ddb5fd6b0 Merge commit '41bc6f702aa54200530efbf4267e5c823df3028d' 54c54bf76 modules: Adjust watch logic vs workspace use definitions git-subtree-dir: docs git-subtree-split: 1214f6ffbf680e853746aaeb6cb097b28c0c556b
Diffstat (limited to 'content/en/templates/single-page-templates.md')
-rw-r--r--content/en/templates/single-page-templates.md29
1 files changed, 15 insertions, 14 deletions
diff --git a/content/en/templates/single-page-templates.md b/content/en/templates/single-page-templates.md
index 2b0cfe0e2..925f97b03 100644
--- a/content/en/templates/single-page-templates.md
+++ b/content/en/templates/single-page-templates.md
@@ -6,7 +6,7 @@ date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-04-06
categories: [templates]
-keywords: [page,templates]
+keywords: [page, templates]
menu:
docs:
parent: "templates"
@@ -32,6 +32,7 @@ This single page template makes use of Hugo [base templates], the [`.Format` fun
{{< code file="layouts/posts/single.html" download="single.html" >}}
{{ define "main" }}
+
<section id="main">
<h1 id="title">{{ .Title }}</h1>
<div>
@@ -46,20 +47,20 @@ This single page template makes use of Hugo [base templates], the [`.Format` fun
<h4 id="date"> {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
<h5 id="wordcount"> {{ .WordCount }} Words </h5>
</section>
- {{ with .Params.topics }}
- <ul id="topics">
- {{ range . }}
- <li><a href="{{ "topics" | absURL}}{{ . | urlize }}">{{ . }}</a> </li>
+ {{ with .GetTerms "topics" }}
+ <ul id="topics">
+ {{ range . }}
+ <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
+ {{ end }}
+ </ul>
{{ end }}
- </ul>
- {{ end }}
- {{ with .Params.tags }}
- <ul id="tags">
- {{ range . }}
- <li> <a href="{{ "tags" | absURL }}{{ . | urlize }}">{{ . }}</a> </li>
+ {{ with .GetTerms "tags" }}
+ <ul id="tags">
+ {{ range . }}
+ <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
+ {{ end }}
+ </ul>
{{ end }}
- </ul>
- {{ end }}
</div>
<div>
{{ with .PrevInSection }}
@@ -81,7 +82,7 @@ To easily generate new instances of a content type (e.g., new `.md` files in a s
[content type]: /content-management/types/
[directory structure]: /getting-started/directory-structure/
[dry]: https://en.wikipedia.org/wiki/Don%27t_repeat_yourself
-[`.Format` function]: /functions/format/
+[`.format` function]: /functions/format/
[front matter]: /content-management/front-matter/
[pagetaxonomy]: /templates/taxonomy-templates/#display-a-single-piece-of-contents-taxonomies
[pagevars]: /variables/page/