diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eed83e5..ec90ced2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. - :tada: Feat: add Artalk comment support ([#54](https://github.com/Lruihao/FixIt/issues/54), [#57](https://github.com/Lruihao/FixIt/pull/57)@hiifong) - :tada: Feat: add Waline comment support ([#36](https://github.com/Lruihao/FixIt/issues/36)) - :tada: Feat: add Twikoo comment support ([#64](https://github.com/Lruihao/FixIt/issues/64)) +- :sparkles: Feat: add recently updated section ([#50](https://github.com/Lruihao/FixIt/issues/50)) - :sparkles: Style: add media style for print view ([#61](https://github.com/Lruihao/FixIt/issues/61)) - :sparkles: Feat: add pageStyle option ([#62](https://github.com/Lruihao/FixIt/issues/62)) - :sparkles: Feat: add article expiration reminder support ([#51](https://github.com/Lruihao/FixIt/issues/51)) diff --git a/assets/css/_partial/_archive/_terms.scss b/assets/css/_partial/_archive/_terms.scss index 6af5b53d..66da6b8d 100644 --- a/assets/css/_partial/_archive/_terms.scss +++ b/assets/css/_partial/_archive/_terms.scss @@ -68,7 +68,6 @@ } .archive-item-date { - width: 4em; text-align: right; color: $global-font-secondary-color; white-space: nowrap; diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 46b4946b..87332230 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -591,6 +591,13 @@ enableEmoji = true # amount of RSS pages # RSS 文章数目 rss = 10 + # recently updated posts settings since v0.2.13 + # 最近更新文章设置 since v0.2.13 + [params.section.recentlyUpdated] + enable = true + rss = true + days = 30 + maxCount = 10 # List (category or tag) page config # List (目录或标签) 页面配置 diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 7af8a614..3671293d 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -298,6 +298,12 @@ Please open the code block below to view the complete sample configuration :(far dateFormat = "01-02" # amount of RSS pages rss = 10 + # {{< version 0.2.13 >}} recently updated posts settings + [params.section.recentlyUpdated] + enable = false + rss = false + days = 30 + maxCount = 10 # {{< version 0.2.0 >}} List (category or tag) page config [params.list] 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 28b2c669..b2703f44 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -309,6 +309,12 @@ hugo dateFormat = "01-02" # RSS 文章数目 rss = 10 + # {{< version 0.2.13 >}} 最近更新文章设置 + [params.section.recentlyUpdated] + enable = false + rss = false + days = 30 + maxCount = 10 # {{< version 0.2.0 >}} List(目录或标签)页面配置 [params.list] diff --git a/i18n/en.toml b/i18n/en.toml index fd7a5612..210ff005 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -29,9 +29,13 @@ other = "Category" [categories] other = "Categories" - # === Taxonomy === +# === Section === +[recentlyUpdated] +other = "Recently Updated" +# === Section === + # === Pagination === [more] other = "More" diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml index 2e49e991..468994d3 100644 --- a/i18n/zh-CN.toml +++ b/i18n/zh-CN.toml @@ -30,9 +30,13 @@ other = "分类" [categories] other = "分类" - # === Taxonomy === +# === Section === +[recentlyUpdated] +other = "最近更新" +# === Section === + # === Pagination === [more] other = "更多" diff --git a/i18n/zh-TW.toml b/i18n/zh-TW.toml index fbef6d9e..6d483d7d 100644 --- a/i18n/zh-TW.toml +++ b/i18n/zh-TW.toml @@ -30,9 +30,13 @@ other = "分類" [categories] other = "分類" - # === Taxonomy === +# === Section === +[recentlyUpdated] +other = "最近更新" +# === Section === + # === Pagination === [more] other = "更多" diff --git a/layouts/_default/section.html b/layouts/_default/section.html index f4fa31f2..35cfd2ab 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -17,6 +17,7 @@ {{- else -}} {{- $pages = .Paginate $pages -}} {{- end -}} + {{- partial "recently-updated.html" . -}} {{- range $pages.PageGroups -}}