Skip to content

Commit

Permalink
Chore: 更新主题 (hugo-fixit/FixIt#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Aug 24, 2024
1 parent 2fdd837 commit 2f9b51d
Show file tree
Hide file tree
Showing 13 changed files with 135 additions and 128 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/algolia-atomic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
ALGOLIA_APP_ID: YKOM6PKLUY
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_INDEX_NAME: "index.en"
ALGOLIA_INDEX_FILE: "./public/index.json"
ALGOLIA_INDEX_FILE: "./public/search.json"
run: |
npm run algolia
Expand All @@ -50,6 +50,6 @@ jobs:
ALGOLIA_APP_ID: YKOM6PKLUY
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_INDEX_NAME: "index.zh-cn"
ALGOLIA_INDEX_FILE: "./public/zh-cn/index.json"
ALGOLIA_INDEX_FILE: "./public/zh-cn/search.json"
run: |
npm run algolia
1 change: 1 addition & 0 deletions config/_default/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ capitalizeListTitles = false
ignoreLogs = [
"error-get-remote-image",
"error-get-remote-json",
"error-get-gh-repo",
"error-remote-getjson",
"error-missing-instagram-accesstoken",
"err-youtube-remote",
Expand Down
47 changes: 0 additions & 47 deletions config/_default/outputFormats.toml

This file was deleted.

22 changes: 12 additions & 10 deletions config/_default/outputs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
# See: https://gohugo.io/templates/output-formats/#customizing-output-formats
# -------------------------------------------------------------------------------------

_merge = "shollow"

# Options to make hugo output files, the optional values are below:
# 用于 Hugo 输出文档的设置,可选值如下:
# home: ["HTML", "RSS", "JSON", "archives", "offline", "README", "baidu_urls"]
# page: ["HTML", "MarkDown"]
# section: ["HTML", "RSS"]
# taxonomy: ["HTML", "RSS"]
# term: ["HTML", "RSS"]
home = ["HTML", "RSS", "JSON", "archives", "offline", "README", "baidu_urls"]
page = ["HTML", "MarkDown"]
section = ["HTML", "RSS"]
taxonomy = ["HTML"]
term = ["HTML", "RSS"]
# home = ["html", "rss", "archives", "offline", "readme", "baidu_urls", "search"]
# page = ["html", "markdown"]
# section = ["html", "rss"]
# taxonomy = ["html"]
# term = ["html", "rss"]
home = ["html", "rss", "archives", "offline", "readme", "baidu_urls", "search"]
page = ["html", "markdown"]
section = ["html", "rss"]
taxonomy = ["html"]
term = ["html", "rss"]
43 changes: 31 additions & 12 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ titleDelimiter = "|"
# remember to set up your site subtitle by `params.header.subtitle.name`
# FixIt 0.3.0 | 新增 是否在主页标题中添加网站副标题
# 请记得通过 `params.header.subtitle.name` 设置网站副标题
indexWithSubtitle = false
indexWithSubtitle = true
# FixIt 0.2.14 | NEW FixIt will, by default, inject a theme meta tag in the HTML head on the home page only.
# You can turn it off, but we would really appreciate if you don’t, as this is a good way to watch FixIt's popularity on the rise.
# FixIt 0.2.14 | 新增 默认情况下,FixIt 只会在主页的 HTML 头中注入主题元标记。
Expand Down Expand Up @@ -168,7 +168,7 @@ disableThemeInject = false
[header.subtitle]
# subtitle name
# 副标题名称
name = ""
name = "Theme for Hugo"
# whether to use typeit animation for subtitle name
# 是否为副标题显示打字机动画
typeit = false
Expand Down Expand Up @@ -247,9 +247,15 @@ disableThemeInject = false
# date format (month and day)
# 日期格式 (月和日)
dateFormat = "01-02"
# amount of RSS pages
# RSS 文章数目
rss = 10
# FixIt 0.3.10 | NEW Section feed config for RSS, Atom and JSON feed.
# FixIt 0.3.10 | 新增 Section feed 配置用于 RSS, Atom 和 JSON feed。
[section.feed]
# The number of posts to include in the feed. If set to -1, all posts.
# 包含在 feed 中的文章数目。如果设置为 -1,代表所有文章。
limit = -1
# whether to show the full text content in feed.
# 是否在 feed 中显示全文内容。
fullText = false
# FixIt 0.2.13 | NEW recently updated posts settings
# FixIt 0.2.13 | 新增 最近更新文章设置
[section.recentlyUpdated]
Expand All @@ -267,9 +273,15 @@ disableThemeInject = false
# date format (month and day)
# 日期格式 (月和日)
dateFormat = "01-02"
# amount of RSS pages
# RSS 文章数目
rss = 10
# FixIt 0.3.10 | NEW Term list feed config for RSS, Atom and JSON feed.
# FixIt 0.3.10 | 新增 Term list feed 配置用于 RSS, Atom 和 JSON feed。
[list.feed]
# The number of posts to include in the feed. If set to -1, all posts.
# 包含在 feed 中的文章数目。如果设置为 -1,代表所有文章。
limit = -1
# whether to show the full text content in feed.
# 是否在 feed 中显示全文内容。
fullText = false

# TagCloud config for tags page
# 标签云配置
Expand Down Expand Up @@ -641,6 +653,16 @@ disableThemeInject = false
# "corner-indicator", "fill-left", "flash", "flat-top", "loading-bar", "mac-osx", "material", "minimal"]
theme = "minimal"

# FixIt 0.3.10 | NEW Global Feed config for RSS, Atom and JSON feed.
# FixIt 0.3.10 | 新增 全局 Feed 配置用于 RSS, Atom 和 JSON feed。
[feed]
# The number of posts to include in the feed. If set to -1, all posts.
# 包含在 feed 中的文章数目。如果设置为 -1,代表所有文章。
limit = 10
# whether to show the full text content in feed.
# 是否在 feed 中显示全文内容。
fullText = true

# FixIt 0.2.15 | NEW Developer options
# FixIt 0.2.15 | 新增 开发者选项
# Select the scope named `public_repo` to generate personal access token,
Expand Down Expand Up @@ -680,7 +702,7 @@ disableThemeInject = false
hiddenFromSearch = false
# FixIt 0.3.0 | NEW whether to hide a page from RSS feed
# FixIt 0.3.0 | 新增 是否在 RSS 中隐藏一篇文章
hiddenFromRss = false
hiddenFromFeed = false
# FixIt 0.3.0 | NEW whether to hide a page from related posts
# FixIt 0.3.0 | 新增 是否在相关文章中隐藏一篇文章
hiddenFromRelated = false
Expand Down Expand Up @@ -718,9 +740,6 @@ disableThemeInject = false
# whether to show link to report issue for the post
# 是否显示报告文章问题的链接
linkToReport = true
# whether to show the full text content in RSS
# 是否在 RSS 中显示全文内容
rssFullText = false
# FixIt 0.3.10 | CHANGED Page style ["narrow", "normal", "wide", ...)
# FixIt 0.3.10 | 更改 页面样式 ["narrow", "normal", "wide", ...)
pageStyle = "normal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ hugo new --kind post-bundle posts/bar/
- **hiddenFromHomePage**: if `true`, the content will not be shown in the home page.
- **hiddenFromSearch**: if `true`, the content will not be shown in the search results.
- **hiddenFromRss**: {{< version 0.2.18-lts.5 >}} if `true`, the content will not be shown in the RSS feed.
- **hiddenFromRelated**: {{< version 0.3.0 >}} if `true`, the content will not be shown in the related posts.
- **hiddenFromFeed**: {{< version 0.3.10 >}} if `true`, the content will not be shown in the RSS, Atom and JSON feed.
- **twemoji**: if `true`, the content will enable the twemoji.
- **lightgallery**: {{< version 0.2.18 changed >}} the same as the `params.page.lightgallery` part in the [theme configuration][theme-config].
- **ruby**: if `true`, the content will enable the [ruby extended syntax][extended-markdown-syntax].
Expand All @@ -153,7 +153,6 @@ hugo new --kind post-bundle posts/bar/
- **linkToSource**: {{< version 0.3.0 >}} if `true`, the footer of the content will be shown the link to the source file.
- **linkToEdit**: {{< version 0.3.0 >}} if `true`, the footer of the content will be shown the link to the edit page.
- **linkToReport**: {{< version 0.3.0 >}} if `true`, the footer of the content will be shown the link to the report issue.
- **rssFullText**: if `true`, the full text content will be shown in RSS.
- **pageStyle**: {{< version 0.2.13 >}} Detail see [Page Style][page-style].

- **toc**: the same as the `params.page.toc` part in the [theme configuration][theme-config].
Expand All @@ -179,6 +178,7 @@ hugo new --kind post-bundle posts/bar/
- **endFlag**: {{< version 0.2.17 >}} the same as the `params.page.endFlag` part in the [theme configuration][theme-config].
- **reward**: {{< version 0.2.17 >}} the same as the `params.page.reward` part in the [theme configuration][theme-config].
- **instantPage**: {{< version 0.2.18 >}} the same as the `params.page.instantPage` part in the [theme configuration][theme-config].
- **feed**: {{< version 0.3.10 >}} the same as the `params.feed` part in the [theme configuration][theme-config].

<!-- front matter for section only -->

Expand Down Expand Up @@ -229,7 +229,6 @@ ruby: true
fraction: true
fontawesome: true
linkToMarkdown: true
rssFullText: false
pageStyle: "normal"
toc:
Expand Down
43 changes: 31 additions & 12 deletions content/en/documentation/getting-started/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@ fuse

Based on [algolia][algolia] or [Fuse.js][fusejs], searching is supported in **FixIt** theme.

In order to generate `index.json` for searching, add `JSON` output file type to the `home` of the `outputs` part in your site configuration.
In order to generate `search.json` for searching, add `search` output file type to the `home` of the `outputs` part in your site configuration.

```toml
[outputs]
home = ["HTML", "RSS", "JSON"]
home = ["html", "rss", "archives", "search"]
```

{{< link href="/guides/algolia-atomic" content="Tips about algolia" card=true >}}
Expand Down Expand Up @@ -603,7 +603,9 @@ dateFormat
[params.section]
paginate = 20
dateFormat = "01-02"
rss = 10
[params.section.feed]
limit = -1
fullText = false
[params.section.recentlyUpdated]
enable = false
rss = false
Expand All @@ -617,8 +619,9 @@ paginate
dateFormat
: `string` Date format (month and day). Default is `01-02`.

rss
: `int` Amount of RSS pages. Default is `10`.
feed
: {{< version 0.3.10 >}}\
`map` Section feed config for RSS, Atom and JSON feed. See [Feed config](#feed).

recentlyUpdated
: {{< version 0.2.13 >}}\
Expand All @@ -638,7 +641,9 @@ recentlyUpdated
[params.list]
paginate = 20
dateFormat = "01-02"
rss = 10
[params.list.feed]
limit = -1
fullText = false
```

paginate
Expand All @@ -647,8 +652,9 @@ paginate
dateFormat
: `string` Date format (month and day). Default is `01-02`.

rss
: `int` Amount of RSS pages. Default is `10`.
feed
: {{< version 0.3.10 >}}\
`map` Term list feed config for RSS, Atom and JSON feed. See [Feed config](#feed).

### tagcloud

Expand Down Expand Up @@ -1098,6 +1104,21 @@ dark
height
: `string` The height of reading progress bar. Default is `2px`.

### feed

{{< version 0.3.10 >}}

`map` Global Feed config for RSS, Atom and JSON feed. Default is as follows:

```toml
[params]
[params.feed]
# The number of posts to include in the feed. If set to -1, all posts.
limit = 10
# whether to show the full text content in feed.
fullText = true
```

### pace

{{< version 0.2.17 >}}
Expand Down Expand Up @@ -1164,10 +1185,10 @@ mDevtools
hiddenFromHomePage = false
# whether to hide a page from search results
hiddenFromSearch = false
# {{< version 0.2.18-lts.5 >}} whether to hide a page from RSS feed
hiddenFromRss = false
# {{< version 0.3.0 >}} whether to hide a page from related posts
hiddenFromRelated = false
# {{< version 0.3.10 >}} whether to hide a page from RSS, Atom and JSON feed
hiddenFromFeed = false
# whether to enable twemoji
twemoji = false
# {{< version 0.2.18 changed >}} whether to enable lightgallery
Expand All @@ -1190,8 +1211,6 @@ mDevtools
linkToEdit = true
# {{< version 0.3.0 >}} whether to show link to report issue for the post
linkToReport = true
# whether to show the full text content in RSS
rssFullText = false
# {{< version 0.3.10 changed >}} Page style ["narrow", "normal", "wide", ...]
pageStyle = "normal"
# {{< version 0.2.17 changed >}} Auto Bookmark Support
Expand Down
Loading

0 comments on commit 2f9b51d

Please sign in to comment.