chore: rm version detection and refactor config

This commit is contained in:
Dillon
2022-05-08 02:30:22 +08:00
parent 857047a7a1
commit c878a747d7
17 changed files with 1096 additions and 520 deletions

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "This article shows the basic Markdown syntax and format."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.png"

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "这篇文章展示了基本的 Markdown 语法和格式."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.png"

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Guide to emoji usage in Hugo and LoveIt."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.jpg"

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Hugo 和 LoveIt 中的 Emoji 的用法指南."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.jpg"

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Discover what the Hugo - LoveIt theme is all about and the core-concepts behind it."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.jpg"
@@ -85,10 +86,6 @@ title = "My New Hugo Site"
# Change the default theme to be use when building the site with Hugo
theme = "LoveIt"
[params]
# LoveIt theme version
version = "0.2.X"
[menu]
[[menu.main]]
identifier = "posts"
@@ -194,12 +191,6 @@ Please open the code block below to view the complete sample configuration :(far
```toml
[params]
# {{< version 0.2.0 changed >}} LoveIt theme version
version = "0.2.X"
# site description
description = "This is My New Hugo Site"
# site keywords
keywords = ["Theme", "Hugo"]
# site default theme ("light", "dark", "auto")
defaultTheme = "auto"
# public git repo url only then enableGitInfo is true
@@ -209,46 +200,13 @@ Please open the code block below to view the complete sample configuration :(far
fingerprint = ""
# {{< version 0.2.0 >}} date format
dateFormat = "2006-01-02"
# website title for Open Graph and Twitter Cards
title = "My cool site"
# website description for RSS, SEO, Open Graph and Twitter Cards
description = "This is my cool site"
# website images for Open Graph and Twitter Cards
images = ["/logo.png"]
# {{< version 0.2.0 >}} App icon config
[params.app]
# optional site title override for the app when added to an iOS home screen or Android launcher
title = "LoveIt"
# whether to omit favicon resource links
noFavicon = false
# modern SVG favicon to use in place of older style .png and .ico files
svgFavicon = ""
# Android browser theme color
themeColor = "#ffffff"
# Safari mask icon color
iconColor = "#5bbad5"
# Windows v8-10 tile color
tileColor = "#da532c"
# {{< version 0.2.0 >}} Search config
[params.search]
enable = true
# type of search engine ("lunr", "algolia")
type = "lunr"
# max index length of the chunked content
contentLength = 4000
# placeholder of the search bar
placeholder = ""
# {{< version 0.2.1 >}} max number of results length
maxResultLength = 10
# {{< version 0.2.3 >}} snippet length of the result
snippetLength = 30
# {{< version 0.2.1 >}} HTML tag name of the highlight part in results
highlightTag = "em"
# {{< version 0.2.4 >}} whether to use the absolute URL based on the baseURL in search index
absoluteURL = false
[params.search.algolia]
index = ""
appID = ""
searchKey = ""
# Header config
[params.header]
# desktop header mode ("fixed", "normal", "auto")
@@ -304,6 +262,43 @@ Please open the code block below to view the complete sample configuration :(far
# amount of RSS pages
rss = 10
# {{< version 0.2.0 >}} App icon config
[params.app]
# optional site title override for the app when added to an iOS home screen or Android launcher
title = "My cool site"
# whether to omit favicon resource links
noFavicon = false
# modern SVG favicon to use in place of older style .png and .ico files
svgFavicon = ""
# Android browser theme color
themeColor = "#ffffff"
# Safari mask icon color
iconColor = "#5bbad5"
# Windows v8-10 tile color
tileColor = "#da532c"
# {{< version 0.2.0 >}} Search config
[params.search]
enable = true
# type of search engine ("lunr", "algolia")
type = "lunr"
# max index length of the chunked content
contentLength = 4000
# placeholder of the search bar
placeholder = ""
# {{< version 0.2.1 >}} max number of results length
maxResultLength = 10
# {{< version 0.2.3 >}} snippet length of the result
snippetLength = 30
# {{< version 0.2.1 >}} HTML tag name of the highlight part in results
highlightTag = "em"
# {{< version 0.2.4 >}} whether to use the absolute URL based on the baseURL in search index
absoluteURL = false
[params.search.algolia]
index = ""
appID = ""
searchKey = ""
# Home page config
[params.home]
# {{< version 0.2.0 >}} amount of RSS pages
@@ -401,7 +396,7 @@ Please open the code block below to view the complete sample configuration :(far
Email = "xxxx@xxxx.com"
RSS = true # {{< version 0.2.0 >}}
# {{< version 0.2.0 changed >}} Page config
# {{< version 0.2.0 changed >}} Page global config
[params.page]
# {{< version 0.2.0 >}} whether to hide a page from home page
hiddenFromHomePage = false
@@ -496,7 +491,7 @@ Please open the code block below to view the complete sample configuration :(far
Mix = false
# {{< version 0.2.0 changed >}} Comment config
[params.page.comment]
enable = true
enable = false
# {{< link "https://disqus.com/" Disqus >}} comment config
[params.page.comment.disqus]
# {{< version 0.1.1 >}}

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "探索 Hugo - LoveIt 主题的全部内容和背后的核心概念."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.jpg"
@@ -197,12 +198,6 @@ hugo
```toml
[params]
# {{< version 0.2.0 changed >}} LoveIt 主题版本
version = "0.2.X"
# 网站描述
description = "这是我的全新 Hugo 网站"
# 网站关键词
keywords = ["Theme", "Hugo"]
# 网站默认主题样式 ("light", "dark", "auto")
defaultTheme = "auto"
# 公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
@@ -212,46 +207,13 @@ hugo
fingerprint = ""
# {{< version 0.2.0 >}} 日期格式
dateFormat = "2006-01-02"
# 网站标题, 用于 Open Graph 和 Twitter Cards
title = "我的网站"
# 网站描述, 用于 RSS, SEO, Open Graph 和 Twitter Cards
description = "这是我的全新 Hugo 网站"
# 网站图片, 用于 Open Graph 和 Twitter Cards
images = ["/logo.png"]
# {{< version 0.2.0 >}} 应用图标配置
[params.app]
# 当添加到 iOS 主屏幕或者 Android 启动器时的标题, 覆盖默认标题
title = "LoveIt"
# 是否隐藏网站图标资源链接
noFavicon = false
# 更现代的 SVG 网站图标, 可替代旧的 .png 和 .ico 文件
svgFavicon = ""
# Android 浏览器主题色
themeColor = "#ffffff"
# Safari 图标颜色
iconColor = "#5bbad5"
# Windows v8-10磁贴颜色
tileColor = "#da532c"
# {{< version 0.2.0 >}} 搜索配置
[params.search]
enable = true
# 搜索引擎的类型 ("lunr", "algolia")
type = "lunr"
# 文章内容最长索引长度
contentLength = 4000
# 搜索框的占位提示语
placeholder = ""
# {{< version 0.2.1 >}} 最大结果数目
maxResultLength = 10
# {{< version 0.2.3 >}} 结果内容片段长度
snippetLength = 50
# {{< version 0.2.1 >}} 搜索结果中高亮部分的 HTML 标签
highlightTag = "em"
# {{< version 0.2.4 >}} 是否在搜索索引中使用基于 baseURL 的绝对路径
absoluteURL = false
[params.search.algolia]
index = ""
appID = ""
searchKey = ""
# 页面头部导航栏配置
[params.header]
# 桌面端导航栏模式 ("fixed", "normal", "auto")
@@ -307,6 +269,43 @@ hugo
# RSS 文章数目
rss = 10
# {{< version 0.2.0 >}} 应用图标配置
[params.app]
# 当添加到 iOS 主屏幕或者 Android 启动器时的标题, 覆盖默认标题
title = "我的网站"
# 是否隐藏网站图标资源链接
noFavicon = false
# 更现代的 SVG 网站图标, 可替代旧的 .png 和 .ico 文件
svgFavicon = ""
# Android 浏览器主题色
themeColor = "#ffffff"
# Safari 图标颜色
iconColor = "#5bbad5"
# Windows v8-10磁贴颜色
tileColor = "#da532c"
# {{< version 0.2.0 >}} 搜索配置
[params.search]
enable = true
# 搜索引擎的类型 ("lunr", "algolia")
type = "lunr"
# 文章内容最长索引长度
contentLength = 4000
# 搜索框的占位提示语
placeholder = ""
# {{< version 0.2.1 >}} 最大结果数目
maxResultLength = 10
# {{< version 0.2.3 >}} 结果内容片段长度
snippetLength = 50
# {{< version 0.2.1 >}} 搜索结果中高亮部分的 HTML 标签
highlightTag = "em"
# {{< version 0.2.4 >}} 是否在搜索索引中使用基于 baseURL 的绝对路径
absoluteURL = false
[params.search.algolia]
index = ""
appID = ""
searchKey = ""
# 主页配置
[params.home]
# {{< version 0.2.0 >}} RSS 文章数目
@@ -404,7 +403,7 @@ hugo
Email = "xxxx@xxxx.com"
RSS = true # {{< version 0.2.0 >}}
# {{< version 0.2.0 changed >}} 文章页面配置
# {{< version 0.2.0 changed >}} 文章页面全局配置
[params.page]
# {{< version 0.2.0 >}} 是否在主页隐藏一篇文章
hiddenFromHomePage = false
@@ -499,7 +498,7 @@ hugo
Mix = false
# {{< version 0.2.0 changed >}} 评论系统设置
[params.page.comment]
enable = true
enable = false
# {{< link "https://disqus.com/" Disqus >}} 评论系统设置
[params.page.comment.disqus]
# {{< version 0.1.1 >}}

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Hugo provides multiple built-in shortcodes for author convenience and to keep your markdown content clean."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.png"

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Hugo 提供了多个内置的 Shortcodes, 以方便作者保持 Markdown 内容的整洁."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.png"

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Find out how to create and organize your content quickly and intuitively in LoveIt theme."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.jpg"

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "了解如何在 LoveIt 主题中快速, 直观地创建和组织内容."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.jpg"

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "LoveIt theme provides multiple shortcodes on top of built-in ones in Hugo."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.jpg"

View File

@@ -7,6 +7,7 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "LoveIt 主题在 Hugo 内置的 shortcode 的基础上提供多个扩展的 shortcode."
images: ["featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.jpg"