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"
description: "Just a subpage of about"
title: "About subpage"
description: "About subpage"
date: "2019-02-28"
author: "Hugo Authors"
slug: /about/subpage
menu:
about:
identifier: about
name: About
title: About
url: /about
identifier: about-subpage-s
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage:
identifier: subpage
identifier: about-subpage2-s
parent: about
name: Subpage
title: Subpage
url: /about/subpage/
name: Second About subpage
title: Second About subpage
url: /about/subpage2/
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"
description: "Hugo, the worlds fastest framework for building websites"
date: "2019-02-28"
aliases:
- "about-us"
- "about-hugo"
- "contact"
aliases: ["about-us","about-hugo","contact"]
author: "Hugo Authors"
menu:
about:
name: About
title: About
url: /about
identifier: about-subpage
parent: about
name: About Subpage
title: About Subpage
url: /about/subpage/
weight: 1
subpage:
identifier: about-subpage2
parent: about
name: Subpage
title: Subpage
url: /about/subpage
name: Second About subpage
title: Second About subpage
url: /about/subpage2/
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"
description = "Hugo, the worlds fastest framework for building websites"
date = "2019-02-28"
aliases = ["about-us","about-hugo","contact"]
author = "Hugo Authors"
+++
---
title: "About"
description: "Hugo, the worlds fastest framework for building websites"
date: "2019-02-28"
aliases: ["about-us","about-hugo","contact"]
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.

View File

@ -1,10 +1,25 @@
+++
title = "About"
description = "Hugo, the worlds fastest framework for building websites"
date = "2019-02-28"
aliases = ["about-us","about-hugo","contact"]
author = "Hugo Authors"
+++
---
title: "About"
description: "Hugo, the worlds fastest framework for building websites"
date: "2019-02-28"
aliases: ["about-us","about-hugo","contact"]
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.

View File

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