Nuno Coração 2024-04-07 19:56:46 +01:00
parent 6daf41ed2b
commit 56889bcbd4
11 changed files with 356 additions and 319 deletions

View file

@ -53,6 +53,7 @@ disableTextInHeader = false
showDateOnlyInArticle = false
showDateUpdated = false
showAuthor = true
# showAuthorBottom = false
showHero = false
# heroStyle = "basic" # valid options: basic, big, background, thumbAndBackground
layoutBackgroundBlur = true # only used when heroStyle equals background or thumbAndBackground

View file

@ -53,6 +53,7 @@ smartTOCHideUnfocusedChildren = false
showDateOnlyInArticle = false
showDateUpdated = false
showAuthor = true
# showAuthorBottom = false
showHero = true
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
layoutBackgroundBlur = true # only used when heroStyle equals background

View file

@ -63,7 +63,7 @@ Blowfish is optimised for full multilingual websites and theme assets are transl
The theme currently supports the following languages by default:
| Language | Code |
| ------------------------------ | ------- |
| ---------------------------- | ------- |
| Arabic | `ar` |
| Bulgarian | `bg` |
| Bengali | `bn` |
@ -163,7 +163,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
### Global
| Name | Default | Description |
| ------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `colorScheme` | `"blowfish"` | The theme colour scheme to use. Valid values are `blowfish` (default), `avocado`, `fire`, `ocean`, `forest`, `princess`, `neon`, `bloody`, `terminal`, `marvel`, `noir`, `autumn`, `congo`, and`slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details. |
| `defaultAppearance` | `"light"` | The default theme appearance, either `light` or `dark`. |
| `autoSwitchAppearance` | `true` | Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`. |
@ -219,6 +219,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `article.showDateOnlyInArticle` | `false` | Show date within article even if not displayed in article listings/cards. |
| `article.showDateUpdated` | `false` | Whether or not the dates articles were updated are displayed. |
| `article.showAuthor` | `true` | Whether or not the author box is displayed in the article footer. |
| `article.showAuthorBottom` | `false` | Author boxes are displayed at the bottom of each page instead of the top. |
| `article.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each article page. |
| `article.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. |
| `article.layoutBackgroundBlur` | `true` | Makes the background image in the background article heroStyle blur with the scroll |
@ -316,7 +317,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
### Umami Analytics
| Name | Default | Description |
| ------------------------ | --------- |-----------------------------------------------------------------------------------------------------------------------------------------------|
| -------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `umamiAnalytics.websiteid` | _Not set_ | The site code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `umamiAnalytics.domain` | _Not set_ | If using a custom domain with Umami Analytics, provide it here to serve `script.js` from the custom domain. |

View file

@ -63,7 +63,7 @@ Blowfish is optimised for full multilingual websites and theme assets are transl
The theme currently supports the following languages by default:
| Language | Code |
| ------------------------------ | ------- |
| ---------------------------- | ------- |
| Arabic | `ar` |
| Bulgarian | `bg` |
| Bengali | `bn` |
@ -163,7 +163,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
### Global
| Name | Default | Description |
| ------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `colorScheme` | `"blowfish"` | The theme colour scheme to use. Valid values are `blowfish` (default), `avocado`, `fire`, `ocean`, `forest`, `princess`, `neon`, `bloody`, `terminal`, `marvel`, `noir`, `autumn`, `congo`, and`slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details. |
| `defaultAppearance` | `"light"` | The default theme appearance, either `light` or `dark`. |
| `autoSwitchAppearance` | `true` | Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`. |
@ -219,6 +219,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `article.showDateOnlyInArticle` | `false` | Show date within article even if not displayed in article listings/cards. |
| `article.showDateUpdated` | `false` | Whether or not the dates articles were updated are displayed. |
| `article.showAuthor` | `true` | Whether or not the author box is displayed in the article footer. |
| `article.showAuthorBottom` | `false` | Author boxes are displayed at the bottom of each page instead of the top. |
| `article.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each article page. |
| `article.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. |
| `article.layoutBackgroundBlur` | `true` | Makes the background image in the background article heroStyle blur with the scroll |
@ -316,7 +317,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
### Umami Analytics
| Name | Default | Description |
| ------------------------ | --------- |-----------------------------------------------------------------------------------------------------------------------------------------------|
| -------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `umamiAnalytics.websiteid` | _Not set_ | The site code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `umamiAnalytics.domain` | _Not set_ | If using a custom domain with Umami Analytics, provide it here to serve `script.js` from the custom domain. |

View file

@ -63,7 +63,7 @@ Blowfish is optimised for full multilingual websites and theme assets are transl
The theme currently supports the following languages by default:
| Language | Code |
| ------------------------------ | ------- |
| ---------------------------- | ------- |
| Arabic | `ar` |
| Bulgarian | `bg` |
| Bengali | `bn` |
@ -163,7 +163,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
### Global
| Name | Default | Description |
| ------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `colorScheme` | `"blowfish"` | The theme colour scheme to use. Valid values are `blowfish` (default), `avocado`, `fire`, `ocean`, `forest`, `princess`, `neon`, `bloody`, `terminal`, `marvel`, `noir`, `autumn`, `congo`, and`slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details. |
| `defaultAppearance` | `"light"` | The default theme appearance, either `light` or `dark`. |
| `autoSwitchAppearance` | `true` | Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`. |
@ -219,6 +219,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `article.showDateOnlyInArticle` | `false` | Show date within article even if not displayed in article listings/cards. |
| `article.showDateUpdated` | `false` | Whether or not the dates articles were updated are displayed. |
| `article.showAuthor` | `true` | Whether or not the author box is displayed in the article footer. |
| `article.showAuthorBottom` | `false` | Author boxes are displayed at the bottom of each page instead of the top. |
| `article.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each article page. |
| `article.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. |
| `article.layoutBackgroundBlur` | `true` | Makes the background image in the background article heroStyle blur with the scroll |
@ -316,7 +317,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
### Umami Analytics
| Name | Default | Description |
| ------------------------ | --------- |-----------------------------------------------------------------------------------------------------------------------------------------------|
| -------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `umamiAnalytics.websiteid` | _Not set_ | The site code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `umamiAnalytics.domain` | _Not set_ | If using a custom domain with Umami Analytics, provide it here to serve `script.js` from the custom domain. |

View file

@ -39,7 +39,7 @@ Blowfish 主题支持了 Hugo 框架中定义的所有标准配置变量。但
<!-- prettier-ignore-start -->
| 名称 | 默认值 | 描述 |
|--------------------------|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ------------------------ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `theme` | `"blowfish"` | 当你使用 Hugo 模块安装时,应该移除这个配置项。但对 Git 子模块或本地文件复制的安装方式,必须将其设置为 blowfish 才能正常工作。 |
| `baseURL` | 无 | 网站 URL 根地址。 |
| `defaultContentLanguage` | `"en"` | 这个值决定了主题中组件和内容所使用的默认语言。 参考 [语言和 i18n](#language-and-i18n) 部分来了解 blowfish 支持的所有语言代码。 |
@ -64,7 +64,7 @@ Blowfish 针对多语言网站进行了优化,主题的资源素材目前已
Blowfish 主题目前默认支持了以下语言:
| 语言 | 代码 |
|------------------------------|---------|
| ---------------------------- | ------- |
| Arabic | `ar` |
| Bulgarian | `bg` |
| Bengali | `bn` |
@ -110,7 +110,7 @@ Blowfish 主题目前默认支持了以下语言:
<!-- prettier-ignore-start -->
| 名称 | 默认值 | 描述 |
|----------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------|
| -------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `languageCode` | `"en"` | Hugo 中的默认语言代码。他可以是一个高层级语言(例如 `en`),也可以是一个变体子语言(例如 `en-au`),但一定需要和语言配置文件中的语言代码相匹配。为了符合 HTML 的规范并设置设置大小写敏感的 `isoCode`Hugo希望这个值最好是小写。 |
| `languageName` | `"English"` | 语言名称。 |
| `weight` | `1` | 权重决定了在构建多语言时的语言顺序。 |
@ -121,7 +121,7 @@ Blowfish 主题目前默认支持了以下语言:
<!-- prettier-ignore-start -->
| 名称 | 默认值 | 描述 |
|------------------------|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| ---------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `params.displayName` | `"EN"` | 语言在网站中的展示名。 |
| `params.isoCode` | `"en"` | 用于 HTML 元数据的 ISO 语言代码。他可以是一个高层级语言(例如 `en`),也可以是一个变体子语言(例如 `en-au`)。 |
| `params.rtl` | `false` | 用于指定是否是 RTL 语言。设置为 `true` 则网站会从右向左重拍内容。Blowfish 完全支持同时使用 RTL 和 LTR 语言,并将动态调整。 |
@ -136,7 +136,7 @@ Blowfish 主题目前默认支持了以下语言:
#### 作者
| 名称 | 默认值 | 描述 |
|-------------------|-----------|------------------------------------------------------------------------------------------------------|
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `author.name` | 无 | 作者名。此参数将展示在文章页脚。并且如果主页使用了个人资料布局,也会展示此值。 |
| `author.image` | 无 | 作者头像的文件路径。图像应该是 1:1 的宽高比。可以放在网站的 `assets/` 文件夹中,也可以是外部 URL。 |
| `author.headline` | 无 | 包含作者头衔的 Markdown。它将展示在主页中作者姓名打分下方。 |
@ -163,7 +163,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### 全局
| 名称 | 默认值 | 描述 |
|---------------------------------|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `colorScheme` | `"blowfish"` | 主题使用的颜色方案。合法的值有: `blowfish` (默认)、`avocado`、`fire`、`ocean`、`forest`、`princess`、`neon`、`bloody`、`terminal`、`marvel`、`noir`、`autumn`、`congo` 和 `slate`。 具体参考[颜色方案]({{< ref "getting-started#colour-schemes" >}})以获取更多信息。 |
| `defaultAppearance` | `"light"` | 默认的主题外观,可以是 `light` 或者 `dark`。 |
| `autoSwitchAppearance` | `true` | 主题外观是否根据访问者操作系统的偏好自动切换。设置为 `false` 会强制网站始终使用 `defaultAppearance`。 |
@ -185,13 +185,13 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### 页头
| 名称 | 默认值 | 描述 |
| --------------- | --------- |----------------------------------------------------------------------------|
| --------------- | --------- | --------------------------------------------------------------------------------------------- |
| `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" 的主题归属信息。如果禁用此参数,请考虑在你网站的其他位置设置主题归属信息,例如在关于页面。 |
@ -201,7 +201,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### 主页
| 名称 | 默认值 | 描述 |
| ------------------------------- | ----------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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` | 是否在主页展示最新文章列表。 |
@ -215,13 +215,14 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### 文章页
| 名称 | 默认值 | 描述 |
| ------------------------------------- | --------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `article.showDate` | `true` | 是否显示日期。 |
| `article.showViews` | `false` | 是否显示文章阅读量。这需要集成 firebase ,具体可以看下面。 |
| `article.showLikes` | `false` | 是否显示文章点赞量。这需要集成 firebase ,具体可以看下面。 |
| `article.showDateOnlyInArticle` | `false` | 是否在文章内显示日期,不影响文章列表或卡片页面的日期显示。 |
| `article.showDateUpdated` | `false` | 是否展示文章的更新日期。 |
| `article.showAuthor` | `true` | 是否在文章底部显示作者框。 |
| `article.showAuthorBottom` | `false` | 作者框显示在每页的底部而不是顶部。 |
| `article.showHero` | `false` | 缩略图是否会在每个页面中作为 hero 图像显示。 |
| `article.heroStyle` | 无 | hero 图像的展示样式,可选的参数值有:`basic`、`big`、`background`、`thumbAndBackground`。 |
| `article.layoutBackgroundBlur` | `true` | 向下滚动文章页时,是否模糊背景图。 |
@ -249,7 +250,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### 列表页
| 名称 | 默认值 | 描述 |
| ---------------------------------- | --------- |--------------------------------------------------------------------------------------------------------------------------|
| ---------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `list.showHero` | `false` | 缩略图是否会在每个页面中作为 hero 图像显示。 |
| `list.heroStyle` | 无 | hero 图像的展示样式,可选的参数值有:`basic`、`big`、`background`、`thumbAndBackground`。 |
| `list.showBreadcrumbs` | `false` | 是否在标题栏显示面包屑导航。 |
@ -269,13 +270,13 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### 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`。 |
@ -288,7 +289,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### 术语
| 名称 | 默认值 | 描述 |
| -------------------------- | --------- |------------------------------------------------------------------------|
| -------------------------- | ------- | ------------------------------------------------------------------------------------------ |
| `term.showHero` | `false` | 缩略图是否会在每个页面中作为 hero 图像显示。 |
| `term.heroStyle` | 无 | hero 图像的展示样式,可选的参数值有: `basic`、`big`、`background`、`thumbAndBackground`。 |
| `term.showBreadcrumbs` | `false` | 是否在标题栏显示面包屑导航。 |
@ -302,7 +303,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### 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" >}})。 |
@ -314,14 +315,14 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### Fathom Analytics
| 名称 | 默认值 | 描述 |
| ------------------------ | --------- |---------------------------------------------------------------------|
| ------------------------ | ------ | ------------------------------------------------------------------------------------------- |
| `fathomAnalytics.site` | 无 | 支持 Fathom 站点分析平台。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 |
| `fathomAnalytics.domain` | 无 | 如果使用自定义域名的 Fathom Analytics请在此提供以便从自定义域名获取 `script.js`。 |
### Umami Analytics
| Name | Default | Description |
| ------------------------ | --------- |-------------------------------------------------------------------------------------------------------------|
| -------------------------- | --------- | ------------------------------------------------------------------------------------------ |
| `umamiAnalytics.websiteid` | _Not set_ | 支持 Umami 站点分析平台。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 |
| `umamiAnalytics.domain` | _Not set_ | 如果使用自定义域名的 Umami Analytics请在此提供以便从自定义域名获取 `script.js`。 |
@ -329,7 +330,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### BuyMeACoffee
| 名称 | 默认值 | 描述 |
| ----------------------------------- | --------- |---------------------------|
| ----------------------------------- | ------ | ---------------------------------- |
| `buymeacoffee.identifier` | 无 | buymeacoffee 账号的用户名。 |
| `buymeacoffee.globalWidget` | 无 | 激活位于全局的 buymeacoffee 组件。 |
| `buymeacoffee.globalWidgetMessage` | 无 | 新用户首次访问网站时显示的消息。 |
@ -338,7 +339,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
### 验证
| 名称 | 默认值 | 描述 |
|--------------------------| --------- |----------------------------------------------------------------------------------------|
| ------------------------ | ------ | -------------------------------------------------------- |
| `verification.google` | 无 | Google 提供的网站验证字符串,用于在网站元数据中包含。 |
| `verification.bing` | 无 | Bing 提供的网站验证字符串,用于在网站元数据中包含。 |
| `verification.pinterest` | 无 | Pinterest 提供的网站验证字符串,用于在网站元数据中包含。 |

View file

@ -26,10 +26,11 @@ Front matter parameter default values are inherited from the theme's [base confi
| `robots` | _Not set_ | String that indicates how robots should handle this article. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. |
| `sharingLinks` | `article.sharingLinks` | Which sharing links to display at the end of this article. When not provided, or set to `false` no links will be displayed. |
| `showAuthor` | `article.showAuthor` | Whether or not the author box for the default author is displayed in the article footer. |
| `showAuthorBottom` | `article.showAuthorBottom` | Author boxes are displayed at the bottom of each page instead of the top. |
| `authors` | _Not set_ | Array of values for authors, if set it overrides `showAuthor` settings for page or site. Used on the multiple authors feature, check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. |
| `showAuthorsBadges` | `article.showAuthorsBadges` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. |
| `featureimage` | _Not set_ | External URL for feature image
| `featureimagecaption` | _Not set_ | Caption for feature image. Only displayed in heroStyle `big`
| `featureimage` | _Not set_ | External URL for feature image |
| `featureimagecaption` | _Not set_ | Caption for feature image. Only displayed in heroStyle `big` |
| `showHero` | `article.showHero` | Whether the thumbnail image will be shown as a hero image within the article page. |
| `heroStyle` | `article.heroStyle` | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. |
| `showBreadcrumbs` | `article.showBreadcrumbs` or `list.showBreadcrumbs` | Whether the breadcrumbs are displayed in the article or list header. |

View file

@ -26,10 +26,11 @@ Front matter parameter default values are inherited from the theme's [base confi
| `robots` | _Not set_ | String that indicates how robots should handle this article. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. |
| `sharingLinks` | `article.sharingLinks` | Which sharing links to display at the end of this article. When not provided, or set to `false` no links will be displayed. |
| `showAuthor` | `article.showAuthor` | Whether or not the author box for the default author is displayed in the article footer. |
| `showAuthorBottom` | `article.showAuthorBottom` | Author boxes are displayed at the bottom of each page instead of the top. |
| `authors` | _Not set_ | Array of values for authors, if set it overrides `showAuthor` settings for page or site. Used on the multiple authors feature, check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. |
| `showAuthorsBadges` | `article.showAuthorsBadges` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. |
| `featureimage` | _Not set_ | External URL for feature image
| `featureimagecaption` | _Not set_ | Caption for feature image. Only displayed in heroStyle `big`
| `featureimage` | _Not set_ | External URL for feature image |
| `featureimagecaption` | _Not set_ | Caption for feature image. Only displayed in heroStyle `big` |
| `showHero` | `article.showHero` | Whether the thumbnail image will be shown as a hero image within the article page. |
| `heroStyle` | `article.heroStyle` | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. |
| `showBreadcrumbs` | `article.showBreadcrumbs` or `list.showBreadcrumbs` | Whether the breadcrumbs are displayed in the article or list header. |

View file

@ -26,10 +26,11 @@ Front matter parameter default values are inherited from the theme's [base confi
| `robots` | _Not set_ | String that indicates how robots should handle this article. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. |
| `sharingLinks` | `article.sharingLinks` | Which sharing links to display at the end of this article. When not provided, or set to `false` no links will be displayed. |
| `showAuthor` | `article.showAuthor` | Whether or not the author box for the default author is displayed in the article footer. |
| `showAuthorBottom` | `article.showAuthorBottom` | Author boxes are displayed at the bottom of each page instead of the top. |
| `authors` | _Not set_ | Array of values for authors, if set it overrides `showAuthor` settings for page or site. Used on the multiple authors feature, check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. |
| `showAuthorsBadges` | `article.showAuthorsBadges` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. |
| `featureimage` | _Not set_ | External URL for feature image
| `featureimagecaption` | _Not set_ | Caption for feature image. Only displayed in heroStyle `big`
| `featureimage` | _Not set_ | External URL for feature image |
| `featureimagecaption` | _Not set_ | Caption for feature image. Only displayed in heroStyle `big` |
| `showHero` | `article.showHero` | Whether the thumbnail image will be shown as a hero image within the article page. |
| `heroStyle` | `article.heroStyle` | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. |
| `showBreadcrumbs` | `article.showBreadcrumbs` or `list.showBreadcrumbs` | Whether the breadcrumbs are displayed in the article or list header. |

View file

@ -15,7 +15,7 @@ front matter 参数中的默认值是从[基础配置]({{< ref "configuration" >
<!-- prettier-ignore-start -->
| 名称 | 默认值 | 描述 |
|-------------------------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| ----------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title` | 无 | 文章名称。 |
| `description` | 无 | 文章的描述信息,它会被添加在 HTML 的 `<meta>` 元数据中。 |
| `externalUrl` | 无 | 如果文章发布在第三方网站上,这里提供只想对应文章的 URL 地址。提供 URL 将会组织生成内容页面,对这篇文章的任何引用都会直接跳转到第三方网站的 URL 上面。 |
@ -26,10 +26,11 @@ front matter 参数中的默认值是从[基础配置]({{< ref "configuration" >
| `robots` | 无 | 支持搜索引擎的爬虫如何处理这篇文章。如果设置了此值,它将在页面头部输出。更多内容请参考 [Google 文档](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives)。 |
| `sharingLinks` | `article.sharingLinks` | 指定文章结尾显示哪些分享链接。如果没有设置或设置为 `false` ,则没有分享链接。 |
| `showAuthor` | `article.showAuthor` | 是否在页脚处显示作者框。 |
| `showAuthorBottom` | `article.showAuthorBottom` | 作者框显示在每页的底部而不是顶部。 |
| `authors` | 无 | 用于展示多创作者的数组,如果设置了将会覆盖 `showAuthor` 设置。这里使用了多作者的特性,查看[这个页面]({{< ref "multi-author" >}})来获取更多信息。 |
| `showAuthorsBadges` | `article.showAuthorsBadges` | 是否在文章和列表页展示`authors`作者分类。想是它生效需要开启`multiple authors`多创作者和 `authors` 作者分类。 查看[这个页面]({{< ref "multi-author" >}})来获取更多信息。 |
| `featureimage` | 无 | 基于外部 URL 的特征图片链接。
| `featureimagecaption` | 无 | 特征图片的说明,仅在 hero 样式的 `big` 风格下展示。
| `featureimage` | 无 | 基于外部 URL 的特征图片链接。 |
| `featureimagecaption` | 无 | 特征图片的说明,仅在 hero 样式的 `big` 风格下展示。 |
| `showHero` | `article.showHero` | 是否在文章页面将所裸土作为文章页面内的 hero 图片显示。 |
| `heroStyle` | `article.heroStyle` | hero 图片的风格,合法的值有: `basic`、`big`、`background`、`thumbAndBackground`。 |
| `showBreadcrumbs` | `article.showBreadcrumbs` or `list.showBreadcrumbs` | 是否在文章或列表页面显示面包屑导航。 |

View file

@ -30,25 +30,25 @@
{{ $taxonomyLink := 0 }}
{{ $showAuthor := 0 }}
{{ if not (strings.HasSuffix $baseURL "/") }}
{{ $baseURL = delimit (slice $baseURL "/") "" }}
{{ end }}
{{ if not (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
{{ $showAuthor = 1 }}
{{ partial "author.html" . }}
{{ end }}
{{ if not (strings.HasSuffix $baseURL "/") }}
{{ $baseURL = delimit (slice $baseURL "/") "" }}
{{ end }}
{{ range $author := .Page.Params.authors }}
{{ $authorData := index $authorsData $author }}
{{- if $authorData -}}
{{ range $taxonomyname, $taxonomy := $taxonomies }}
{{ if (eq $taxonomyname $author) }}
{{ $taxonomyLink = delimit (slice $baseURL "/authors/" $author) "" }}
{{ end }}
{{ end }}
{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }}
{{- end -}}
{{ end }}
@ -57,6 +57,8 @@
<div class="mb-5"></div>
{{ end }}
{{ end }}
</header>
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
@ -81,6 +83,31 @@
{{ .Content | emojify }}
</div>
{{ if (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
{{ $showAuthor = 1 }}
{{ partial "author.html" . }}
{{ end }}
{{ range $author := .Page.Params.authors }}
{{ $authorData := index $authorsData $author }}
{{- if $authorData -}}
{{ range $taxonomyname, $taxonomy := $taxonomies }}
{{ if (eq $taxonomyname $author) }}
{{ $taxonomyLink = delimit (slice $baseURL "/authors/" $author) "" }}
{{ end }}
{{ end }}
{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }}
{{- end -}}
{{ end }}
{{ if or $taxonomyLink $showAuthor }}
<div class="mb-10"></div>
{{ end }}
{{ end }}
{{ partial "series/series-closed.html" . }}
{{ partial "sharing-links.html" . }}
{{ partial "related.html" . }}