From e20fff11b7fea7ec55bd8abdbcb030aeec6efb7c Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Sat, 9 Apr 2022 13:57:34 +0800 Subject: [PATCH] :tada: Feat: add nested menu for example site --- exampleSite/config.toml | 73 +++++++------------ .../content/posts/pwa-support/index.en.md | 9 ++- .../content/posts/pwa-support/index.zh-cn.md | 8 +- .../theme-documentation-basics/index.en.md | 7 ++ .../theme-documentation-basics/index.zh-cn.md | 6 ++ .../index.en.md | 7 ++ .../index.zh-cn.md | 6 ++ .../theme-documentation-content/index.en.md | 7 ++ .../index.zh-cn.md | 6 ++ .../index.en.md | 7 ++ .../index.zh-cn.md | 8 +- 11 files changed, 96 insertions(+), 48 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index db819be5..2b6e3df8 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -51,7 +51,7 @@ enableEmoji = true [[languages.en.menu.main]] identifier = "posts" # you can add extra information before the name (HTML format is supported), such as icons - pre = "" + pre = "" # you can add extra information after the name (HTML format is supported), such as icons post = "" name = "Posts" @@ -59,33 +59,33 @@ enableEmoji = true # title will be shown when you hover on this menu link. title = "" weight = 1 - [[languages.en.menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "Tags" - url = "/tags/" - title = "" - weight = 2 [[languages.en.menu.main]] identifier = "categories" - pre = "" + pre = "" post = "" name = "Categories" url = "/categories/" title = "" + weight = 2 + [[languages.en.menu.main]] + identifier = "tags" + pre = "" + post = "" + name = "Tags" + url = "/tags/" + title = "" weight = 3 [[languages.en.menu.main]] identifier = "documentation" - pre = "" + pre = "" post = "" name = "Docs" url = "/categories/documentation/" - title = "" + title = "Theme Documentation" weight = 4 [[languages.en.menu.main]] identifier = "friends" - pre = "" + pre = "" post = "" name = "Friends" url = "/friends/" @@ -93,29 +93,12 @@ enableEmoji = true weight = 5 [[languages.en.menu.main]] identifier = "about" + pre = "" post = "" name = "About" url = "/about/" title = "" weight = 6 - [[languages.en.menu.main]] - identifier = "about2" - pre = "Pre" - post = "Post" - name = "About2" - parent = 'about' - url = "/about/" - title = "" - weight = 2 - [[languages.en.menu.main]] - identifier = "friends1" - pre = "" - post = "" - name = "friends1" - parent = 'about' - url = "/friends/" - title = "" - weight = 1 [[languages.en.menu.main]] identifier = "github" pre = "" @@ -292,39 +275,39 @@ enableEmoji = true [[languages.zh-cn.menu.main]] identifier = "posts" # 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标 - pre = "" + pre = "" # 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标 post = "" name = "所有文章" url = "/posts/" title = "" weight = 1 - [[languages.zh-cn.menu.main]] - identifier = "tags" - pre = "" - post = "" - name = "标签" - url = "/tags/" - title = "" - weight = 2 [[languages.zh-cn.menu.main]] identifier = "categories" - pre = "" + pre = "" post = "" name = "分类" url = "/categories/" title = "" + weight = 2 + [[languages.zh-cn.menu.main]] + identifier = "tags" + pre = "" + post = "" + name = "标签" + url = "/tags/" + title = "" weight = 3 [[languages.zh-cn.menu.main]] identifier = "documentation" - pre = "" + pre = "" name = "文档" url = "/categories/documentation/" - title = "" + title = "主题文档" weight = 4 [[languages.zh-cn.menu.main]] identifier = "friends" - pre = "" + pre = "" post = "" name = "友链" url = "/friends/" @@ -332,7 +315,7 @@ enableEmoji = true weight = 5 [[languages.zh-cn.menu.main]] identifier = "about" - pre = "" + pre = "" post = "" name = "关于" url = "/about/" diff --git a/exampleSite/content/posts/pwa-support/index.en.md b/exampleSite/content/posts/pwa-support/index.en.md index 598043d3..6b6c2d78 100644 --- a/exampleSite/content/posts/pwa-support/index.en.md +++ b/exampleSite/content/posts/pwa-support/index.en.md @@ -1,6 +1,6 @@ --- weight: 7 -title: "PWA Support" +title: "Theme Documentation - PWA Support" date: 2022-01-26T09:32:56+08:00 draft: false author: "Lruihao" @@ -13,6 +13,13 @@ categories: ["Documentation"] resources: - name: featured-image src: featured-image.png + +menu: + main: + name: "PWA Support" + title: "Guide to setup PWA in FixIt." + parent: "documentation" + pre: "" --- Find out how to turn your FixIt site into a Progressive Web App. diff --git a/exampleSite/content/posts/pwa-support/index.zh-cn.md b/exampleSite/content/posts/pwa-support/index.zh-cn.md index a2378841..6f8db3d6 100644 --- a/exampleSite/content/posts/pwa-support/index.zh-cn.md +++ b/exampleSite/content/posts/pwa-support/index.zh-cn.md @@ -1,6 +1,6 @@ --- weight: 7 -title: "PWA 支持" +title: "主题文档 - PWA 支持" date: 2022-01-26T11:10:56+08:00 draft: false author: "Lruihao" @@ -13,6 +13,12 @@ categories: ["Documentation"] resources: - name: featured-image src: featured-image.png + +menu: + main: + title: "在 FixIt 中设置 PWA 的指南。" + parent: "documentation" + pre: "" --- 了解如何在 FixIt 主题中配置渐进式网络应用程序 (PWA)。 diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 590f2609..f65b3e53 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -18,6 +18,13 @@ lightgallery: true toc: auto: false + +menu: + main: + name: "Basics" + title: "Discover what the Hugo - FixIt theme is all about and the core-concepts behind it." + parent: "documentation" + pre: "" --- Discover what the Hugo - **FixIt** theme is all about and the core-concepts behind it. diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index e67f06ed..52cdd20f 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -18,6 +18,12 @@ lightgallery: true toc: auto: false + +menu: + main: + title: "探索 Hugo - FixIt 主题的全部内容和背后的核心概念。" + parent: "documentation" + pre: "" --- 探索 Hugo - **FixIt** 主题的全部内容和背后的核心概念。 diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.en.md b/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.en.md index e7d19039..cfcfaded 100644 --- a/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.en.md +++ b/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.en.md @@ -15,6 +15,13 @@ tags: ["shortcodes"] categories: ["documentation"] lightgallery: true + +menu: + main: + name: "Built-in Shortcodes" + title: "Hugo provides multiple built-in shortcodes for author convenience and to keep your markdown content clean." + parent: "documentation" + pre: "" --- **Hugo** provides multiple built-in shortcodes for author convenience and to keep your markdown content clean. diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.zh-cn.md index 94ea9cda..e9cc827c 100644 --- a/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-built-in-shortcodes/index.zh-cn.md @@ -15,6 +15,12 @@ tags: ["shortcodes"] categories: ["documentation"] lightgallery: true + +menu: + main: + title: "Hugo 提供了多个内置的 Shortcodes, 以方便作者保持 Markdown 内容的整洁。" + parent: "documentation" + pre: "" --- **Hugo** 提供了多个内置的 Shortcodes, 以方便作者保持 Markdown 内容的整洁。 diff --git a/exampleSite/content/posts/theme-documentation-content/index.en.md b/exampleSite/content/posts/theme-documentation-content/index.en.md index 614dcbc2..482e8320 100644 --- a/exampleSite/content/posts/theme-documentation-content/index.en.md +++ b/exampleSite/content/posts/theme-documentation-content/index.en.md @@ -20,6 +20,13 @@ toc: auto: false math: enable: true + +menu: + main: + name: "Content" + title: "Find out how to create and organize your content quickly and intuitively in FixIt theme." + parent: "documentation" + pre: "" --- Find out how to create and organize your content quickly and intuitively in **FixIt** theme. diff --git a/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md index 4874e862..244c7418 100644 --- a/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md @@ -20,6 +20,12 @@ toc: auto: false math: enable: true + +menu: + main: + title: "了解如何在 FixIt 主题中快速,直观地创建和组织内容。" + parent: "documentation" + pre: "" --- 了解如何在 **FixIt** 主题中快速,直观地创建和组织内容。 diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md index 8801aa00..ae10cd26 100644 --- a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md +++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md @@ -16,6 +16,13 @@ tags: ["shortcodes"] categories: ["documentation"] lightgallery: true + +menu: + main: + name: "Extended Shortcodes" + title: "FixIt theme provides multiple shortcodes on top of built-in ones in Hugo." + parent: "documentation" + pre: "" --- **FixIt** theme provides multiple shortcodes on top of built-in ones in Hugo. diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md index 3537d784..dc66eb29 100644 --- a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md @@ -5,7 +5,7 @@ date: 2020-03-03T16:29:59+08:00 draft: false author: "Lruihao" authorLink: "https://lruihao.cn" -description: "FixIt 主题在 Hugo 内置的 shortcode 的基础上提供多个扩展的 shortcode." +description: "FixIt 主题在 Hugo 内置的 shortcode 的基础上提供多个扩展的 shortcode" resources: - name: "featured-image" src: "featured-image.jpg" @@ -19,6 +19,12 @@ lightgallery: true mapbox: lightStyle: mapbox://styles/mapbox/light-zh-v1?optimize=true darkStyle: mapbox://styles/mapbox/dark-zh-v1?optimize=true + +menu: + main: + title: "FixIt 主题在 Hugo 内置的 shortcode 的基础上提供多个扩展的 shortcode" + parent: "documentation" + pre: "" --- **FixIt** 主题在 Hugo 内置的 shortcode 的基础上提供多个扩展的 shortcode.