+ {{ .Title }} +
++ {{ .Description }} +
+From bbb0f9be0d92924ab44d80084092ccb5c36554c4 Mon Sep 17 00:00:00 2001 From: Weaxs <459312872@qq.com> Date: Thu, 14 Mar 2024 01:31:31 +0800 Subject: [PATCH 01/10] translate welcome && update i18n --- exampleSite/config/_default/menus.zh-cn.toml | 4 +- exampleSite/content/docs/_index.zh-cn.md | 17 ++++ .../content/docs/installation/index.zh-cn.md | 10 ++ .../content/docs/welcome/index.zh-cn.md | 92 +++++++++++++++++++ i18n/zh-CN.yaml | 2 +- i18n/zh-TW.yaml | 2 +- 6 files changed, 123 insertions(+), 4 deletions(-) create mode 100644 exampleSite/content/docs/installation/index.zh-cn.md create mode 100644 exampleSite/content/docs/welcome/index.zh-cn.md diff --git a/exampleSite/config/_default/menus.zh-cn.toml b/exampleSite/config/_default/menus.zh-cn.toml index bbc9cd54..df6d1f24 100644 --- a/exampleSite/config/_default/menus.zh-cn.toml +++ b/exampleSite/config/_default/menus.zh-cn.toml @@ -16,7 +16,7 @@ weight = 10 [[main]] - name = "Shortcodes" + name = "短代码" pageRef = "docs/shortcodes" weight = 15 @@ -48,7 +48,7 @@ weight = 90 [[main]] - name = "Merch" + name = "周边" url = "https://www.teepublic.com/user/blowfish-store/t-shirts" weight = 100 diff --git a/exampleSite/content/docs/_index.zh-cn.md b/exampleSite/content/docs/_index.zh-cn.md index e69de29b..5fff704f 100644 --- a/exampleSite/content/docs/_index.zh-cn.md +++ b/exampleSite/content/docs/_index.zh-cn.md @@ -0,0 +1,17 @@ +--- +title: "文档" +description: "如何使用 Blowfish。" + +cascade: + showDate: false + showAuthor: false + invertPagination: true +--- + +{{< lead >}} +了解如何使用简单而强大的 Blowfish。 +{{< /lead >}} + +本章节包含了你需要了解的有关 Blowfish 的所有信息。如果你是新用户,请查阅[安装]({{< ref "docs/installation" >}}) 指南,或者访问[示例]({{< ref "samples" >}}) 来了解 Blowfish 能做什么。 + +--- diff --git a/exampleSite/content/docs/installation/index.zh-cn.md b/exampleSite/content/docs/installation/index.zh-cn.md new file mode 100644 index 00000000..b4482a60 --- /dev/null +++ b/exampleSite/content/docs/installation/index.zh-cn.md @@ -0,0 +1,10 @@ +--- +title: "Installation" +date: 2020-08-16 +draft: false +description: "How to install the Blowfish theme." +slug: "installation" +tags: ["installation", "docs"] +series: ["Documentation"] +series_order: 2 +--- diff --git a/exampleSite/content/docs/welcome/index.zh-cn.md b/exampleSite/content/docs/welcome/index.zh-cn.md new file mode 100644 index 00000000..d59a7167 --- /dev/null +++ b/exampleSite/content/docs/welcome/index.zh-cn.md @@ -0,0 +1,92 @@ +--- +title: "欢迎来到 Blowfish" +date: 2022-01-19 +draft: false +description: "探索 Blowfish 2.0版本的新功能。" +tags: ["新用户", "文档"] +series: ["文档"] +series_order: 1 +--- + +{{< lead >}} +Blowfish 包含了大量的特性功能。 +{{< /lead >}} + +Blowfish 的目标是开发一个简单且轻量级的主题。 该主题是 Congo 的一个分支,并进行了大量扩展。 + +## Tailwind CSS 3.0 + +Tailwind CSS 是 Blowfish 的核心,当前版本包含了最新的[Tailwind CSS version 3](https://tailwindcss.com/blog/tailwindcss-v3)。 +Tailwind CSS 带来了性能优化,并提供了一些出色的新的 CSS 特性。 + + +{{< youtube "TmWIrBPE6Bc" >}} + +## 多语言支持 + +这是一个高频需求,Blowfish 现在支持多语言! +如果你使用多语言发布你的内容,网站将会构建包含所有可用翻译的版本。 +A highly requested feature, Blowfish is now multilingual! If you publish your content in multiple languages, the site will be built with all the translations available. + +
`代码块复制到剪贴板。想要使用代码复制功能,需要将 `highlight.noClasses` 参数设置为 `false`。 阅读 [其他配置文件](#other-configuration-files) 以获取更多信息。 |
+| `mainSections` | 无 | 指定最近文章中应该展示的模块。 如果没有指定,则使用文章数量最多的板块。 |
+| `showViews` | 无 | 是否显示文章和列表页面的阅读量。这需要集成 firebase ,具体可以看下面。 |
+| `showLikes` | 无 | 是否显示文章和列表页面的喜爱数。这需要集成 firebase ,具体可以看下面。 |
+| `robots` | 无 | 用于支持搜索引擎爬虫如何处理你的网站。如果设置了该值,它将被输出在页面头部。具体的参数值请参考 [Google 文档](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives)。 |
+| `disableImageZoom` | `false` | 禁用网站上所有图片缩放功能。 |
+| `disableImageOptimization` | `false` | 禁用图片上所有图片的调整大小和优化功能。 |
+| `disableTextInHeader` | `false` | 禁用文本类型的标题,对基于 logo 的标题很有用。 |
+| `defaultBackgroundImage` | 无 | 设置默认背景图,用于 `background` 和 `hero` 布局下的主页。 |
+| `defaultFeaturedImage` | 无 | 设置默认背景图片,用于所有文章的`featured`图片,可以通过文章目录中的 `featured` 图片替换。 |
+| `highlightCurrentMenuArea` | 无 | 当菜单被选择时,标记主菜单中的菜单项。 |
+| `smartTOC` | 无 | 开启智能目录,视图中的项目将会被高亮显示。 |
+| `smartTOCHideUnfocusedChildren` | 无 | 当开启智能目录,如果目录级别不再被聚焦时,将会隐藏更深层次的目录。 |
+
+### 页头
+
+| 名称 | 默认值 | 描述 |
+| --------------- | --------- |----------------------------------------------------------------------------|
+| `header.layout` | `"basic"` | 定义整个站点的页头的布局,支持的参数有 `basic`、`fixed`、`fixed-fill`、and `fixed-fill-blur`. |
+
+### 页脚
+
+| 名称 | 默认值 | 描述 |
+| ------------------------------- | ------- |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `footer.showMenu` | `true` | 显示/隐藏页面底部菜单,该菜单可以在 `config/_default/menus.en.toml` 文件中的 `[[footer]]` 部分进行配置。 |
+| `footer.showCopyright` | `true` | 是否在底部显示 copyright 版权信息。请注意,如果你想定制,可以在[语言配置](#language-and-i18n)中使用 `copyright` 参数。 |
+| `footer.showThemeAttribution` | `true` | 是否在网站底部中显示"powered by" 的主题归属信息。如果禁用此参数,请考虑在你网站的其他位置设置主题归属信息,例如在关于页面。 |
+| `footer.showAppearanceSwitcher` | `false` | 是否在也页面底部显示外观切换器。浏览器的本地存储会缓存访问者的偏好设置。 |
+| `footer.showScrollToTop` | `true` | 当设置为 `true` 时,显示返回顶部的箭头按钮。 |
+
+### 主页
+
+| 名称 | 默认值 | 描述 |
+| ------------------------------- | ----------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `homepage.layout` | `"profile"` | 首页布局参数。合法的参数值有: `page`、`profile`、`hero`、`card`、`background` 或 `custom`。当你设置为 `custom` 时,你必须创建 `/layouts/partials/home/custom.html` 文件以定制自己的布局。参考[主页布局]({{< ref "homepage-layout" >}})来获取更多信息。 |
+| `homepage.homepageImage` | 无 | 在 `hero` 和 `card` 布局中使用的图像。图片可以来自于本地的资源目录,也可以是外部图像 URL。参考 [主页布局]({{< ref "homepage-layout" >}}) 来获取更多信息。 |
+| `homepage.showRecent` | `false` | 是否在主页展示最新文章列表。 |
+| `homepage.showRecentItems` | 5 | 如果将 `showRecent` 设置为 `true`,此参数用于显示多少篇文章。如果没有设置或者为0,则默认显示5篇文章。 |
+| `homepage.showMoreLink` | `false` | 是否在主页底部添加“显示更多”,该链接会降会用带到一个预定义位置。 |
+| `homepage.showMoreLinkDest` | `/posts` | 更多按钮所指向的位置。 |
+| `homepage.cardView` | `false` | 将列表展示为卡片容器。 |
+| `homepage.cardViewScreenWidth` | `false` | 增强列表中卡片的宽度,使其可以占据可用的全部宽度。 |
+| `homepage.layoutBackgroundBlur` | `false` | 向下滚动主页时,是否模糊背景图。 |
+
+### 文章页
+
+| 名称 | 默认值 | 描述 |
+| ------------------------------------- | --------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `article.showDate` | `true` | 是否显示日期。 |
+| `article.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 |
+| `article.showLikes` | `false` | 是否显示文章喜爱数。这需要集成 firebase ,具体可以看下面。 |
+| `article.showDateOnlyInArticle` | `false` | 是否在文章内显示日期,不影响文章列表或卡片页面的日期显示。 |
+| `article.showDateUpdated` | `false` | 是否展示文章的更新日期。 |
+| `article.showAuthor` | `true` | 是否在文章底部显示作者框。 |
+| `article.showHero` | `false` | 缩略图是否会在每个页面中作为 hero 图像显示。 |
+| `article.heroStyle` | 无 | hero 图像的展示样式,可选的参数值有:`basic`、`big`、`background`、`thumbAndBackground`。 |
+| `article.layoutBackgroundBlur` | `true` | 向下滚动文章页时,是否模糊背景图。 |
+| `article.layoutBackgroundHeaderSpace` | `true` | 在标题和正文之间添加空白区域间隔。 |
+| `article.showBreadcrumbs` | `false` | 是否在标题栏显示面包屑导航。 |
+| `article.showDraftLabel` | `true` | 当使用 `--buildDrafts` 构建网站时,是否在文章旁边显示草稿。 |
+| `article.showEdit` | `false` | 是否展示编辑文章的链接。 |
+| `article.editURL` | 无 | 当激活 `article.showEdit` 参数,此参数用于设置文章的编辑链接。 |
+| `article.editAppendPath` | `true` | 当激活 `article.showEdit` 参数,是否将文章的路径附加到 `article.editURL` 参数所设置的 URL 后面。 |
+| `article.seriesOpened` | `false` | 是否默认显示打开系列模块、 |
+| `article.showHeadingAnchors` | `true` | 是否在文章标题旁添加锚点。 |
+| `article.showPagination` | `true` | 是否在文章末尾展示上一篇/下一篇的文章链接。 |
+| `article.invertPagination` | `false` | 是否翻转下一篇/上一篇文章链接的方向。 |
+| `article.showReadingTime` | `true` | 是否展示文章的阅读时间。如果你的语言包含 CJK 语言,需要在 `config.toml` 中开启 `hasCJKLanguage` 参数。 |
+| `article.showTableOfContents` | `false` | 是否展示文章的目录。 |
+| `article.showRelatedContent` | `false` | 为文章显示相关内容。如果你想要启用此功能,请检查 `config.toml` 文件并复制所有 *related* 相关的参数,如果你想自定义,也可以对 `config.toml` 添加额外配置。更多内容请参考 [Hugo 文档](https://gohugo.io/content-management/related/) 中关于 *related* 的内容。 |
+| `article.relatedContentLimit` | `3` | 如果启用`showRelatedContent`,则限制显示相关文章的数量。 |
+| `article.showTaxonomies` | `false` | 是否显示文章的分类或标签信息。 |
+| `article.showAuthorsBadges` | `false` | 是否在文章或列表中显示 `authors` 分类。这需要开启多个作者 `multiple authors` 和 `authors` 分类法。 请阅读 [这个网页]({{< ref "multi-author" >}}) 来获取更多内容。 |
+| `article.showWordCount` | `false` | 是否显示文章的字数。 如果你的语言包含 CJK 语言,需要在 `config.toml` 中开启 `hasCJKLanguage` 参数。 |
+| `article.showComments` | `false` | 是否在文章末尾添加 [评论部分]({{< ref "partials#comments" >}})。 |
+| `article.sharingLinks` | 无 | 在文章末尾显示的分享链接。如果没有提供或设置为 `false`,则不会显示任何分享链接。可用的值包括:"linkedin"、"twitter"、"reddit"、"pinterest"、"facebook"、"email"、"whatsapp" 和 "telegram" |
+| `article.showZenMode` | `false` | 指定是否激活文章阅读的禅模式,即隐藏常规的界面元素。 |
+
+### 列表页
+
+| 名称 | 默认值 | 描述 |
+| ---------------------------------- | --------- |--------------------------------------------------------------------------------------------------------------------------|
+| `list.showHero` | `false` | 缩略图是否会在每个页面中作为 hero 图像显示。 |
+| `list.heroStyle` | 无 | hero 图像的展示样式,可选的参数值有:`basic`、`big`、`background`、`thumbAndBackground`。 |
+| `list.showBreadcrumbs` | `false` | 是否在标题栏显示面包屑导航。 |
+| `list.layoutBackgroundBlur` | `true` | 向下滚动列表页时,是否模糊背景图。 |
+| `list.layoutBackgroundHeaderSpace` | `true` | 在标题和正文之间添加空白区域间隔。 |
+| `list.showTableOfContents` | `false` | 是否展示目录。 |
+| `list.showSummary` | `false` | 是否在列表页显示文章摘要。如果在[扉页参数]({{< ref "front-matter" >}})中没有提供摘要,那么将会使用[站点配置](#site-configuration) 中的 `summaryLength` 参数自动生成一个。 |
+| `list.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 |
+| `list.showLikes` | `false` | 是否显示文章喜爱数。这需要集成 firebase ,具体可以看下面。 |
+| `list.showCards` | `false` | 是否将每个文章显示未卡片或简单的内联文本。 |
+| `list.groupByYear` | `true` | 是否根据年做聚合。 |
+| `list.cardView` | `false` | 将列表展示为卡片容器。 |
+| `list.cardViewScreenWidth` | `false` | 增强列表中卡片的宽度,使其可以占据可用的全部宽度。 |
+| `list.constrainItemsWidth` | `false` | 将项目宽度限制为 `prose` 以提高可读性。在没有 featurn 图片的时候非常有用。 |
+| `list.showTableOfContents` | `false` | 是否显示目录。 |
+
+### Sitemap
+
+| 名称 | 默认值 | 描述 |
+| ----------------------- | ---------------------- |-------------------------------------------------------------------------------------------------------------|
+| `sitemap.excludedKinds` | `["taxonomy", "term"]` | 从生成的 `/sitemap.xml` 文件中排除的内容。 具体的配置请参考[Hugo 文档](https://gohugo.io/templates/section-templates/#page-kinds)。 |
+
+### 分类法
+
+| 名称 | 默认值 | 描述 |
+| ------------------------------ | --------- |-----------------------------------------------------------------------|
+| `taxonomy.showTermCount` | `true` | 是否在分类列表总显示对应的数量。 |
+| `taxonomy.showHero` | `false` | 缩略图是否会在每个页面中作为 hero 图像显示。 |
+| `taxonomy.heroStyle` | 无 | hero 图像的展示样式,可选的参数值有:`basic`、`big`、`background`、`thumbAndBackground`。 |
+| `taxonomy.showBreadcrumbs` | `false` | 是否在标题栏显示面包屑导航。 |
+| `taxonomy.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 |
+| `taxonomy.showLikes` | `false` | 是否显示文章喜爱数。这需要集成 firebase ,具体可以看下面。 |
+| `taxonomy.showTableOfContents` | `false` | 是否显示目录。 |
+| `taxonomy.cardView` | `false` | 将列表展示为卡片容器。 |
+
+### 术语
+
+| 名称 | 默认值 | 描述 |
+| -------------------------- | --------- |----------------------------------------------------------------------|
+| `term.showHero` | `false` | 缩略图是否会在每个页面中作为 hero 图像显示。 |
+| `term.heroStyle` | 无 | hero 图像的展示样式,可选的参数值有: `basic`、`big`、`background`、`thumbAndBackground`。 |
+| `term.showBreadcrumbs` | `false` | 是否在标题栏显示面包屑导航。 |
+| `term.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 |
+| `term.showLikes` | `false` | 是否显示文章喜爱数。这需要集成 firebase ,具体可以看下面。 |
+| `term.showTableOfContents` | `false` | 是否显示目录。 |
+| `term.groupByYear` | `false` | 是否根据年做聚合。 |
+| `term.cardView` | `false` | 将列表展示为卡片容器。 |
+| `term.cardViewScreenWidth` | `false` | 增强列表中卡片的宽度,使其可以占据可用的全部宽度。 |
+
+### Firebase
+
+| 名称 | 默认值 | 描述 |
+| ---------------------------- | --------- |---------------------------------------------------------------------------------------------------------------------|
+| `firebase.apiKey` | 无 | Firebase apiKey, 与 Firebase 集成的必填参数。了解如何将 Firebase 集成进 Blowfish 请参考 [这个页面]({{< ref "firebase-views" >}})。 |
+| `firebase.authDomain` | 无 | Firebase authDomain,与 Firebase 集成的必填参数。了解如何将 Firebase 集成进 Blowfish 请参考 [这个页面]({{< ref "firebase-views" >}})。 |
+| `firebase.projectId` | 无 | Firebase projectId,与 Firebase 集成的必填参数。了解如何将 Firebase 集成进 Blowfish 请参考 [这个页面]({{< ref "firebase-views" >}})。 |
+| `firebase.storageBucket` | 无 | Firebase storageBucket,与 Firebase 集成的必填参数。了解如何将 Firebase 集成进 Blowfish 请参考 [这个页面]({{< ref "firebase-views" >}})。 |
+| `firebase.messagingSenderId` | 无 | Firebase messagingSenderId,与 Firebase 集成的必填参数。了解如何将 Firebase 集成进 Blowfish 请参考 [这个页面]({{< ref "firebase-views" >}})。 |
+| `firebase.appId` | 无 | Firebase appId,与 Firebase 集成的必填参数。了解如何将 Firebase 集成进 Blowfish 请参考 [这个页面]({{< ref "firebase-views" >}})。 |
+| `firebase.measurementId` | 无 | Firebase measurementId,与 Firebase 集成的必填参数。了解如何将 Firebase 集成进 Blowfish 请参考 [这个页面]({{< ref "firebase-views" >}})。 |
+
+### Fathom Analytics
+
+| 名称 | 默认值 | 描述 |
+| ------------------------ | --------- |----------------------------------------------------------------------|
+| `fathomAnalytics.site` | 无 | 支持 Fathom 站点分析平台。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 |
+| `fathomAnalytics.domain` | 无 | 如果使用自定义域名的 Fathom Analytics,请在此提供,以便从自定义域名获取 `script.js`】。 |
+
+### BuyMeACoffee
+
+| 名称 | 默认值 | 描述 |
+| ----------------------------------- | --------- |---------------------------|
+| `buymeacoffee.identifier` | 无 | buymeacoffee 账号的用户名。 |
+| `buymeacoffee.globalWidget` | 无 | 激活位于全局的 buymeacoffee 组件。 |
+| `buymeacoffee.globalWidgetMessage` | 无 | 新用户首次访问网站时显示的消息。 |
+| `buymeacoffee.globalWidgetColor` | 无 | 组件颜色,使用 HEX 格式。 |
+| `buymeacoffee.globalWidgetPosition` | 无 | 组件位置,例如 "Left" 或 "Right"。 |
+### 验证
+
+| 名称 | 默认值 | 描述 |
+|--------------------------| --------- |----------------------------------------------------------------------------------------|
+| `verification.google` | 无 | Google 提供的网站验证字符串,用于在网站元数据中包含。 |
+| `verification.bing` | 无 | Bing 提供的网站验证字符串,用于在网站元数据中包含。 |
+| `verification.pinterest` | 无 | Pinterest 提供的网站验证字符串,用于在网站元数据中包含。 |
+| `verification.yandex` | 无 | Yandex 提供的网站验证字符串,用于在网站元数据中包含。 |
+
+
+## 别的配置文件
+
+Blowfish 主题还包括 `markup.toml` 配置文件。这个文件包含了一些重要参数,来确保 Hugo 正确配置以生成使用 Blowfish 创建的网站。
+
+需要确保次文件在 `config` 目录中,并设置所需要的值。否则某些功能可能无法正确启用,并可能导致意外行为。
diff --git a/exampleSite/content/docs/content-examples/index.zh-cn.md b/exampleSite/content/docs/content-examples/index.zh-cn.md
new file mode 100644
index 00000000..a6c33d82
--- /dev/null
+++ b/exampleSite/content/docs/content-examples/index.zh-cn.md
@@ -0,0 +1,318 @@
+---
+title: "内容示例"
+date: 2020-08-09
+draft: false
+description: "包含 Blowfish 中所有可用部分的示例、"
+slug: "content-examples"
+tags: ["内容", "示例"]
+series: ["文档集"]
+series_order: 12
+---
+
+如果你已经按顺序阅读了文档,那么你现在应该已经了解了 Blowfish 中所有的功能和配置信息。这个页面旨在把所有内容整合在一起,并提供一些你会在 Hugo 项目中使用的示例。
+
+{{< alert >}}
+**提示:** 如果你是Hugo的新用户,请务必阅读[官方文档](https://gohugo.io/content-management/page-bundles/),了解更多关于页面捆绑和资源的概念。
+{{< /alert >}}
+
+这个页面上的示例都可以根据不同的场景进行调整,期待你在做自己项目的同时,提出一些对特定内容格式化的想法。
+
+## 分支页面
+
+Hugo 中的分支页面包括主页、部分列表页面和分类页面等内容,请记住,这些分支页面的文件名都是 **`_index.md`**。
+
+Blowfish 支持在分支页面中设置[扉页参数]({{< ref "front-matter" >}}),在扉页中设置的参数将会覆盖在配置文件中设置的参数默认值。例如,在分支页面中的 `title` 参数将会覆盖页面标题的默认值。
+
+### 主页
+
+| | |
+| ------------ | -------------------- |
+| **Layout:** | `layouts/index.html` |
+| **Content:** | `content/_index.md` |
+
+Blowfish 中的主页比较特殊,它的整体设计是由主页的布局参数控制的。你可以在 [主页布局]({{< ref "homepage-layout" >}}) 来获取更多内容。
+
+如果你想自定义主页的内容,你仅需创建一个 `content/_index.md` 文件。该文件中的任何内容都会包含在你的主页中。
+
+**示例:**
+
+```yaml
+---
+title: "欢迎来到 Blowfish !"
+description: "这是往主页中添加内容的例子。"
+---
+欢迎来到我的网站!我很高兴你的来访。
+```
+_这个例子设置了一个自定义标题,并在页面正文中添加了一些额外的内容。当然任何的 Markdown 都是可接受的,包括短代码、图片和连接。_
+
+### 列表页
+
+| | |
+| ------------ | ---------------------------- |
+| **Layout:** | `layouts/_default/list.html` |
+| **Content:** | `content/../_index.md` |
+
+列表页将所有页面聚合到一个目录下,并为访问者提供了一种浏览页面的方式。博客或者作品集是一个典型案例,因为这两种类型的网站会将帖子或项目整合到一个列表页中。
+
+创建一个列表页就如同创建子目录一样简单。例如,要创建一个 "Projects" 列表页,你可以创建`content/projects/`。然后为你的项目创建一个 Markdown 文件。
+Creating a list page is as simple as making a sub-directory in the content folder. For example, to create a "Projects" section, you would create `content/projects/`. Then create a Markdown file for each of your projects.
+
+列表页面默认会自动生成,如果你想在列表添加一些页自定义内容,还需要在此目录创建一个 `_index.md` 文件。
+
+```shell
+.
+└── content
+ └── projects
+ ├── _index.md # /projects
+ ├── first-project.md # /projects/first-project
+ └── another-project
+ ├── index.md # /projects/another-project
+ └── project.jpg
+```
+
+Hugo 将会自动为目录中对应的项目页面生成 URL。
+
+类似于主页,列表页面也可以通过 `_index.md` 文件来添加自定义的内容。Blowfish将会在自定义内容的下方,展示这个列表所包含的所有子页面。
+
+**示例:**
+
+```yaml
+---
+title: "项目"
+description: "了解我的一些项目。"
+cascade:
+ showReadingTime: false
+---
+本节包含了我所有的当前项目。
+```
+
+_在上面的示例中,这里的 `cascade` 参数被用来隐藏该列表页下任何子页面的阅读时间。这样做是的任何子页面都不会显示阅读时间,这是一种为整个部分添加默认参数的好方法。_
+
+[样本部分]({{< ref "samples" >}})提供了列表页面的例子。
+
+### 分类页面
+
+| | |
+| ---------------- | -------------------------------- |
+| **List layout:** | `layouts/_default/taxonomy.html` |
+| **Term layout:** | `layouts/_default/term.html` |
+| **Content:** | `content/../_index.md` |
+
+分类页面有两种形式:分类列表和分类术语。列表页面显示给定分类中每个属于的列表,术语页面显示与给定术语相关的页面列表。
+
+术语这个词可能会有些令人困惑,所以这里让我们举个例子,假设将 `animals` 分类。
+
+首先,想要在 Hugo 中使用分类,需要先进行配置。通过创建 `config/_default/taxonomies.toml` 文件并定义分类名称来完成创建。
+
+```toml
+# config/_default/taxonomies.toml
+
+animal = "animals"
+```
+
+Hugo 期望分类定义式 单数 = “复数” 的形式,所以这里添加单数 `animal` 等于复数 `animals` 来创建我们的分类示例。
+
+现在 `animals` 分类就有了,需要在内容中添加它。下面是一个简单的在扉页参数中添加分类的例子:
+
+```yaml
+---
+title: "进入狮子的巢穴"
+description: "这周我们学习狮子。"
+animals: ["lion", "cat"]
+---
+```
+
+现在我们已经在 `animals` 分类中添加了 `lion` 和 `cat` 两个术语。
+
+目前看起来还不太明显,但是 Hugo 将会为这个分类自动生成分类列表页和两个术语页。默认情况下可以在 `/animals/` 地址访问列表页,在 `/animals/lion/` 和 `/animals/cat/` 访问术语页。
+
+这个列表页会列举出所有包含在这个分类中的术语。在上面的例子中,`/animals/` 页面会包含 "lion" 和 "cat" 的链接,以此将访问者导向至具体的术语页。
+
+术语页将会列举出包含这个术语的所有页面。这些术语页面本质上和[列表页面](#list-pages)相同,并且以类似的方式运作。
+
+如果你想在分类页面中添加自定义的内容,只需要对应文件夹的目录中创建 `_index.md` 文件即可。
+
+```shell
+.
+└── content
+ └── animals
+ ├── _index.md # /animals
+ └── lion
+ └── _index.md # /animals/lion
+```
+
+这些 `_index.md` 中的内容都会放置在生成的分类页面上。与其他页面一样,[扉页参数]({{< ref "front-matter" >}})中设置的变量也可以用来覆盖默认值。比如你可以有一个标签名是`lion`,但是可以将其覆盖成 "Lion"。
+
+想要查看实际效果,可以看[标签分类列表]({{< ref "tags" >}})。
+
+## 叶子页面
+
+| | |
+| ------------------------- | ------------------------------- |
+| **Layout:** | `layouts/_default/single.html` |
+| **Content (standalone):** | `content/../page-name.md` |
+| **Content (bundled):** | `content/../page-name/index.md` |
+
+Hugo 中的页面叶子页面是一个标准的内容页面,它不包含子页面的页面。可以作为关于页面,或者位于个人博客网站中的文章。
+
+最重要的是,与分支页面不同,叶子页面应该被命名为 `index.md`,而不是带下划线的`_index.md`。叶子页面比较特殊,它可以是一个在列表页面中的一个有唯一名称的文件,也可以是在一个有唯一名称的页面捆绑包。
+
+```shell
+.
+└── content
+ └── blog
+ ├── first-post.md # /blog/first-post
+ ├── second-post.md # /blog/second-post
+ └── third-post
+ ├── index.md # /blog/third-post
+ └── image.jpg
+```
+
+当页面中包含类似图片的资源,应该使用页面捆绑包,即子目录的方式。页面捆绑包时一个包含 `index.md` 文件的子目录。将资源和页面内容打包在同一个目录中是必要的,因为许多短代码和其他主题逻辑假设资源和页面捆绑在一起,
+
+**示例:**
+
+```yaml
+---
+title: "我的第一篇博客文章"
+date: 2022-01-25
+description: "欢迎来到我的博客"
+summary: "了解更多关于我和我创建博客的初衷。"
+tags: ["welcome", "new", "about", "first"]
+---
+_这_ 是博客的内容。
+```
+
+叶子页面有很多的[扉页参数]({{< ref "front-matter" >}}),来帮你你自定义展示它。
+
+### 外部链接
+
+Blowfish 允许外部页面链接和文章列表一起显示在列表页。如果你在第三方网站(如Medium)有文章,或者你想连接到研究论文,而不想在 Hugo 中复制内容,这将非常有用。
+
+为了创建一个外部链接文章,需要设置一些特殊的扉页参数:
+
+```yaml
+---
+title: "我的 Medium 文章"
+date: 2022-01-25
+externalUrl: "https://medium.com/"
+summary: "我在Medium上写了一篇文章。"
+showReadingTime: false
+_build:
+ render: "false"
+ list: "local"
+---
+```
+
+除了像 `title` 和 `summary` 这种普通的扉页参数外,需要设置 `externalUrl` 参数来告诉 Blowfish 这不是一篇普通的文章。访问者在访问后,会被重定向到这里提供的 URL。
+
+此外,我们使用了 `_build` 参数来避免 Hugo 生成一个普通页面。因为我们是一个连接到外部的 URL,生成页面是没有意义的。
+
+Hugo 中可以通过命令来快速生成一个外部链接的文件,在创建新的外部链接是,只需要指定 `-k external` 即可。这让生成外部链接文章变得更简单。
+
+```shell
+hugo new -k external posts/my-post.md
+```
+
+### 简单页面
+
+| | |
+| ----------------- | ------------------------------ |
+| **Layout:** | `layouts/_default/simple.html` |
+| **Front Matter:** | `layout: "simple"` |
+
+Blowfish 包含了一个用于简单页面的布局。简单布局是一个全宽的模板,并仅仅展示 Markdown 中的内容,不包含任何主题中的特性。
+
+简单布局中唯一可用的特性是面包屑导航和分享链接。这个行为也是通过 [扉页参数]({{< ref "front-matter" >}}) 来控制。
+
+如果想在特定页面上启用简单布局,添加 `layout` 扉页参数,并设置为 `"simple"`:
+
+```yaml
+---
+title: "我的着陆页"
+date: 2022-03-08
+layout: "simple"
+---
+这个页面的内容是全宽的。
+```
+
+## 自定义布局
+
+Hugo 的其中一个好处就是它让整个站点、单独内容或页面创建自定义布局变得容易。
+
+自定义布局遵循所有 Hugo 的模板规则,更多信息可以在 [Hugo 官方文档](https://gohugo.io/templates/introduction/) 中找到。
+
+### 覆盖默认布局
+
+上面讨论的每种内容类型都列出了其对应的布局文件。如果你在本地项目中创建了这个文件,它将覆盖主题的默认模板,由此可以来自定义网站的样式布局。
+
+例如,创建一个 `layouts/_default/single.html` 文件,此文件将允许用户完全自定义叶子页面的布局。
+
+### 自定义部分布局
+
+如果你想为个别内容创建自定义布局也很简单。这在使用特定样式列出某种类型内容时会非常有效。
+
+让我们简单看一个例子,来了解如何为"Projects"页面创建自定义的特殊布局。
+
+为了做到这一点,使用常规的Hugo规则来在 `content` 目录下组织你的内容。此外,在和 `layout` 目录中创建和内容部分相同的目录结构,并在此目录下添加一个 `list.html` 文件,此文件是 "projects" 内容的一个新的列表页布局。
+
+```shell
+.
+└── content
+│ └── projects
+│ ├── _index.md
+│ ├── first-project.md
+│ └── second-project.md
+└── layouts
+ └── projects
+ └── list.html
+```
+
+`list.html` 文件将会覆盖默认的模板,但只会作用在 `projects` 部分。我们先看看 `_index.md` 文件的内容。
+
+```yaml
+---
+title: "Blowfish"
+date: 2021-08-11
+icon: "github"
+description: "用Tailwind CSS构建的Hugo主题。"
+topics: ["Hugo", "Web", "Tailwind"]
+externalUrl: "https://github.com/nunocoracao/blowfish/"
+---
+```
+
+_在这个例子中,我们为每个项目添加了一些参数,然后我们在列表模板中可以使用他们。虽然这个例子没有页面的内容,但这并不组织你添加内容。这是自己的的自定义模板,完全可以随心所欲!_
+
+定义了项目内容后,现在我们可以创建一个列表模板来输出项目中的信息。
+```go
+{{ define "main" }}
+
+ {{ range .Pages }}
+
+
+
+
+ {{ partial "icon.html" .Params.icon }}
+
+
+
+
+ {{ .Title }}
+
+
+ {{ .Description }}
+
+
+
+
+ {{ end }}
+
+{{ end }}
+```
+
+尽管这是一个比较简单的例子,但你可以看到这里的 `list.html` 文件遍历了本节中的所有子页面,然后输出了每个页面的 HTML 链接 和图标。每个项目的扉页参数被用来确定显示哪些信息。
+Although this is quite a straightforward example, you can see that it steps through each of the pages in this section (ie. each project), and then outputs HTML links to each project alongside an icon. The metadata in the front matter for each project is used to determine which information is displayed.
+
+请记住,构建网站的时候需要重新编译 Tailwind CSS,一定要确保相关的样式和类可用。这在[高级定制]({{< ref "advanced-customisation" >}})部分有更详细的说明。
+
+当尝试使用自定义模板时,请务必先了解默认的 Blowfish 模板是如何工作的,然后将其作为指南或模板。补充一点,[Hugo 文档](https://gohugo.io/templates/introduction/) 也是学习创建自定义模板的宝贵资源。
diff --git a/exampleSite/content/docs/getting-started/index.zh-cn.md b/exampleSite/content/docs/getting-started/index.zh-cn.md
index 8f231dc0..fb36c964 100644
--- a/exampleSite/content/docs/getting-started/index.zh-cn.md
+++ b/exampleSite/content/docs/getting-started/index.zh-cn.md
@@ -260,7 +260,7 @@ Blowfish 还支持嵌套菜单。你需要在`menu.toml` 中定义一个父级
## 缩略图 & 背景
-Blowfish 的创立开端旨在便于为文章添加视觉效果。如果你熟悉 Hugo 的文章结构,只需要在您文章所在的文件夹中,放置一个以`feature*`开头的图像文件(Blowfish支持所有格式的文件,但更推荐使用 `.png` 或 `.jpg`)。就这样,Blowfish 就能够将图像文件作为文章的缩略图,而且能够在社交平台的 `oEmbed` 卡片中使用。
+Blowfish 的创立开端旨在便于为文章添加视觉效果。如果你熟悉 Hugo 的文章结构,只需要在你文章所在的文件夹中,放置一个以`feature*`开头的图像文件(Blowfish支持所有格式的文件,但更推荐使用 `.png` 或 `.jpg`)。就这样,Blowfish 就能够将图像文件作为文章的缩略图,而且能够在社交平台的 `oEmbed` 卡片中使用。
[这里]({{< ref "thumbnails" >}}) 有一个指南,提供了个人更多的内容和[示例]({{< ref "thumbnail_sample" >}})。如果你想看看具体如何操作可以看这里。
diff --git a/exampleSite/content/docs/homepage-layout/index.zh-cn.md b/exampleSite/content/docs/homepage-layout/index.zh-cn.md
new file mode 100644
index 00000000..31bbe322
--- /dev/null
+++ b/exampleSite/content/docs/homepage-layout/index.zh-cn.md
@@ -0,0 +1,91 @@
+---
+title: "主页布局"
+date: 2020-08-13
+draft: false
+description: "在 Blowfish 主题中设置主页布局。"
+slug: "homepage-layout"
+tags: ["主页", "布局", "文档"]
+series: ["文档集"]
+series_order: 5
+---
+
+Blowfish 提供了一个完全灵活的主页布局。你可以选择两种主要模板,并提供了额外的参数来帮助调整设计。当然,你也可以提供自己的模板,完全控制主页的内容。
+
+主页布局由 `params.toml` 配置文件中的 `homepage.layout` 参数来控制的。此外所有布局都默认包括 [最近文章](#recent-articles)。
+
+## 个人资料布局 (profile)
+
+默认的布局是 profile 布局,这非常适合个人网站和博客。它将作者的详细信息置于中心位置,并附带了头像和社交平台的链接。
+
+
+
+作者信息是在语言配置文件中提供的。具体的参数详情,请参考[快速入门]({{< ref "getting-started" >}})和[语言配置]({{< ref "configuration##language-and-i18n" >}})的内容。
+
+此外,主页内容中提供的任何 Markdown 都会显示在作者资料的下方。这对使用短代码显示简介或其他主页的自定义内容提供了更多的灵活性。
+
+如果想要启用 profile 布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "profile"`。
+
+## 页面布局(page)
+
+页面布局只会简单的显示你的 Markdown 内容,这种方式非常适合静态网站,并提供了很多灵活性。
+
+
+
+如果想要启用 page 布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "page"`。
+
+## 英雄布局(hero)
+
+英雄布局(hearo)组合了个人资料布局(profile)和卡片布局(card)。它不仅显示了网站作者的个人信息,还在个人资料下方加载了你的 markdown 内容。
+
+
+
+如果想要启用 hero 布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "hero"`。
+
+## 背景布局(background)
+
+背景布局(background)相对于英雄布局(hero)更叫平滑。和英雄布局(hero)类似,它也显示了网站作者的信息,并在其下方加载 markdown 内容。
+
+
+
+如果想要启用 background 布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "background"` 和 `homepage.homepageImage` 。
+
+## 卡片布局(card)
+
+卡片模板(card)是在页面布局上的扩展,它同样提供了灵活性。在显示了你的 markdown 内容的同时,展示了一个卡片组件中的图像。
+
+
+
+如果想要启用 card 布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "card"` 和 `homepage.homepageImage` 。
+
+## 自定义布局(custom)
+
+如果以上几个布局还没有满足你的需求,你还可以自己创建自定义布局。这样你可以基于一个空白的画布,来完全控制页面上的内容。
+
+如果想要启用 custom 布局,请在 `params.toml` 配置文件中设置 `homepage.layout = "custom"` 。
+
+配置好参数后,在 `layouts/partials/home` 目录下创建一个 `custom.html` 文件。 `custom.html` 文件中定义的任何内容都会被放置在网站主页的内容区域。你可以使用 HTML、Tailwind 或 Hugo 模板函数来定义你的布局。
+
+如果你想在自定义布局上添加 [最近文章](#recent-articles),请使用 `recent-articles/main.html` 中的内容。
+
+如果你想在网站[主页]({{< ref "/" >}})使用自定义布局来实现在个人资料和页面布局之间的切换。这里的[GitHub 仓库](https://github.com/nunocoracao/blowfish/blob/main/exampleSite/layouts/partials/home/custom.html)有一个例子可以参考。
+
+## 最近文章
+
+所有的主页布局都可以在主要内容下方显示最近文章。如果想要启用此功能,只需要在 `params.toml` 配置文件中将 `homepage.showRecent` 参数设置为 `true` 即可。
+
+
+
+这部分会列举出你在 `mainSections` 参数中设置的文章列表,此参数允许你使用网站上的任何内容类型。例如,如果你想在最新文章中展示 _posts_ 和 _projects_ 内容中的文章,你可以将此值设置为 `["posts", "projects"]`,这两个部分中的所有文章都会填充到最近文章列表中。Blowfish 主题期望这个参数是一个数组,如果你只想设置一个部分的所有文章,你可以设置为 `["blog"]` 即可。
+
+## 缩略图
+
+Blowfish 为你的文章提供了视觉支持。如果你熟悉 Hugo 的文章结构,只需要在你的文章对应的文件夹中防止一个以`feature*`开头的图像文件即可,图像类型几乎支持所有格式,更推荐使用`.png` 或者 `.jpg`。这样一来,Blowfish 将会在你的网站内使用该图片作为缩略图,并用在社交媒体平台上的 oEmbed 卡片中。
+
+[这是]({{< ref "thumbnails" >}})有更多详细内容,并且有一个便于理解的[示例]({{< ref "thumbnail_sample" >}})。
+
+## 卡片画廊
+
+Blowfish 支持将标准的文章列表显示为卡片画廊,你可以在主页的最近文章和网站上的文章列表中配置这个选项。
+- 对于主页可以使用 `homepage.cardView` 和 `homepage.cardViewScreenWidth` 参数
+- 对于列表页可以使用 `list.cardView` 和 `list.cardViewScreenWidth` 参数
+请查看 [配置文件]({{< ref "configuration" >}}) 以获取更多信息。
diff --git a/exampleSite/content/docs/welcome/index.zh-cn.md b/exampleSite/content/docs/welcome/index.zh-cn.md
index 8c94d9ef..e6053281 100644
--- a/exampleSite/content/docs/welcome/index.zh-cn.md
+++ b/exampleSite/content/docs/welcome/index.zh-cn.md
@@ -30,7 +30,7 @@ A highly requested feature, Blowfish is now multilingual! If you publish your co
:gb: :de: :fr: :es: :cn: :brazil: :tr: :bangladesh:
-感谢社区的贡献,目前 Blowfish 已经翻译成二十六种语言,并且随着时间的推移还会支持更多。 顺便一提,欢迎您为支持新语言提交 [PR](https://github.com/nunocoracao/blowfish/pulls)。
+感谢社区的贡献,目前 Blowfish 已经翻译成二十六种语言,并且随着时间的推移还会支持更多。 顺便一提,欢迎你为支持新语言提交 [PR](https://github.com/nunocoracao/blowfish/pulls)。
## 支持 RTL 语言
@@ -89,4 +89,4 @@ Blowfish 2.0版本的重大变化是增加了自动调整图片大小的功能
欢迎来尝试和探索强大而轻量的 Blowfish 2.0,打造优雅、个性化的创作之旅!
-如果您对 Blowfish 有更加创意的想法,欢迎随时[提交](https://github.com/nunocoracao/blowfish/discussions),期待与您共同营造 Blowfish 的开源文化!
\ No newline at end of file
+如果你对 Blowfish 有更加创意的想法,欢迎随时[提交](https://github.com/nunocoracao/blowfish/discussions),期待与你共同营造 Blowfish 的开源文化!
\ No newline at end of file
diff --git a/exampleSite/content/users/_index.zh-cn.md b/exampleSite/content/users/_index.zh-cn.md
index 4d996202..48e7b645 100644
--- a/exampleSite/content/users/_index.zh-cn.md
+++ b/exampleSite/content/users/_index.zh-cn.md
@@ -18,7 +18,7 @@ cardViewScreenWidth: true
{{< alert >}}
-**您是 Blowfish 用户 ?** 请在这个列表中添加您的站点, [提交 PR](https://github.com/nunocoracao/blowfish/blob/main/exampleSite/content/users/users.json).
+**你是 Blowfish 用户 ?** 请在这个列表中添加你的站点, [提交 PR](https://github.com/nunocoracao/blowfish/blob/main/exampleSite/content/users/users.json).
{{ alert >}}
From b5307d0fb5e62a2bfdb30937a34646f6f7f3ff7f Mon Sep 17 00:00:00 2001
From: Weaxs <459312872@qq.com>
Date: Wed, 20 Mar 2024 02:17:17 +0800
Subject: [PATCH 05/10] translate advanced-customisation, front-matter,
firebase-views
---
.../advanced-customisation/index.zh-cn.md | 238 ++++++++++++++++++
.../content/docs/configuration/index.zh-cn.md | 32 +--
.../docs/firebase-views/index.zh-cn.md | 55 ++++
.../content/docs/front-matter/index.zh-cn.md | 57 +++++
.../docs/getting-started/index.zh-cn.md | 2 +-
.../content/docs/installation/index.zh-cn.md | 2 +-
6 files changed, 368 insertions(+), 18 deletions(-)
create mode 100644 exampleSite/content/docs/advanced-customisation/index.zh-cn.md
create mode 100644 exampleSite/content/docs/firebase-views/index.zh-cn.md
create mode 100644 exampleSite/content/docs/front-matter/index.zh-cn.md
diff --git a/exampleSite/content/docs/advanced-customisation/index.zh-cn.md b/exampleSite/content/docs/advanced-customisation/index.zh-cn.md
new file mode 100644
index 00000000..a5b91e9d
--- /dev/null
+++ b/exampleSite/content/docs/advanced-customisation/index.zh-cn.md
@@ -0,0 +1,238 @@
+---
+title: "高级定制"
+date: 2020-08-08
+draft: false
+description: "了解如何手动构建 Blowfish。"
+slug: "advanced-customisation"
+tags: ["高级", "CSS", "文档"]
+series: ["文档集"]
+series_order: 13
+---
+
+你可以通过多种方法对 Blowfish 进行高级定制。阅读下文,了解更多可定制的内容以及最佳的实现方式。
+
+如果需要更进一步的建议,请在 [GitHub 讨论](https://github.com/nunocoracao/blowfish/discussions) 上发布你的问题。
+
+## Hugo 项目结构
+
+在深入之前,首先快速了解一下 [Hugo 项目结构](https://gohugo.io/getting-started/directory-structure/)以及管理内容和主题定制的最佳实践。
+
+{{< alert >}}
+**总结:** 不要直接编辑主题文件。只在你的 Hugo 项目子目录中进行定制,而不是在主题目录。
+{{< /alert >}}
+
+Blowfish 充分利用了 Hugo 中所有标准特性。它允许针对主题所有内容进行定制和覆盖,同时无需担心更改任何核心的主题文件。这将允许无缝的升级体验,同时让你完全控制网站的外观。
+
+为了实现这一点,你不应该直接调整任何主题本身的文件。无论你是通过 Hugo 模块、Git 子模块,或者是本地复制到`themes/`的安装方式,都应该保持主题文件本身的完整性。
+
+调整主题行为的正确方法是通过使用 Hugo 强大的[文件查找顺序](https://gohugo.io/templates/lookup-order/)覆盖文件。总之,查找顺序确保了包含在你的项目目录中的文件都会优先于主题文件。
+
+例如,如果你想覆盖 Blowfish 中所有文章的模板,只需要简单的创建 `layouts/_default/single.html` 文件并防止在项目的根目录中即可,该文件将覆盖 Blowfish 主题中定义的 `single.html` 且无需更改主题自身的文件。总之,文件查找顺序确保了包含在你项目目录中的任何文件的优先级都高于主题中对应的文件。
+
+只要你遵循这个简单的实践,你将始终能够更新主题(或测试不同的主题版本),同时也无需担心会丢失任何自定义修改。
+
+## 更改图像优化设置
+
+Hugo 有很多内置方式来调整、裁剪和优化图像。
+
+例如,在 `layouts/partials/article-link/card.html` 文件中有以下代码:
+
+```go
+{{ with .Resize "600x" }}
+
+{{ end }}
+```
+
+Hugo 在这里默认将图片调整为 600px,并保持比例。
+
+值得注意的是,类似[锚点](https://gohugo.io/content-management/image-processing/#anchor)这种图片的默认配置也可以在你的[站点配置](https://gohugo.io/content-management/image-processing/#processing-options)以及模板本身中设置。
+
+参考[Hugo 关于图像处理的文档](https://gohugo.io/content-management/image-processing/#image-processing-methods)来获取更多信息。
+
+## 颜色方案
+
+Blowfish 提供了多种颜色方案。如果你想在 Blowfish 提供的内置方案基础上更改颜色方案,你仅需要修改 `colorScheme` 参数即可。关于内置颜色方案可以参考[入门指南]({{< ref "getting-started#colour-schemes" >}})的内容。
+
+除了默认方案之外,你还可以创建自己的颜色方案,并根据自己的喜好重新设计整个网站。可以通过在 `assets/css/schemes/` 目录中创建 `.css` 文件来新建颜色方案。一旦文件被创建,只需要将主题配置中 `colorScheme` 参数设置为对应的名称即可。
+
+{{< alert "github">}}
+**注意:** 手动生成这些文件会比较困难,我构建了一个 `nodejs` 工具来帮助完成这项工作——[Fugu](https://github.com/nunocoracao/fugu)。总之,你只需要在调色板中选择三个主要颜色的 `hex` 值,程序将会输出一个可以直接导入到 Blowfish 主题的 CSS 文件。
+{{< /alert >}}
+
+Blowfish 主题定义了一个以三个主色调为核心的颜色方案,这三个主色调分别作为 `neutral`、`primary` 和 `secondary`,其中每一个主色调对应了10个具体的颜色。
+
+由于 Tailwind CSS 3.0 会用不透明度来计算颜色的值,所以方案中指定的颜色需要[符合特定格式](https://github.com/adamwathan/tailwind-css-variable-text-opacity-demo),即提供红色、绿色和蓝色的颜色值。
+
+```css
+:root {
+ --color-primary-500: 139, 92, 246;
+}
+```
+
+上面这个例子定义了一个 `primary-500` 颜色的 CSS 变量,其中红色的值是`139`,绿色的值是`92`,蓝色的值是`246`.
+
+你可以使用现有的颜色样式作为模板,自由地定制自己喜欢的颜色。但如果你需要一些定制颜色方案的灵感,可以查看官方的[Tailwind 颜色方案参考](https://tailwindcss.com/docs/customizing-colors#color-palette-reference)。
+
+## 覆盖样式表
+
+如果你只是想添加自定义样式以设置 HTML 中某些元素的样式。Blowfish 允许你在自己的 CSS 样式表中覆盖默认样式。只需要在 `assets/css/` 目录下创建 `custom.css` 文件即可。
+
+`custom.css` 文件将会被 Hugo 压缩,并在主题本身的样式之后自动加载,这意味着你设置的自定义文件将会覆盖主题自身的样式。
+
+### 使用额外的字体
+
+Blowfish 允许你轻松修改字体网站的字体。在 `assets/css/` 目录下创建完 `custom.css` 文件后,将你的字体文件放置到 `static/fonts/` 目录下。
+
+```shell
+.
+├── assets
+│ └── css
+│ └── custom.css
+...
+└─── static
+ └── fonts
+ └─── font.ttf
+
+```
+
+这将使得字体在网站中可用。现在你只需要在 `custom.css` 文件中引用它,并在适当的地方替换即可。下面这个示例,展示了如何给整个 `html` 替换字体。
+
+```css
+@font-face {
+ font-family: font;
+ src: url('/fonts/font.ttf');
+}
+
+html {
+ font-family: font;
+}
+```
+
+### 调整字体大小
+
+更改网站的字体大小,也是通过用覆盖默认样式实现的。Blowfish 在整个主题中使用了基于 HTML 字体大小,即 `font-size` 属性来控制字体大小的。Tailwind 将字体大小默认设置为 `12pt`,当然也可以更改成自己喜欢的值。
+
+按照[上面所说]({{< ref "#overriding-the-stylesheet" >}}),创建一个 `custom.css` 并添加一下 CSS 声明:
+
+```css
+/* Increase the default font size */
+html {
+ font-size: 13pt;
+}
+```
+
+只需要更改这一个值,网站上的所有字体就会调整到此值。因此如果想让字体更大,让此值大于 `12pt`;同理想让字体更小,小于 `12pt` 即可。
+
+## 从源码构建主题CSS
+
+如果你想进行重大更改,可以使用Tailwind CSS 的 JIT 编译器,并从头开始重建整个主题的CSS。如果你想调整 Tailwind 配置或者添加额外的 Tailwind 类,JIT 会非常有用,
+
+{{< alert >}}
+**注意:** 手动构建主题是为高级用户所准备的。
+{{< /alert >}}
+
+接下来让我们一步一步了解 Tailwind CSS 是如何构建和工作的。
+
+### Tailwind 配置
+
+为了生成只包含实际使用的 Tailwind 类的 CSS 文件,Blowfish 在主题的根目录中定义了 `tailwind.config.js` 文件,用来扫描所有 HTML 模板和 Markdown 内容文件,以检查被标记的样式。下面是 `tailwind.config.js` 中的内容:
+
+```js
+// themes/blowfish/tailwind.config.js
+
+module.exports = {
+ content: [
+ "./layouts/**/*.html",
+ "./content/**/*.{html,md}",
+ "./themes/blowfish/layouts/**/*.html",
+ "./themes/blowfish/content/**/*.{html,md}",
+ ],
+
+ // 更多...
+};
+```
+
+默认配置包含了以上路径,这里囊括了大部分内容文件。主要你遵循上面的项目结构,那么你无需修改 `tailwind.config.js` 就能轻松生成自己的 CSS 文件。但这样一来,需要你将 **Blowfish 作为子目录`themes/blowfish/` 放置在你的项目中**,Git子模块(推荐)和本地复制文件的安装方式可以做到这一点,但是 Hugo 模块的安装方式不适用。[安装文章]({{< ref "installation" >}})介绍了如何使用这三种安装方式。
+
+### 项目结构
+
+为了利用默认配置,你的项目应该看起来是这样:
+
+```shell
+.
+├── assets
+│ └── css
+│ └── compiled
+│ └── main.css # 这是我们生成的文件
+├── config # 站点配置
+│ └── _default
+├── content # site content
+│ ├── _index.md
+│ ├── projects
+│ │ └── _index.md
+│ └── blog
+│ └── _index.md
+├── layouts # 站点的自定义布局
+│ ├── partials
+│ │ └── extend-article-link/simple.html
+│ ├── projects
+│ │ └── list.html
+│ └── shortcodes
+│ └── disclaimer.html
+└── themes
+ └── blowfish # Git 子模块或本地复制安装
+```
+
+这个结构示例添加了一个`projects` 内容,并为其添加了自定义布局、自定义短代码和扩充文章链接的部分。遵循此项目的结构,需要做的就是重新编译 `main.css` 文件。
+
+### 安装依赖
+
+为了使编译过程正常运行,你需要进入 `themes/blowfish/` 目录并安装项目依赖。你需要在本地环境执行安装 [npm](https://docs.npmjs.com/cli/v7/configuring-npm/install)。
+
+```shell
+cd themes/blowfish
+npm install
+```
+
+### 运行 Tailwind 编译器
+
+安装完依赖后,接下来就是使用 [Tailwind CLI](https://v2.tailwindcss.com/docs/installation#using-tailwind-cli) 调用 JIT 编译器。回到你的 Hugo 项目根目录并执行以下命令:
+
+```shell
+cd ../..
+./themes/blowfish/node_modules/tailwindcss/lib/cli.js -c ./themes/blowfish/tailwind.config.js -i ./themes/blowfish/assets/css/main.css -o ./assets/css/compiled/main.css --jit
+```
+
+这个命令稍微有点复杂,因为涉及到几个路径。但本质上你是在调用 Tailwind CLI 并提供下面三个参数:
+- Tailwind 配置文件 `tailwind.config.js`
+- 主题的 `main.css` 文件
+- 编译产出后的 CSS 文件的位置 `assets/css/compiled/`
+
+配置文件将自动检查你项目和主题中的所有内容和布局,并构建一个新的 CSS 文件,这个 CSS 文件包含了你的网站中需要的所有CSS。由于 Hugo 处理文件层次结构的方式,你项目中的 `main.css` 文件将自动覆盖主题中的 `main.css` 文件。
+
+每次你对布局进行更改并需要新的 Tailwind CSS 样式时,都需要重新运行命令并生成新的 CSS 文件。为了简化步骤,你可以在命令的末尾添加 `-w` 来启用监视模式运行 JIT 编译器。
+
+### 制作构建脚本
+
+为了提供一个更加完整的方案,你可以为这些命令添加别名来简化整个过程,或者想我一样,在项目的根目录中添加一个包含脚本的 `package.json` 文件:
+
+```js
+// package.json
+
+{
+ "name": "my-website",
+ "version": "1.0.0",
+ "description": "",
+ "scripts": {
+ "server": "hugo server -b http://localhost -p 8000",
+ "dev": "NODE_ENV=development ./themes/blowfish/node_modules/tailwindcss/lib/cli.js -c ./themes/blowfish/tailwind.config.js -i ./themes/blowfish/assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
+ "build": "NODE_ENV=production ./themes/blowfish/node_modules/tailwindcss/lib/cli.js -c ./themes/blowfish/tailwind.config.js -i ./themes/blowfish/assets/css/main.css -o ./assets/css/compiled/main.css --jit"
+ },
+ // and more...
+}
+```
+
+现在,当你想要设计网站时,可以调用 `npm run dev`,编译器会以监视模式运行。当你准备部署时,运行 `npm run build` 就可以得到一个简洁的 Tailwind CSS 构建。
+
+🙋♀️如果你需要帮助,请随时在 [GitHub 讨论区](https://github.com/nunocoracao/blowfish/discussions)提出问题。
+
diff --git a/exampleSite/content/docs/configuration/index.zh-cn.md b/exampleSite/content/docs/configuration/index.zh-cn.md
index f6fc9e0a..15b7efd3 100644
--- a/exampleSite/content/docs/configuration/index.zh-cn.md
+++ b/exampleSite/content/docs/configuration/index.zh-cn.md
@@ -150,7 +150,7 @@ Blowfish 还支持针对特定语言的菜单配置。菜单配置文件的命
菜单配置文件的命名格式是 `menus.[language-code].toml`。请始终确保菜单配置项中使用的语言代码和语言配置相匹配。
-[快速开始]({{< ref "getting-started#menus" >}})部分更详细地介绍了这个文件的结构。你还可以参考 [Hugo 菜单文档](https://gohugo.io/content-management/menus/),以获取更多配置示例。
+[入门指南]({{< ref "getting-started#menus" >}})部分更详细地介绍了这个文件的结构。你还可以参考 [Hugo 菜单文档](https://gohugo.io/content-management/menus/),以获取更多配置示例。
## 主题参数
@@ -171,7 +171,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
| `enableCodeCopy` | `false` | 是否可以将``代码块复制到剪贴板。想要使用代码复制功能,需要将 `highlight.noClasses` 参数设置为 `false`。 阅读 [其他配置文件](#other-configuration-files) 以获取更多信息。 |
| `mainSections` | 无 | 指定最近文章中应该展示的模块。 如果没有指定,则使用文章数量最多的板块。 |
| `showViews` | 无 | 是否显示文章和列表页面的阅读量。这需要集成 firebase ,具体可以看下面。 |
-| `showLikes` | 无 | 是否显示文章和列表页面的喜爱数。这需要集成 firebase ,具体可以看下面。 |
+| `showLikes` | 无 | 是否显示文章和列表页面的点赞量。这需要集成 firebase ,具体可以看下面。 |
| `robots` | 无 | 用于支持搜索引擎爬虫如何处理你的网站。如果设置了该值,它将被输出在页面头部。具体的参数值请参考 [Google 文档](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives)。 |
| `disableImageZoom` | `false` | 禁用网站上所有图片缩放功能。 |
| `disableImageOptimization` | `false` | 禁用图片上所有图片的调整大小和优化功能。 |
@@ -218,7 +218,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
| ------------------------------------- | --------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `article.showDate` | `true` | 是否显示日期。 |
| `article.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 |
-| `article.showLikes` | `false` | 是否显示文章喜爱数。这需要集成 firebase ,具体可以看下面。 |
+| `article.showLikes` | `false` | 是否显示文章点赞量。这需要集成 firebase ,具体可以看下面。 |
| `article.showDateOnlyInArticle` | `false` | 是否在文章内显示日期,不影响文章列表或卡片页面的日期显示。 |
| `article.showDateUpdated` | `false` | 是否展示文章的更新日期。 |
| `article.showAuthor` | `true` | 是否在文章底部显示作者框。 |
@@ -241,7 +241,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
| `article.relatedContentLimit` | `3` | 如果启用`showRelatedContent`,则限制显示相关文章的数量。 |
| `article.showTaxonomies` | `false` | 是否显示文章的分类或标签信息。 |
| `article.showAuthorsBadges` | `false` | 是否在文章或列表中显示 `authors` 分类。这需要开启多个作者 `multiple authors` 和 `authors` 分类法。 请阅读 [这个网页]({{< ref "multi-author" >}}) 来获取更多内容。 |
-| `article.showWordCount` | `false` | 是否显示文章的字数。 如果你的语言包含 CJK 语言,需要在 `config.toml` 中开启 `hasCJKLanguage` 参数。 |
+| `article.showWordCount` | `false` | 是否显示文章的字数。 如果你的语言属于 CJK 语言,需要在 `config.toml` 中开启 `hasCJKLanguage` 参数。 |
| `article.showComments` | `false` | 是否在文章末尾添加 [评论部分]({{< ref "partials#comments" >}})。 |
| `article.sharingLinks` | 无 | 在文章末尾显示的分享链接。如果没有提供或设置为 `false`,则不会显示任何分享链接。可用的值包括:"linkedin"、"twitter"、"reddit"、"pinterest"、"facebook"、"email"、"whatsapp" 和 "telegram" |
| `article.showZenMode` | `false` | 指定是否激活文章阅读的禅模式,即隐藏常规的界面元素。 |
@@ -258,7 +258,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
| `list.showTableOfContents` | `false` | 是否展示目录。 |
| `list.showSummary` | `false` | 是否在列表页显示文章摘要。如果在[扉页参数]({{< ref "front-matter" >}})中没有提供摘要,那么将会使用[站点配置](#site-configuration) 中的 `summaryLength` 参数自动生成一个。 |
| `list.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 |
-| `list.showLikes` | `false` | 是否显示文章喜爱数。这需要集成 firebase ,具体可以看下面。 |
+| `list.showLikes` | `false` | 是否显示文章点赞量。这需要集成 firebase ,具体可以看下面。 |
| `list.showCards` | `false` | 是否将每个文章显示未卡片或简单的内联文本。 |
| `list.groupByYear` | `true` | 是否根据年做聚合。 |
| `list.cardView` | `false` | 将列表展示为卡片容器。 |
@@ -281,23 +281,23 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
| `taxonomy.heroStyle` | 无 | hero 图像的展示样式,可选的参数值有:`basic`、`big`、`background`、`thumbAndBackground`。 |
| `taxonomy.showBreadcrumbs` | `false` | 是否在标题栏显示面包屑导航。 |
| `taxonomy.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 |
-| `taxonomy.showLikes` | `false` | 是否显示文章喜爱数。这需要集成 firebase ,具体可以看下面。 |
+| `taxonomy.showLikes` | `false` | 是否显示文章点赞量。这需要集成 firebase ,具体可以看下面。 |
| `taxonomy.showTableOfContents` | `false` | 是否显示目录。 |
| `taxonomy.cardView` | `false` | 将列表展示为卡片容器。 |
### 术语
-| 名称 | 默认值 | 描述 |
-| -------------------------- | --------- |----------------------------------------------------------------------|
-| `term.showHero` | `false` | 缩略图是否会在每个页面中作为 hero 图像显示。 |
+| 名称 | 默认值 | 描述 |
+| -------------------------- | --------- |------------------------------------------------------------------------|
+| `term.showHero` | `false` | 缩略图是否会在每个页面中作为 hero 图像显示。 |
| `term.heroStyle` | 无 | hero 图像的展示样式,可选的参数值有: `basic`、`big`、`background`、`thumbAndBackground`。 |
-| `term.showBreadcrumbs` | `false` | 是否在标题栏显示面包屑导航。 |
-| `term.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 |
-| `term.showLikes` | `false` | 是否显示文章喜爱数。这需要集成 firebase ,具体可以看下面。 |
-| `term.showTableOfContents` | `false` | 是否显示目录。 |
-| `term.groupByYear` | `false` | 是否根据年做聚合。 |
-| `term.cardView` | `false` | 将列表展示为卡片容器。 |
-| `term.cardViewScreenWidth` | `false` | 增强列表中卡片的宽度,使其可以占据可用的全部宽度。 |
+| `term.showBreadcrumbs` | `false` | 是否在标题栏显示面包屑导航。 |
+| `term.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 |
+| `term.showLikes` | `false` | 是否显示文章点赞量。这需要集成 firebase ,具体可以看下面。 |
+| `term.showTableOfContents` | `false` | 是否显示目录。 |
+| `term.groupByYear` | `false` | 是否根据年做聚合。 |
+| `term.cardView` | `false` | 将列表展示为卡片容器。 |
+| `term.cardViewScreenWidth` | `false` | 增强列表中卡片的宽度,使其可以占据可用的全部宽度。 |
### Firebase
diff --git a/exampleSite/content/docs/firebase-views/index.zh-cn.md b/exampleSite/content/docs/firebase-views/index.zh-cn.md
new file mode 100644
index 00000000..2927dcf5
--- /dev/null
+++ b/exampleSite/content/docs/firebase-views/index.zh-cn.md
@@ -0,0 +1,55 @@
+---
+title: "Firebase: 阅读量 & 点赞量"
+date: 2020-08-03
+draft: false
+description: "了解 Blowfish 如何继承 Firebase,并动态显示阅读量和点赞量。"
+slug: "firebase-views"
+tags: ["firebase", "阅读量", "点赞量"]
+series: ["文档集"]
+series_order: 15
+---
+
+为了能够在网站中获取动态数据,我们支持了对 Firebase 的集成。这将允许你在列表和文章中使用阅读量功能。
+
+1. 访问 Firebase 并创建一个账户
+2. 创建一个新项目
+3. 选择分析位置
+4. Blowfish 是通过 `params.toml` 配置文件中的 firebase 相关参数,来和 firebase 继承的,更多的细节内容可以参考 }}">这个页面。你可以在下面找到集成 firebase 的文件示例,请注意 FirebaseConfig 对象内的参数。
+
+```
+// 从你需要的 SDK 中导入所需的函数
+import { initializeApp } from "firebase/app";
+import { getAnalytics } from "firebase/analytics";
+// TODO: Add SDKs for Firebase products that you want to use
+// https://firebase.google.com/docs/web/setup#available-libraries
+
+// 你 Web 应用的 Firebase 配置
+// 对于 Firebase JS SDK v7.20.0 以及更高版本,measurementId 参数是可选的
+const firebaseConfig = {
+ apiKey: "AIzaSyB5tqlqDky77Vb4Tc4apiHV4hRZI18KGiY",
+ authDomain: "blowfish-21fff.firebaseapp.com",
+ projectId: "blowfish-21fff",
+ storageBucket: "blowfish-21fff.appspot.com",
+ messagingSenderId: "60108104191",
+ appId: "1:60108104191:web:039842ebe1370698b487ca",
+ measurementId: "G-PEDMYR1V0K"
+};
+
+// 初始化 Firebase
+const app = initializeApp(firebaseConfig);
+const analytics = getAnalytics(app);
+```
+
+5. 设置 Firestore - 选择 Build 并打开 Firestore. 创建一个数据库,并在生产环境中启动。选择服务器位置然后等待其部署完成。启动之后你需要配置规则。只需要复制并粘贴下面的内容,然后点击发布即可。
+```
+rules_version = '2';
+service cloud.firestore {
+ match /databases/{database}/documents {
+ match /{document=**} {
+ allow read, write: if request.auth != null;
+ }
+ }
+}
+```
+6. 开启匿名授权 - 选择 Build 并打开 Authentication。选择开始,点击 Anonymous 并开启,保存。
+7. 享受 - 现在可以激活 Blowfish 中文章阅读量和点赞量的功能。
diff --git a/exampleSite/content/docs/front-matter/index.zh-cn.md b/exampleSite/content/docs/front-matter/index.zh-cn.md
new file mode 100644
index 00000000..77805c33
--- /dev/null
+++ b/exampleSite/content/docs/front-matter/index.zh-cn.md
@@ -0,0 +1,57 @@
+---
+title: "扉页参数"
+date: 2020-08-10
+draft: false
+description: "文本主要介绍 Blowfish 中页面中可以添加的所有的前页/扉页参数。"
+slug: "front-matter"
+tags: ["扉页", "配置", "文档"]
+series: ["文档集"]
+series_order: 7
+---
+
+除了 [Hugo 中默认的前置参数](https://gohugo.io/content-management/front-matter/#front-matter-variables),Blowfish 主题中还添加了大量的参数选项来自定义单个页面的展示方式。所有可用的扉页参数如下。
+
+扉页参数中的默认值是从[基础配置]({{< ref "configuration" >}})中继承的,所有只有当你想要覆盖默认值时,才需要在当前页面指定这些参数。
+
+
+| 名称 | 默认值 | 描述 |
+|-------------------------------|-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|
+| `title` | 无 | 文章名称。 |
+| `description` | 无 | 文章的描述信息,它会被添加在 HTML 的 `` 元数据中。 |
+| `externalUrl` | 无 | 如果文章发布在第三方网站上,这里提供只想对应文章的 URL 地址。提供 URL 将会组织生成内容页面,对这篇文章的任何引用都会直接跳转到第三方网站的 URL 上面。 |
+| `editURL` | `article.editURL` | 当激活 `showEdit` 参数时,此参数用来设置编辑文章的 URL。 |
+| `editAppendPath` | `article.editAppendPath` | 当激活 `showEdit` 参数时,该参数指定是否将当前文章路径添加到 `editURL` 设置的 URL 后面。 |
+| `groupByYear` | `list.groupByYear` | 是否在列表页面按年份对文章进行分组。 |
+| `menu` | 无 | 当设置此值,这篇内容的链接将会出现在菜单中。有效值是 `main` 或 `footer`。 |
+| `robots` | 无 | 支持搜索引擎的爬虫如何处理这篇文章。如果设置了此值,它将在页面头部输出。更多内容请参考 [Google 文档](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives)。 |
+| `sharingLinks` | `article.sharingLinks` | 指定文章结尾显示哪些分享链接。如果没有设置或设置为 `false` ,则没有分享链接。 |
+| `showAuthor` | `article.showAuthor` | 是否在页脚处显示作者框。 |
+| `authors` | 无 | 用于展示多作者的数组,如果设置了将会覆盖 `showAuthor` 设置。这里使用了多作者的特性,查看[这个页面]({{< ref "multi-author" >}})来获取更多信息。 |
+| `showAuthorsBadges` | `article.showAuthorsBadges` | 是否在文章和列表页展示`authors`作者分类。想是它生效需要开启`multiple authors`多作者和 `authors` 作者分类。 查看[这个页面]({{< ref "multi-author" >}})来获取更多信息。 |
+| `featureimage` | 无 | 基于外部 URL 的 feature 图片链接。
+| `featureimagecaption` | 无 | feature 图片的说明,仅在 hero 样式的 `big` 风格下展示。
+| `showHero` | `article.showHero` | 是否在文章页面将所裸土作为文章页面内的 hero 图片显示。 |
+| `heroStyle` | `article.heroStyle` | hero 图片的风格,合法的值有: `basic`、`big`、`background`、`thumbAndBackground`。 |
+| `showBreadcrumbs` | `article.showBreadcrumbs` or `list.showBreadcrumbs` | 是否在文章或列表页面显示面包屑导航。 |
+| `showDate` | `article.showDate` | 是否显示文章的日期。具体日期使用 `date` 参数设置。 |
+| `showDateUpdated` | `article.showDateUpdated` | 是否显示文章的更新日期。具体日期使用 `lastmod` 参数设置。 |
+| `showEdit` | `article.showEdit` | 是否显示编辑文章内容的链接。 |
+| `showHeadingAnchors` | `article.showHeadingAnchors` | 是否在文章的标题旁显示锚点链接。 |
+| `showPagination` | `article.showPagination` | 是否在文章页脚显示下一篇/上一篇链接。 |
+| `invertPagination` | `article.invertPagination` | 是否翻转下一篇/上一篇的链接方向。 |
+| `showReadingTime` | `article.showReadingTime` | 是否显示文章的预估阅读时间。 |
+| `showTaxonomies` | `article.showTaxonomies` | 是否显示文章关联的分类/标签。 |
+| `showTableOfContents` | `article.showTableOfContents` | 是否显示文章目录。 |
+| `showWordCount` | `article.showWordCount` | 是否显示文章字数统计。如果你的语言属于 CJK 语言,需要在 `config.toml` 中开启 `hasCJKLanguage` 参数。 |
+| `showComments` | `article.showComments` | 是否在文章页脚显示 [评论部分]({{< ref "partials#comments" >}})。 |
+| `showSummary` | `list.showSummary` | 是否在文章或列表页显示摘要。 |
+| `showViews` | `article.showViews` | 是否显示文章和列表页面的阅读量。这需要集成 firebase ,具体可以看[这个页面]({{< ref "firebase-views" >}})来了解如何在 Blowfish 中集成firebase。 |
+| `showLikes` | `article.showLikes` | 是否显示文章和列表页面的点赞量。这需要集成 firebase ,具体可以看[这个页面]({{< ref "firebase-views" >}})来了解如何在 Blowfish 中集成firebase。 |
+| `seriesOpened` | `article.seriesOpened` | 是否打开系列模块。 |
+| `series` | 无 | 文章所属的系列数组,我们建议每篇文章只属于一个系列。 |
+| `series_order` | 无 | 文章在系列中的编号。 |
+| `summary` | Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}})) | 当启用 `showSummary` 时,这是作为这篇文章摘要的Markdown字符串。 |
+| `xml` | `true` unless excluded by `sitemap.excludedKinds` | 是否将这篇文章包含在生成的 `/sitemap.xml` 文件中。 |
+| `layoutBackgroundBlur` | `true` | 向下滚动主页时,是否模糊背景图。 |
+| `layoutBackgroundHeaderSpace` | `true` | 在标题和正文之间添加空白区域间隔。 |
+
diff --git a/exampleSite/content/docs/getting-started/index.zh-cn.md b/exampleSite/content/docs/getting-started/index.zh-cn.md
index fb36c964..00c0518b 100644
--- a/exampleSite/content/docs/getting-started/index.zh-cn.md
+++ b/exampleSite/content/docs/getting-started/index.zh-cn.md
@@ -1,5 +1,5 @@
---
-title: "快速开始"
+title: "入门指南"
date: 2020-08-15
draft: false
description: "All the front matter variables available in Blowfish."
diff --git a/exampleSite/content/docs/installation/index.zh-cn.md b/exampleSite/content/docs/installation/index.zh-cn.md
index 6c5b75b8..461dfc00 100644
--- a/exampleSite/content/docs/installation/index.zh-cn.md
+++ b/exampleSite/content/docs/installation/index.zh-cn.md
@@ -156,7 +156,7 @@ config/_default/
### 下一步
-基本的 Blowfish 安装已经完成。继续阅读 [快速开始]({{< ref "getting-started" >}}),了解更多关于主题配置的内容。
+基本的 Blowfish 安装已经完成。继续阅读 [入门指南]({{< ref "getting-started" >}}),了解更多关于主题配置的内容。
---
From 6b341ad8118b5d0ccf143860267698341d3c7d98 Mon Sep 17 00:00:00 2001
From: Weaxs <459312872@qq.com>
Date: Wed, 20 Mar 2024 11:35:00 +0800
Subject: [PATCH 06/10] translate thumbnails, multi-author to zh-cn
---
.../content/docs/front-matter/index.zh-cn.md | 78 +++++++-------
.../content/docs/multi-author/index.zh-cn.md | 100 ++++++++++++++++++
.../content/docs/thumbnails/index.zh-cn.md | 46 ++++++++
3 files changed, 185 insertions(+), 39 deletions(-)
create mode 100644 exampleSite/content/docs/multi-author/index.zh-cn.md
create mode 100644 exampleSite/content/docs/thumbnails/index.zh-cn.md
diff --git a/exampleSite/content/docs/front-matter/index.zh-cn.md b/exampleSite/content/docs/front-matter/index.zh-cn.md
index 77805c33..caf3f654 100644
--- a/exampleSite/content/docs/front-matter/index.zh-cn.md
+++ b/exampleSite/content/docs/front-matter/index.zh-cn.md
@@ -14,44 +14,44 @@ series_order: 7
扉页参数中的默认值是从[基础配置]({{< ref "configuration" >}})中继承的,所有只有当你想要覆盖默认值时,才需要在当前页面指定这些参数。
-| 名称 | 默认值 | 描述 |
-|-------------------------------|-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|
-| `title` | 无 | 文章名称。 |
-| `description` | 无 | 文章的描述信息,它会被添加在 HTML 的 `` 元数据中。 |
-| `externalUrl` | 无 | 如果文章发布在第三方网站上,这里提供只想对应文章的 URL 地址。提供 URL 将会组织生成内容页面,对这篇文章的任何引用都会直接跳转到第三方网站的 URL 上面。 |
-| `editURL` | `article.editURL` | 当激活 `showEdit` 参数时,此参数用来设置编辑文章的 URL。 |
-| `editAppendPath` | `article.editAppendPath` | 当激活 `showEdit` 参数时,该参数指定是否将当前文章路径添加到 `editURL` 设置的 URL 后面。 |
-| `groupByYear` | `list.groupByYear` | 是否在列表页面按年份对文章进行分组。 |
-| `menu` | 无 | 当设置此值,这篇内容的链接将会出现在菜单中。有效值是 `main` 或 `footer`。 |
+| 名称 | 默认值 | 描述 |
+|-------------------------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
+| `title` | 无 | 文章名称。 |
+| `description` | 无 | 文章的描述信息,它会被添加在 HTML 的 `` 元数据中。 |
+| `externalUrl` | 无 | 如果文章发布在第三方网站上,这里提供只想对应文章的 URL 地址。提供 URL 将会组织生成内容页面,对这篇文章的任何引用都会直接跳转到第三方网站的 URL 上面。 |
+| `editURL` | `article.editURL` | 当激活 `showEdit` 参数时,此参数用来设置编辑文章的 URL。 |
+| `editAppendPath` | `article.editAppendPath` | 当激活 `showEdit` 参数时,该参数指定是否将当前文章路径添加到 `editURL` 设置的 URL 后面。 |
+| `groupByYear` | `list.groupByYear` | 是否在列表页面按年份对文章进行分组。 |
+| `menu` | 无 | 当设置此值,这篇内容的链接将会出现在菜单中。有效值是 `main` 或 `footer`。 |
| `robots` | 无 | 支持搜索引擎的爬虫如何处理这篇文章。如果设置了此值,它将在页面头部输出。更多内容请参考 [Google 文档](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives)。 |
-| `sharingLinks` | `article.sharingLinks` | 指定文章结尾显示哪些分享链接。如果没有设置或设置为 `false` ,则没有分享链接。 |
-| `showAuthor` | `article.showAuthor` | 是否在页脚处显示作者框。 |
-| `authors` | 无 | 用于展示多作者的数组,如果设置了将会覆盖 `showAuthor` 设置。这里使用了多作者的特性,查看[这个页面]({{< ref "multi-author" >}})来获取更多信息。 |
-| `showAuthorsBadges` | `article.showAuthorsBadges` | 是否在文章和列表页展示`authors`作者分类。想是它生效需要开启`multiple authors`多作者和 `authors` 作者分类。 查看[这个页面]({{< ref "multi-author" >}})来获取更多信息。 |
-| `featureimage` | 无 | 基于外部 URL 的 feature 图片链接。
-| `featureimagecaption` | 无 | feature 图片的说明,仅在 hero 样式的 `big` 风格下展示。
-| `showHero` | `article.showHero` | 是否在文章页面将所裸土作为文章页面内的 hero 图片显示。 |
-| `heroStyle` | `article.heroStyle` | hero 图片的风格,合法的值有: `basic`、`big`、`background`、`thumbAndBackground`。 |
-| `showBreadcrumbs` | `article.showBreadcrumbs` or `list.showBreadcrumbs` | 是否在文章或列表页面显示面包屑导航。 |
-| `showDate` | `article.showDate` | 是否显示文章的日期。具体日期使用 `date` 参数设置。 |
-| `showDateUpdated` | `article.showDateUpdated` | 是否显示文章的更新日期。具体日期使用 `lastmod` 参数设置。 |
-| `showEdit` | `article.showEdit` | 是否显示编辑文章内容的链接。 |
-| `showHeadingAnchors` | `article.showHeadingAnchors` | 是否在文章的标题旁显示锚点链接。 |
-| `showPagination` | `article.showPagination` | 是否在文章页脚显示下一篇/上一篇链接。 |
-| `invertPagination` | `article.invertPagination` | 是否翻转下一篇/上一篇的链接方向。 |
-| `showReadingTime` | `article.showReadingTime` | 是否显示文章的预估阅读时间。 |
-| `showTaxonomies` | `article.showTaxonomies` | 是否显示文章关联的分类/标签。 |
-| `showTableOfContents` | `article.showTableOfContents` | 是否显示文章目录。 |
-| `showWordCount` | `article.showWordCount` | 是否显示文章字数统计。如果你的语言属于 CJK 语言,需要在 `config.toml` 中开启 `hasCJKLanguage` 参数。 |
-| `showComments` | `article.showComments` | 是否在文章页脚显示 [评论部分]({{< ref "partials#comments" >}})。 |
-| `showSummary` | `list.showSummary` | 是否在文章或列表页显示摘要。 |
-| `showViews` | `article.showViews` | 是否显示文章和列表页面的阅读量。这需要集成 firebase ,具体可以看[这个页面]({{< ref "firebase-views" >}})来了解如何在 Blowfish 中集成firebase。 |
-| `showLikes` | `article.showLikes` | 是否显示文章和列表页面的点赞量。这需要集成 firebase ,具体可以看[这个页面]({{< ref "firebase-views" >}})来了解如何在 Blowfish 中集成firebase。 |
-| `seriesOpened` | `article.seriesOpened` | 是否打开系列模块。 |
-| `series` | 无 | 文章所属的系列数组,我们建议每篇文章只属于一个系列。 |
-| `series_order` | 无 | 文章在系列中的编号。 |
-| `summary` | Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}})) | 当启用 `showSummary` 时,这是作为这篇文章摘要的Markdown字符串。 |
-| `xml` | `true` unless excluded by `sitemap.excludedKinds` | 是否将这篇文章包含在生成的 `/sitemap.xml` 文件中。 |
-| `layoutBackgroundBlur` | `true` | 向下滚动主页时,是否模糊背景图。 |
-| `layoutBackgroundHeaderSpace` | `true` | 在标题和正文之间添加空白区域间隔。 |
+| `sharingLinks` | `article.sharingLinks` | 指定文章结尾显示哪些分享链接。如果没有设置或设置为 `false` ,则没有分享链接。 |
+| `showAuthor` | `article.showAuthor` | 是否在页脚处显示作者框。 |
+| `authors` | 无 | 用于展示多创作者的数组,如果设置了将会覆盖 `showAuthor` 设置。这里使用了多作者的特性,查看[这个页面]({{< ref "multi-author" >}})来获取更多信息。 |
+| `showAuthorsBadges` | `article.showAuthorsBadges` | 是否在文章和列表页展示`authors`作者分类。想是它生效需要开启`multiple authors`多创作者和 `authors` 作者分类。 查看[这个页面]({{< ref "multi-author" >}})来获取更多信息。 |
+| `featureimage` | 无 | 基于外部 URL 的特征图片链接。
+| `featureimagecaption` | 无 | 特征图片的说明,仅在 hero 样式的 `big` 风格下展示。
+| `showHero` | `article.showHero` | 是否在文章页面将所裸土作为文章页面内的 hero 图片显示。 |
+| `heroStyle` | `article.heroStyle` | hero 图片的风格,合法的值有: `basic`、`big`、`background`、`thumbAndBackground`。 |
+| `showBreadcrumbs` | `article.showBreadcrumbs` or `list.showBreadcrumbs` | 是否在文章或列表页面显示面包屑导航。 |
+| `showDate` | `article.showDate` | 是否显示文章的日期。具体日期使用 `date` 参数设置。 |
+| `showDateUpdated` | `article.showDateUpdated` | 是否显示文章的更新日期。具体日期使用 `lastmod` 参数设置。 |
+| `showEdit` | `article.showEdit` | 是否显示编辑文章内容的链接。 |
+| `showHeadingAnchors` | `article.showHeadingAnchors` | 是否在文章的标题旁显示锚点链接。 |
+| `showPagination` | `article.showPagination` | 是否在文章页脚显示下一篇/上一篇链接。 |
+| `invertPagination` | `article.invertPagination` | 是否翻转下一篇/上一篇的链接方向。 |
+| `showReadingTime` | `article.showReadingTime` | 是否显示文章的预估阅读时间。 |
+| `showTaxonomies` | `article.showTaxonomies` | 是否显示文章关联的分类/标签。 |
+| `showTableOfContents` | `article.showTableOfContents` | 是否显示文章目录。 |
+| `showWordCount` | `article.showWordCount` | 是否显示文章字数统计。如果你的语言属于 CJK 语言,需要在 `config.toml` 中开启 `hasCJKLanguage` 参数。 |
+| `showComments` | `article.showComments` | 是否在文章页脚显示 [评论部分]({{< ref "partials#comments" >}})。 |
+| `showSummary` | `list.showSummary` | 是否在文章或列表页显示摘要。 |
+| `showViews` | `article.showViews` | 是否显示文章和列表页面的阅读量。这需要集成 firebase ,具体可以看[这个页面]({{< ref "firebase-views" >}})来了解如何在 Blowfish 中集成firebase。 |
+| `showLikes` | `article.showLikes` | 是否显示文章和列表页面的点赞量。这需要集成 firebase ,具体可以看[这个页面]({{< ref "firebase-views" >}})来了解如何在 Blowfish 中集成firebase。 |
+| `seriesOpened` | `article.seriesOpened` | 是否打开系列模块。 |
+| `series` | 无 | 文章所属的系列数组,我们建议每篇文章只属于一个系列。 |
+| `series_order` | 无 | 文章在系列中的编号。 |
+| `summary` | Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}})) | 当启用 `showSummary` 时,这是作为这篇文章摘要的Markdown字符串。 |
+| `xml` | `true` unless excluded by `sitemap.excludedKinds` | 是否将这篇文章包含在生成的 `/sitemap.xml` 文件中。 |
+| `layoutBackgroundBlur` | `true` | 向下滚动主页时,是否模糊背景图。 |
+| `layoutBackgroundHeaderSpace` | `true` | 在标题和正文之间添加空白区域间隔。 |
diff --git a/exampleSite/content/docs/multi-author/index.zh-cn.md b/exampleSite/content/docs/multi-author/index.zh-cn.md
new file mode 100644
index 00000000..c92adb31
--- /dev/null
+++ b/exampleSite/content/docs/multi-author/index.zh-cn.md
@@ -0,0 +1,100 @@
+---
+title: "多创作者模式"
+date: 2020-08-10
+draft: false
+description: "为你的文章设置多个作者。"
+slug: "multi-author"
+tags: ["作者", "配置", "文档"]
+series: ["文档集"]
+series_order: 10
+showAuthor: true
+authors:
+ - "nunocoracao"
+showAuthorsBadges : false
+---
+
+一个网站会有多个创作者共同贡献内容,所以需要再整个网站中默认使用多创作者。对于这种情况,Blowfish 允许用户使用多创作者功能拓展创作者列表。
+
+为了保持向后兼容,这个功能仅允许定义额外的创作者,并不会以任何方式修改之前通过配置文件添加的创作者。
+
+## 新建创作者
+
+新建创作者的第一步是设置一个 `./data/authors` 文件夹。然后,你可以在里面简单的添加新创作者的 `json` 文件。文件的名称是你在文章引用该作者时需要指定的 `key`。
+
+例如,在 `./data/authors` 文件夹中新建一个 `nunocoracao.json` 文件。文件的内容示例如下。`name`、`image`、`bio` 和 `social` 是目前创作者文件支持的4个参数,这与你在 `languages.[language-code].toml` 配置文件中的默认创作者配置类似。
+
+_注意:社交参数中的 `key` 将会默认获取主题的图标 icon,当然你也可以在 `assests/icons` 文件夹中设置任何图标。_
+
+```json
+{
+ "name": "Nuno Coração",
+ "image" : "img/nuno_avatar.jpg",
+ "bio": "Theme Creator",
+ "social": [
+ { "linkedin": "https://linkedin.com/in/nunocoracao" },
+ { "twitter": "https://twitter.com/nunocoracao" },
+ { "instagram": "https://instagram.com/nunocoracao" },
+ { "medium": "https://medium.com/@nunocoracao" },
+ { "github": "https://github.com/nunocoracao" },
+ { "goodreads": "http://goodreads.com/nunocoracao" },
+ { "keybase": "https://keybase.io/nunocoracao" },
+ { "reddit": "https://reddit.com/user/nunoheart" }
+ ]
+}
+```
+
+## 在文章中引用创作者
+
+你已经新建好了创作者,下一步让我们在文章中引用它。在下面的实例中,我们使用前面新建的创作者 `key` 来引用它。
+
+Blowfish 将会使用额外创作者对应`json`文件中的数据,以帮助在文章中渲染此作者。这个功能不会以改变整个站点配置的默认作者,因此你可以分别控制他们。使用 `showAuthor` 参数,可以配置是否显示默认作者,这适用于单创作者的博客。扉页中的 `authors` 参数允许你为文章定义额外的创作者,这里的创作者将独立于整个站点中的默认创作者。
+
+```md
+---
+title: "多创作者"
+date: 2020-08-10
+draft: false
+description: "为你的文章设置多个作者。"
+slug: "multi-author"
+tags: ["authors", "config", "docs"]
+showAuthor: true
+authors:
+ - "nunocoracao"
+showAuthorsBadges : false
+---
+```
+
+上面这个示例和当前这个页面一样,将显示默认创作者和新创作者。你可以滚动此页面来查看实际效果。
+
+## 新建创作者分类法
+
+如果你想要获取每个作者的文章列表,需要配置 `authors` 分类,这会让你了解到一些更有趣的配置。这个是多创作者模式中的一个可选步骤。
+To get lists of articles for each of your authors you can configure the `authors` taxonomy, which opens up some more configurations that might be interesting. This is an optional step in the process that is not required to display the authors in your articles.
+
+第一步是在 `config.toml` 文件中配置 `authors` 分类法,如下所示。尽管 `tag` 和 `category` 默认是 Hugo 定义的,但只要你添加了一个特定的分类法,就需要显式添加 `tag` 和 `category`,否则基于 Hugo 的文件加载顺序,站点将不会处理 `tag` 和 `category`。
+
+```toml
+[taxonomies]
+ tag = "tags"
+ category = "categories"
+ author = "authors"
+```
+
+这样一来,你将会有一个所有创作者列表的页面,并且每个创作者都会显示他们参与创作的文章列表。如果你想在每个文章中以徽章的形式中展示作者,有两种方式:在全局配置文件添加 `article.showAuthorsBadges` 参数 或 在每篇文章的扉页参数中配置 `showAuthorsBadges`参数。
+
+最后,你可以为每个创作者页面添加更多细节内容,以便显示简介、链接或者适合你需求的任何其他信息。为了实现这一点,需要在 `./content/authors` 文件夹中为每个创作者添加一个目录名为 `key` 的文件夹,并在文件夹中添加 `_index.md` 文件,对于上面的例子,我们会得到一个 `.content/authors/nunocoracao/_index.md` 文件。在这个文件中你可以添加创作者的实际姓名和他们自己的个人信息页面。本文档站点中的作者就是这么配置的,你可以在文档站点中查看实际效果。
+
+```md
+---
+title: "Nuno Coração"
+---
+
+Nuno's awesome dummy bio.
+
+```
+
+## 示例
+
+下面这个示例,介绍了演示了如何关闭站点默认创作者,并在文章中添加多创作者。
+
+{{< article link="/samples/multiple-authors/" >}}
\ No newline at end of file
diff --git a/exampleSite/content/docs/thumbnails/index.zh-cn.md b/exampleSite/content/docs/thumbnails/index.zh-cn.md
new file mode 100644
index 00000000..4c332f3e
--- /dev/null
+++ b/exampleSite/content/docs/thumbnails/index.zh-cn.md
@@ -0,0 +1,46 @@
+---
+title: "缩略图"
+date: 2020-08-10
+draft: false
+description: "为你的文章配置缩略图。"
+slug: "thumbnails"
+tags: ["缩略图", "配置", "文档"]
+series: ["文档集"]
+series_order: 6
+---
+
+## 缩略图
+
+Blowfish 对视觉支持进行了增强,可以让你轻松地为文章添加缩略图。你只需要将一个以 `feature*` 开头的图像文件(支持几乎所有格式,但更推荐 `.png` 或 `.jpg`)放置在文章所在的目录中,如下面所示:
+
+```shell
+content
+└── awesome_article
+ ├── index.md
+ └── featured.png
+```
+
+这将告诉 Blowfish 这篇文章有一个特征图片,这个图片可以在网站作为缩略图使用,也可以用于社交平台上的 oEmbed 卡片。
+
+## 文件结构
+
+如果你仅仅使用一个 `.md` 文件作为文章,文件结构如下所示:
+
+```shell
+content
+└── awesome_article.md
+```
+
+如果想添加缩略图,你需要将单个 Markdown 文件放在文件夹中。创建一个与文章同名的目录,在其中创建 `index.md` 文件。文件结构如下所示:
+
+```shell
+content
+└── awesome_article
+ └── index.md
+```
+
+然后你只需要像之前那样添加一个特征图片。如果你想看示例,你可以参 [这个示例]({{< ref "thumbnail_sample" >}})。
+
+## Hero 图片
+
+缩略图将默认用作每篇文章的 hero 图片。开启此功能,可以使用全局的 `article.showHero` 参数来控制整个站点所有文章,或者扉页参数 `showHero` 来控制其中一个文章。如果你想覆盖 hero 图片的样式,你可以在 `./layouts/partials/` 文件夹中创建一个名为 `hero.html` 的文件,它会覆盖主题中的默认部分。
From 44b3b17faccc53d6a766912e65f59165a4d00733 Mon Sep 17 00:00:00 2001
From: Weaxs <459312872@qq.com>
Date: Wed, 20 Mar 2024 11:52:16 +0800
Subject: [PATCH 07/10] translate thumbnails, multi-author, samples,icons,
thumbnail_sample to zh-cn
---
exampleSite/content/samples/_index.zh-cn.md | 20 +++
.../content/samples/icons/index.zh-cn.md | 116 ++++++++++++++++++
.../samples/thumbnail_sample/index.zh-cn.md | 40 ++++++
3 files changed, 176 insertions(+)
create mode 100644 exampleSite/content/samples/_index.zh-cn.md
create mode 100644 exampleSite/content/samples/icons/index.zh-cn.md
create mode 100644 exampleSite/content/samples/thumbnail_sample/index.zh-cn.md
diff --git a/exampleSite/content/samples/_index.zh-cn.md b/exampleSite/content/samples/_index.zh-cn.md
new file mode 100644
index 00000000..20d81083
--- /dev/null
+++ b/exampleSite/content/samples/_index.zh-cn.md
@@ -0,0 +1,20 @@
+---
+title: "Samples"
+description: "See what's possible with Blowfish."
+
+cascade:
+ showEdit: false
+ showSummary: false
+ hideFeatureImage: true
+---
+
+{{< lead >}}
+Blowfish 让你的内容栩栩如生。 :heart_eyes:
+{{< /lead >}}
+
+本节包含一些演示页面,展示了Blowfish如何呈现不同类型的内容。你还可以看到一个[分类列表]({{< ref "tags" >}})页面的示例。
+
+
+_**旁注:** 这个页面只是一个标准的Blowfish文章列表,并且已经配置了Hugo来生成一个`samples`内容类型并显示文章摘要。_
+
+---
diff --git a/exampleSite/content/samples/icons/index.zh-cn.md b/exampleSite/content/samples/icons/index.zh-cn.md
new file mode 100644
index 00000000..c956e657
--- /dev/null
+++ b/exampleSite/content/samples/icons/index.zh-cn.md
@@ -0,0 +1,116 @@
+---
+title: "图标"
+date: 2020-08-14
+lastmod: 2022-03-09
+draft: false
+description: "Blowfish 支持的图标。"
+slug: "icons"
+tags: ["图标", "示例", "短代码"]
+type: 'sample'
+---
+
+Blowfish 内置了许多 [FontAwesome 6](https://fontawesome.com/icons) 中的图标。你可以使用 [图标部分]({{< ref "docs/partials#icon" >}})或者[图标短代码]({{< ref "docs/shortcodes#icon" >}})将这些图标包含在你的网站中。
+
+当然,Blowfish 完全支持自定义图标。只需要将自己的 SVG 文件放在 `assets/icons/` 目录下即可。图标目录中的任何图标可以在整个主题中使用。为了实现自动填充颜色,每个 SVG 图标源码中必须添加 `fill="currentColor"` 属性。
+
+下面是所有的内置图标及其名称。
+
+| 图标名称 | 预览 |
+|----------------------|-----------------------------------|
+| amazon | {{< icon amazon >}} |
+| apple | {{< icon apple >}} |
+| bars | {{< icon bars >}} |
+| bell | {{< icon bell >}} |
+| blogger | {{< icon blogger >}} |
+| bluesky | {{< icon bluesky >}} |
+| bomb | {{< icon bomb >}} |
+| bug | {{< icon bug >}} |
+| check | {{< icon check >}} |
+| circle-info | {{< icon circle-info >}} |
+| code | {{< icon code>}} |
+| codepen | {{< icon codepen >}} |
+| comment | {{< icon comment >}} |
+| dev | {{< icon dev >}} |
+| discourse | {{< icon discourse >}} |
+| docker | {{< icon docker >}} |
+| download | {{< icon download >}} |
+| dribbble | {{< icon dribbble >}} |
+| edit | {{< icon edit >}} |
+| email | {{< icon email >}} |
+| envelope | {{< icon envelope >}} |
+| expand | {{< icon expand >}} |
+| eye | {{< icon eye >}} |
+| facebook | {{< icon facebook >}} |
+| fire | {{< icon fire >}} |
+| flickr | {{< icon flickr >}} |
+| fork | {{< icon fork >}} |
+| foursquare | {{< icon foursquare >}} |
+| ghost | {{< icon ghost >}} |
+| github | {{< icon github >}} |
+| gitlab | {{< icon gitlab >}} |
+| globe | {{< icon globe >}} |
+| goodreads | {{< icon goodreads >}} |
+| google | {{< icon google >}} |
+| graduation-cap | {{< icon graduation-cap >}} |
+| hackernews | {{< icon hackernews >}} |
+| hashnode | {{< icon hashnode >}} |
+| heart-empty | {{< icon heart-empty >}} |
+| heart | {{< icon heart >}} |
+| image | {{< icon image >}} |
+| instagram | {{< icon instagram >}} |
+| keybase | {{< icon keybase >}} |
+| kickstarter | {{< icon kickstarter >}} |
+| ko-fi | {{< icon ko-fi >}} |
+| language | {{< icon language >}} |
+| lastfm | {{< icon lastfm >}} |
+| lightbulb | {{< icon lightbulb >}} |
+| link | {{< icon link >}} |
+| linkedin | {{< icon linkedin >}} |
+| list | {{< icon list >}} |
+| location-dot | {{< icon location-dot >}} |
+| lock | {{< icon lock >}} |
+| mastodon | {{< icon mastodon >}} |
+| medium | {{< icon medium >}} |
+| microsoft | {{< icon microsoft >}} |
+| moon | {{< icon moon >}} |
+| mug-hot | {{< icon mug-hot >}} |
+| music | {{< icon music >}} |
+| orcid | {{< icon orcid >}} |
+| patreon | {{< icon patreon >}} |
+| paypal | {{< icon paypal >}} |
+| pencil | {{< icon pencil >}} |
+| pgpkey | {{< icon pgpkey >}} |
+| phone | {{< icon phone >}} |
+| pinterest | {{< icon pinterest >}} |
+| poo | {{< icon poo >}} |
+| reddit | {{< icon reddit >}} |
+| researchgate | {{< icon researchgate >}} |
+| rss | {{< icon rss >}} |
+| rss-square | {{< icon rss-square >}} |
+| scale-balanced | {{< icon scale-balanced >}} |
+| search | {{< icon search >}} |
+| shield | {{< icon shield >}} |
+| skull-crossbones | {{< icon skull-crossbones >}} |
+| slack | {{< icon slack >}} |
+| snapchat | {{< icon snapchat >}} |
+| soundcloud | {{< icon soundcloud >}} |
+| stack-overflow | {{< icon stack-overflow >}} |
+| star | {{< icon star >}} |
+| steam | {{< icon steam >}} |
+| stripe | {{< icon stripe >}} |
+| substack | {{< icon substack >}} |
+| sun | {{< icon sun >}} |
+| tag | {{< icon tag >}} |
+| telegram | {{< icon telegram >}} |
+| threads | {{< icon threads >}} |
+| tiktok | {{< icon tiktok >}} |
+| triangle-exclamation | {{< icon triangle-exclamation >}} |
+| tumblr | {{< icon tumblr >}} |
+| twitch | {{< icon twitch >}} |
+| twitter | {{< icon twitter >}} |
+| wand-magic-sparkles | {{< icon wand-magic-sparkles >}} |
+| whatsapp | {{< icon whatsapp >}} |
+| x-twitter | {{< icon x-twitter >}} |
+| xing | {{< icon xing >}} |
+| xmark | {{< icon xmark >}} |
+| youtube | {{< icon youtube >}} |
diff --git a/exampleSite/content/samples/thumbnail_sample/index.zh-cn.md b/exampleSite/content/samples/thumbnail_sample/index.zh-cn.md
new file mode 100644
index 00000000..63dce5de
--- /dev/null
+++ b/exampleSite/content/samples/thumbnail_sample/index.zh-cn.md
@@ -0,0 +1,40 @@
+---
+title: "缩略图"
+date: 2022-09-26
+draft: false
+description: "在你的文章中开启缩略图。"
+slug: "thumbnail_sample"
+tags: ["thumbnail", "sample"]
+summary: "一个展示如何在你的文章中开始使用缩略图的快速示例。"
+type: 'sample'
+---
+
+这是一个在你的文章使用缩略图的快速示例。
+
+如果你的文章目录看起来像这样:
+If your average directory for an article looks like this:
+
+```shell
+content
+└── awesome_article.md
+```
+
+你需要将他从单个 markdown 文件更改为一个同名文件夹。创建一个与文章同名的目录,并在此目录中添加一个 `index.md` 文件。目录结构如下所示:
+
+```shell
+content
+└── awesome_article
+ └── featured.png
+```
+
+在文件夹内部,你可以添加一个 `feature*` 开头的特征图片(支持几乎所有格式,但推荐使用 `.png` 或 `.jpg`)。目录结构如下所示:
+
+```shell
+content
+└── awesome_article
+ ├── index.md
+ └── featured.png
+```
+
+这将告诉 Blowfish 这篇文章有一个特征图片,这个图片可以在网站作为缩略图使用,也可以用于社交平台上的 oEmbed 卡片。
+作为一个示例,你可以尝试将这篇文章的 URL 复制粘贴到一个可以显示 oEmbeds 的平台,如 Twitter、WhatsApp、Telegram等等。
From 1e7b2c58db11c22ab4e4e70f98e122f2457acd31 Mon Sep 17 00:00:00 2001
From: Weaxs <459312872@qq.com>
Date: Wed, 20 Mar 2024 19:17:33 +0800
Subject: [PATCH 08/10] enable hasCJKLanguage
---
exampleSite/config/_default/hugo.toml | 1 +
1 file changed, 1 insertion(+)
diff --git a/exampleSite/config/_default/hugo.toml b/exampleSite/config/_default/hugo.toml
index d8a9ec7b..f229bbcd 100644
--- a/exampleSite/config/_default/hugo.toml
+++ b/exampleSite/config/_default/hugo.toml
@@ -12,6 +12,7 @@ defaultContentLanguage = "en"
enableRobotsTXT = true
paginate = 100
summaryLength = 30
+hasCJKLanguage = true
buildDrafts = false
buildFuture = false
From c3719406ac34c83cfb534451db5e8e13950014bf Mon Sep 17 00:00:00 2001
From: Weaxs <459312872@qq.com>
Date: Wed, 20 Mar 2024 19:30:24 +0800
Subject: [PATCH 09/10] =?UTF-8?q?=E4=B8=AD=E6=96=87=EF=BC=88=E7=AE=80?=
=?UTF-8?q?=E4=BD=93=EF=BC=89=20->=20=E7=AE=80=E4=BD=93=E4=B8=AD=E6=96=87?=
=?UTF-8?q?=20=E4=B8=AD=E6=96=87=EF=BC=88=E7=B9=81=E9=AB=94=EF=BC=89=20->?=
=?UTF-8?q?=20=E7=B9=81=E9=AB=94=E4=B8=AD=E6=96=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
exampleSite/config/_default/languages.zh-cn.toml | 4 ++--
i18n/zh-CN.yaml | 2 +-
i18n/zh-TW.yaml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/exampleSite/config/_default/languages.zh-cn.toml b/exampleSite/config/_default/languages.zh-cn.toml
index b7fa7ecd..cc05c68c 100644
--- a/exampleSite/config/_default/languages.zh-cn.toml
+++ b/exampleSite/config/_default/languages.zh-cn.toml
@@ -1,10 +1,10 @@
languageCode = "zh-cn"
-languageName = "中文(简体)"
+languageName = "简体中文"
weight = 2
title = "Blowfish"
[params]
- displayName = "中文(简体)"
+ displayName = "简体中文"
isoCode = "zh-cn"
rtl = false
dateFormat = "2006-01-02"
diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml
index e7c490af..737f9caf 100644
--- a/i18n/zh-CN.yaml
+++ b/i18n/zh-CN.yaml
@@ -1,5 +1,5 @@
global:
- language: "中文(简体)"
+ language: "简体中文"
article:
anchor_label: "锚点"
diff --git a/i18n/zh-TW.yaml b/i18n/zh-TW.yaml
index e2718f36..022fc586 100644
--- a/i18n/zh-TW.yaml
+++ b/i18n/zh-TW.yaml
@@ -1,5 +1,5 @@
global:
- language: "中文(繁體)"
+ language: "繁體中文"
article:
anchor_label: "定位點"
From 433b51208d280d02a7c38fb9bf5cc1a13c5a232d Mon Sep 17 00:00:00 2001
From: Weaxs <459312872@qq.com>
Date: Wed, 20 Mar 2024 19:37:37 +0800
Subject: [PATCH 10/10] fix
---
exampleSite/content/docs/firebase-views/index.zh-cn.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/exampleSite/content/docs/firebase-views/index.zh-cn.md b/exampleSite/content/docs/firebase-views/index.zh-cn.md
index 2927dcf5..b55cd07c 100644
--- a/exampleSite/content/docs/firebase-views/index.zh-cn.md
+++ b/exampleSite/content/docs/firebase-views/index.zh-cn.md
@@ -2,7 +2,7 @@
title: "Firebase: 阅读量 & 点赞量"
date: 2020-08-03
draft: false
-description: "了解 Blowfish 如何继承 Firebase,并动态显示阅读量和点赞量。"
+description: "了解 Blowfish 如何集成 Firebase,并动态显示阅读量和点赞量。"
slug: "firebase-views"
tags: ["firebase", "阅读量", "点赞量"]
series: ["文档集"]
@@ -14,7 +14,7 @@ series_order: 15
1. 访问 Firebase 并创建一个账户
2. 创建一个新项目
3. 选择分析位置
-4. Blowfish 是通过 `params.toml` 配置文件中的 firebase 相关参数,来和 firebase 继承的,更多的细节内容可以参考 }}">这个页面。你可以在下面找到集成 firebase 的文件示例,请注意 FirebaseConfig 对象内的参数。
+4. Blowfish 是通过 `params.toml` 配置文件中的 firebase 相关参数,来和 firebase 集成的,更多的细节内容可以参考 }}">这个页面。你可以在下面找到集成 firebase 的文件示例,请注意 FirebaseConfig 对象内的参数。
```
// 从你需要的 SDK 中导入所需的函数