- {{- block "main" . }}{{- end }}
+ {{- block "main" (dict "P" $P "Page" .Page "Paginate" (.Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections)) "Scratch" .Scratch) }}{{- end }}
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 0e46b87..42c338c 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -8,6 +8,8 @@ baseURL: / theme: hugo-theme-next +mainSections: ["post"] + defaultContentLanguage: zh-cn languages: zh-cn: @@ -304,7 +306,7 @@ params: # Read more button # If true, the read more button will be displayed in excerpt section. - read_more_btn: true + readMoreBtn: true # Post meta display settings postMeta: diff --git a/exampleSite/content/hello-world.md b/exampleSite/content/post/hello-world.md similarity index 100% rename from exampleSite/content/hello-world.md rename to exampleSite/content/post/hello-world.md diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 90a2e4d..c0e501d 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -12,46 +12,48 @@ ColoneFlag: other: ":" SbPostsLable: - other: "日志" + other: 日志 SbCatesTitle: - other: "分类" + other: 分类 SbTagsTitle: - other: "标签" + other: 标签 TableOfContents: - other: "文章目录" + other: 文章目录 SiteOverview: - other: "站点概览" + other: 站点概览 RSSLable: - other: "RSS 订阅" + other: RSS 订阅 CCLinkTitle: - other: "共享知识" + other: 共享知识 BackTopLabel: - other: "返回顶部" + other: 返回顶部 +PostStickyTitle: + other: 置顶 PostPublishDate: - other: "发表于" + other: 发表于 PostPublishTime: - other: "创建时间" + other: 创建时间 PostLastModDate: - other: "更新于" + other: 更新于 PostLastModTime: - other: "修改时间" + other: 修改时间 PostWords: - other: "字数" + other: 字数 PostWordCount: other: "{{- .WordCount -}}" PostReading: - other: "阅读" + other: 阅读 PostReadTime: other: "{{- .ReadingTime -}}分钟" PostVisitor: - other: "浏览数" + other: 浏览数 PostCatg: - other: "分类" + other: 分类 PostTag: - other: "标签" + other: 标签 PostReadMore: - other: "阅读全文" + other: 阅读全文 UserVistorsLabel: other: 总访客量 @@ -59,4 +61,4 @@ PageViewsLabel: other: 总访问量 FooterPowerby: - other: "由 %s 强力驱动" \ No newline at end of file + other: 由 %s 强力驱动 \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 162f3f3..a819ae2 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -40,9 +40,9 @@ {{ partial "widgets" (dict "P" $P) }} -