fix single page menu urls, update example sites #151

This commit is contained in:
Dmitry Kolosov 2022-05-21 14:51:30 +03:00
parent ae6b41de47
commit edc508fa62
10 changed files with 187 additions and 36 deletions

View File

@ -1,23 +1,24 @@
--- ---
title: "Subpage" title: "About subpage"
description: "Just a subpage of about" description: "About subpage"
date: "2019-02-28" date: "2019-02-28"
author: "Hugo Authors" author: "Hugo Authors"
slug: /about/subpage slug: /about/subpage
menu: menu:
about: about:
identifier: about identifier: about-subpage-s
name: About parent: about
title: About name: About Subpage
url: /about title: About Subpage
url: /about/subpage/
weight: 1 weight: 1
subpage: subpage:
identifier: subpage identifier: about-subpage2-s
parent: about parent: about
name: Subpage name: Second About subpage
title: Subpage title: Second About subpage
url: /about/subpage/ url: /about/subpage2/
weight: 10 weight: 10
--- ---
Just a subpage of About. About subpage

View File

@ -0,0 +1,24 @@
---
title: "Second About subpage"
description: "Second About subpage"
date: "2019-02-28"
author: "Hugo Authors"
slug: /about/subpage2
menu:
about:
identifier: about-subpage-s2
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage:
identifier: about-subpage2-s2
parent: about
name: Second About subpage
title: Second About subpage
url: /about/subpage2/
weight: 10
---
Second About subpage

View File

@ -2,22 +2,22 @@
title: "About" title: "About"
description: "Hugo, the worlds fastest framework for building websites" description: "Hugo, the worlds fastest framework for building websites"
date: "2019-02-28" date: "2019-02-28"
aliases: aliases: ["about-us","about-hugo","contact"]
- "about-us"
- "about-hugo"
- "contact"
author: "Hugo Authors" author: "Hugo Authors"
menu: menu:
about: about:
name: About identifier: about-subpage
title: About parent: about
url: /about name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1 weight: 1
subpage: subpage:
identifier: about-subpage2
parent: about parent: about
name: Subpage name: Second About subpage
title: Subpage title: Second About subpage
url: /about/subpage url: /about/subpage2/
weight: 10 weight: 10
--- ---

View File

@ -0,0 +1,24 @@
---
title: "About Subpage"
description: "About Subpage"
date: "2019-02-28"
author: "Hugo Authors"
slug: /about/subpage
menu:
subpage:
identifier: about-subpage-s
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2-s
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
About subpage

View File

@ -0,0 +1,24 @@
---
title: "About Subpage"
description: "About Subpage"
date: "2019-02-28"
author: "Hugo Authors"
slug: /about/subpage
menu:
subpage:
identifier: about-subpage-s
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2-s
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
About subpage

View File

@ -0,0 +1,24 @@
---
title: "Second About Subpage"
description: "Second About Subpage"
date: "2019-02-28"
author: "Hugo Authors"
slug: /about/subpage2
menu:
subpage:
identifier: about-subpage-s2
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2-s2
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
Second About subpage

View File

@ -0,0 +1,24 @@
---
title: "Second About Subpage"
description: "Second About Subpage"
date: "2019-02-28"
author: "Hugo Authors"
slug: /about/subpage2
menu:
subpage:
identifier: about-subpage-s2
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2-s2
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
Second About subpage

View File

@ -1,10 +1,25 @@
+++ ---
title = "About" title: "About"
description = "Hugo, the worlds fastest framework for building websites" description: "Hugo, the worlds fastest framework for building websites"
date = "2019-02-28" date: "2019-02-28"
aliases = ["about-us","about-hugo","contact"] aliases: ["about-us","about-hugo","contact"]
author = "Hugo Authors" author: "Hugo Authors"
+++ menu:
subpage:
identifier: about-subpage
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows. Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.

View File

@ -1,10 +1,25 @@
+++ ---
title = "About" title: "About"
description = "Hugo, the worlds fastest framework for building websites" description: "Hugo, the worlds fastest framework for building websites"
date = "2019-02-28" date: "2019-02-28"
aliases = ["about-us","about-hugo","contact"] aliases: ["about-us","about-hugo","contact"]
author = "Hugo Authors" author: "Hugo Authors"
+++ menu:
subpage:
identifier: about-subpage
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage2:
identifier: about-subpage2
parent: about
name: Second About Subpage
title: Second About Subpage
url: /about/subpage2/
weight: 10
---
Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows. Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows.

View File

@ -2,7 +2,7 @@
{{ if .Menus }} {{ if .Menus }}
<nav class="post-navigation"> <nav class="post-navigation">
{{ range .Menus }} {{ range .Menus }}
<a href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a> <a href="{{ .ConfiguredURL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
{{ end }} {{ end }}
</nav> </nav>
{{ end }} {{ end }}