From f9d6445c4d5ab9613739cb8589b570d8303ccb2a Mon Sep 17 00:00:00 2001 From: Arun Mani J <49952138+arun-mani-j@users.noreply.github.com> Date: Mon, 2 Jan 2023 12:59:31 +0530 Subject: [PATCH] Added missing `/` in URL generator (#1946) * Added missing `/` in URL generator In the example to render tags and topics, we use: ```html ``` But this will produce links like `www.example.com/tagsTerm` where `Term` is a tag. So added the missing `/`. * Updated the tags and topics listing code The example previously used the old `with .Params.tags` style. Updated it to use `.GetTerms "tags"` style. --- content/en/templates/single-page-templates.md | 29 ++++++++++--------- 1 file 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" }} +

{{ .Title }}

@@ -46,20 +47,20 @@ This single page template makes use of Hugo [base templates], the [`.Format` fun

{{ .Date.Format "Mon Jan 2, 2006" }}

{{ .WordCount }} Words
- {{ with .Params.topics }} -
- {{ end }} - {{ with .Params.tags }} - - {{ end }}
{{ 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/