Skip to content

Commit

Permalink
refactor: use mainSections and more
Browse files Browse the repository at this point in the history
gohugoio/hugoThemes#756

BREAKING CHANGE: postSections & feedSections is removed
  • Loading branch information
reuixiy committed Nov 10, 2019
1 parent 01147f9 commit c6a38e5
Show file tree
Hide file tree
Showing 24 changed files with 25 additions and 400 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ badge | display updated-badge | boolean, override `displayUpdatedBadge` in `conf
gitinfo | display post-gitinfo | boolean, override `displayPostGitInfo` in `config.toml`, theme only
related | display related-posts | boolean, override `displayRelatedPosts` in `config.toml`, theme only
katex | add KaTeX support | boolean, override `enableKaTeX` in `config.toml`, theme only
comments | set `false` to disable comments in postSections or set `true` to enable comments in non-postSections | boolean, theme only
comments | set `false` to disable comments in mainSections or set `true` to enable comments in non-mainSections | boolean, theme only
smallCaps | small caps? | boolean, override `enableSmallCaps` in `config.toml`, theme only
dropCap | drop cap? | boolean, override `enableDropCap` in `config.toml`, theme only
dropCapAfterHr | drop cap after every horizontal rule tag? | boolean, override `enableDropCapAfterHr` in `config.toml`, theme only
Expand Down
2 changes: 1 addition & 1 deletion README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ badge | display updated-badge | boolean, override `displayUpdatedBadge` in `conf
gitinfo | display post-gitinfo | boolean, override `displayPostGitInfo` in `config.toml`, theme only
related | display related-posts | boolean, override `displayRelatedPosts` in `config.toml`, theme only
katex | add KaTeX support | boolean, override `enableKaTeX` in `config.toml`, theme only
comments | set `false` to disable comments in postSections or set `true` to enable comments in non-postSections | boolean, theme only
comments | set `false` to disable comments in mainSections or set `true` to enable comments in non-mainSections | boolean, theme only
smallCaps | small caps? | boolean, override `enableSmallCaps` in `config.toml`, theme only
dropCap | drop cap? | boolean, override `enableDropCap` in `config.toml`, theme only
dropCapAfterHr | drop cap after every horizontal rule tag? | boolean, override `enableDropCapAfterHr` in `config.toml`, theme only
Expand Down
15 changes: 2 additions & 13 deletions config-examples/en-us/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -417,29 +417,18 @@ uglyURLs = false


######################################
# Sections
# Post Sections

# Note: the name of the section is the
# name of the folder under the
# site’s `content` directory.

postSections = ["posts"]

mainSections = ["posts"]
# Note: MemE does not use this object,
# but some of Hugo’s built-in
# templates (such as RSS) may
# use this. So keep this same
# as `postSections` if you need
# to use Hugo’s built-in
# templates extra.
# mainSections = ["posts"]


######################################
# Atom & RSS

feedSections = ["posts"]

# Include full content?
includeContent = true
# Note: If false, only the summary of
Expand Down
16 changes: 2 additions & 14 deletions config-examples/zh-cn/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -391,29 +391,17 @@ uglyURLs = false


######################################
# 分区范围
# 文章分区范围

# 说明:分区的名字即站点的 content 目录下
# 的文件夹的名字。

# 文章分区
postSections = ["posts"]

# 主分区
mainSections = ["posts"]
# 说明:MemE 主题没有使用此项,但 Hugo 的
# 一些内建模板(比如 RSS)可能使用了
# 此项。故如果你需额外地使用 Hugo 的
# 内建模板,请将此项与 postSections
# 保持一致。
# mainSections = ["posts"]


######################################
# Atom & RSS

# 订阅的分区范围
feedSections = ["posts"]

# 是否包括全文内容
includeContent = true
# 说明:如果否,则只会包含文章的摘要。关于摘
Expand Down
29 changes: 0 additions & 29 deletions exampleSite/content/about/_index.md

This file was deleted.

37 changes: 0 additions & 37 deletions exampleSite/content/posts/emoji-support.md

This file was deleted.

142 changes: 0 additions & 142 deletions exampleSite/content/posts/markdown-syntax.md

This file was deleted.

46 changes: 0 additions & 46 deletions exampleSite/content/posts/math-typesetting.md

This file was deleted.

59 changes: 0 additions & 59 deletions exampleSite/content/posts/placeholder-text.md

This file was deleted.

Loading

0 comments on commit c6a38e5

Please sign in to comment.