Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <jimmehcai@gmail.com>2021-03-07 15:02:39 +0300
committerGitHub <noreply@github.com>2021-03-07 15:02:39 +0300
commit9befda7310feebd5b8e477f735dce62d85b3b412 (patch)
tree59d0f02cad97c4c9aada8139b455e3c0b88c1ca0
parentd5268a41e0629efe728524d5f0a14564359ff279 (diff)
refactor: add exampleSite menu using FrontMatter (#167)
-rw-r--r--exampleSite/config.yaml21
-rw-r--r--exampleSite/content/page/about.md24
-rw-r--r--exampleSite/content/page/archives.md4
-rw-r--r--exampleSite/content/page/search.md4
4 files changed, 26 insertions, 27 deletions
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml
index b55925f..67dcfc2 100644
--- a/exampleSite/config.yaml
+++ b/exampleSite/config.yaml
@@ -99,6 +99,9 @@ params:
content:
enabled: true
+### Custom menu
+### See https://docs.stack.jimmycai.com/configuration/custom-menu
+### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
menu:
main:
- identifier: home
@@ -107,24 +110,6 @@ menu:
weight: -100
pre: home
- - identifier: about
- name: About
- url: about
- weight: -90
- pre: user
-
- - identifier: archives
- name: Archives
- url: archives
- weight: -70
- pre: archives
-
- - identifier: search
- name: Search
- url: search
- weight: -60
- pre: search
-
related:
includeNewer: true
threshold: 60
diff --git a/exampleSite/content/page/about.md b/exampleSite/content/page/about.md
index 8a8789f..79898de 100644
--- a/exampleSite/content/page/about.md
+++ b/exampleSite/content/page/about.md
@@ -1,12 +1,18 @@
-+++
-title = "About"
-description = "Hugo, the world's fastest framework for building websites"
-date = "2019-02-28"
-aliases = ["about-us", "about-hugo", "contact"]
-author = "Hugo Authors"
-license = "CC BY-NC-ND"
-lastmod = "2020-10-09"
-+++
+---
+title: About
+description: Hugo, the world's fastest framework for building websites
+date: '2019-02-28'
+aliases:
+ - about-us
+ - about-hugo
+ - contact
+license: CC BY-NC-ND
+lastmod: '2020-10-09'
+menu:
+ main:
+ weight: -90
+ pre: user
+---
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.
diff --git a/exampleSite/content/page/archives.md b/exampleSite/content/page/archives.md
index e25595b..027dfc6 100644
--- a/exampleSite/content/page/archives.md
+++ b/exampleSite/content/page/archives.md
@@ -3,4 +3,8 @@ title: "Archives"
date: 2019-05-28
layout: "archives"
slug: "archives"
+menu:
+ main:
+ weight: -70
+ pre: archives
---
diff --git a/exampleSite/content/page/search.md b/exampleSite/content/page/search.md
index 0363546..f54cdb5 100644
--- a/exampleSite/content/page/search.md
+++ b/exampleSite/content/page/search.md
@@ -5,4 +5,8 @@ layout: "search"
outputs:
- html
- json
+menu:
+ main:
+ weight: -60
+ pre: search
--- \ No newline at end of file