diff --git a/.github/workflows/firebase-preview.yml b/.github/workflows/firebase-preview.yml index caa90cf25..382137b30 100644 --- a/.github/workflows/firebase-preview.yml +++ b/.github/workflows/firebase-preview.yml @@ -7,7 +7,7 @@ jobs: steps: - name: Hugo setup - uses: peaceiris/actions-hugo@v2.6.0 + uses: peaceiris/actions-hugo@v3.0.0 with: hugo-version: 0.120.4 extended: true diff --git a/.github/workflows/firebase-production.yml b/.github/workflows/firebase-production.yml index 7f276ca04..e620f2631 100644 --- a/.github/workflows/firebase-production.yml +++ b/.github/workflows/firebase-production.yml @@ -9,7 +9,7 @@ jobs: steps: - name: Hugo setup - uses: peaceiris/actions-hugo@v2.6.0 + uses: peaceiris/actions-hugo@v3.0.0 with: hugo-version: 0.120.4 extended: true diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 6aa8df80c..189ec4ba5 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -42,7 +42,7 @@ jobs: submodules: recursive - name: Setup Pages id: pages - uses: actions/configure-pages@v4 + uses: actions/configure-pages@v5 - name: Build with Hugo env: # For maximum backward compatibility with Hugo modules diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 14cdafe0b..1a918ba56 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Setup Hugo - uses: peaceiris/actions-hugo@v2.6.0 + uses: peaceiris/actions-hugo@v3.0.0 with: hugo-version: "latest" diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index 632d76504..968d4def2 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -2,7 +2,7 @@ # Refer to the theme docs for more details about each of these parameters. # https://blowfish.page/docs/getting-started/ -# theme = "blowfish" +theme = "blowfish" # baseURL = "https://your_domain.com/" defaultContentLanguage = "en" diff --git a/config/_default/params.toml b/config/_default/params.toml index b1f6ace52..51d5eac8e 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -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 diff --git a/exampleSite/config/_default/menus.zh-cn.toml b/exampleSite/config/_default/menus.zh-cn.toml index ad43c0463..6100b295e 100644 --- a/exampleSite/config/_default/menus.zh-cn.toml +++ b/exampleSite/config/_default/menus.zh-cn.toml @@ -43,7 +43,7 @@ weight = 40 [[main]] - name = "客户样例" + name = "用户列表" pageRef = "users" weight = 90 diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index aa3482ed4..0022e1581 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -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 diff --git a/exampleSite/content/_index.ja.md b/exampleSite/content/_index.ja.md index 0a0567216..e70f3ca76 100755 --- a/exampleSite/content/_index.ja.md +++ b/exampleSite/content/_index.ja.md @@ -14,7 +14,7 @@ description: "このページは Hugo の Blowfish テーマを利用して構 id="switch-layout-button" class="px-4 !text-neutral !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700" > - レイアウトを変更する ↻ + レイアウトを変更する↻ diff --git a/exampleSite/content/authors/nunocoracao/_index.ja.md b/exampleSite/content/authors/nunocoracao/_index.ja.md index caf705586..aba473154 100644 --- a/exampleSite/content/authors/nunocoracao/_index.ja.md +++ b/exampleSite/content/authors/nunocoracao/_index.ja.md @@ -2,4 +2,4 @@ title: "Nuno Coração" --- -Nuno's awesome dummy bio. +Nuno の素晴らしいダミープロフィールです。 diff --git a/exampleSite/content/authors/secondauthor/_index.ja.md b/exampleSite/content/authors/secondauthor/_index.ja.md index 039f902d4..6cd944978 100644 --- a/exampleSite/content/authors/secondauthor/_index.ja.md +++ b/exampleSite/content/authors/secondauthor/_index.ja.md @@ -1,5 +1,5 @@ --- -title: "Dummy Second Author" +title: "2人目のダミー作者" --- -Dummy Second Author's awesome dummy bio. +2人目のダミー作者の素晴らしいダミープロフィールです。 diff --git a/exampleSite/content/docs/configuration/index.it.md b/exampleSite/content/docs/configuration/index.it.md index 0abe430a0..8384efe14 100644 --- a/exampleSite/content/docs/configuration/index.it.md +++ b/exampleSite/content/docs/configuration/index.it.md @@ -62,8 +62,8 @@ Blowfish is optimised for full multilingual websites and theme assets are transl The theme currently supports the following languages by default: -| Language | Code | -| ------------------------------ | ------- | +| Language | Code | +| ---------------------------- | ------- | | Arabic | `ar` | | Bulgarian | `bg` | | Bengali | `bn` | @@ -138,7 +138,7 @@ The default file can be used as a template to create additional languages, or re | Name | Default | Description | | ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `author.name` | _Not set_ | The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used. | -| `author.image` | _Not set_ | Path to the image file of the author. The image should be a 1:1 aspect ratio. The image can be placed in the site's `assets/` folder or can be external url. | +| `author.image` | _Not set_ | Path to the image file of the author. The image should be a 1:1 aspect ratio. The image can be placed in the site's `assets/` folder or can be external url. | | `author.headline` | _Not set_ | A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name. | | `author.bio` | _Not set_ | A Markdown string containing the author's bio. It will be displayed in article footers. | | `author.links` | _Not set_ | The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`. | @@ -162,25 +162,25 @@ 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`. | -| `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | -| `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. | -| `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. | -| `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | -| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | -| `robots` | _Not set_ | String that indicates how robots should handle your site. 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. | -| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | -| `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. | -| `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | -| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | -| `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overridden by a local `featured` image. | -| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected | -| `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | -| `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | +| 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`. | +| `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | +| `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. | +| `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. | +| `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | +| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | +| `robots` | _Not set_ | String that indicates how robots should handle your site. 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. | +| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | +| `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. | +| `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | +| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | +| `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overridden by a local `featured` image. | +| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected | +| `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | +| `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | ### Header @@ -201,7 +201,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | Name | Default | Description | | ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `homepage.layout` | `"profile"` | The layout of the homepage. Valid values are `page`, `profile`, `hero`, `card`, `background`, or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | -| `homepage.homepageImage` | _Not set_ | Image to be used in `hero` and `card` layouts. Can be set as local image from asset directory or external image url. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | +| `homepage.homepageImage` | _Not set_ | Image to be used in `hero` and `card` layouts. Can be set as local image from asset directory or external image url. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | | `homepage.showRecent` | `false` | Whether or not to display the recent articles list on the homepage. | | `homepage.showRecentItems` | 5 | How many articles to display if showRecent is true. If variable is set to 0 or if it isn't defined the system will default to 5 articles. | | `homepage.showMoreLink` | `false` | Whether or not to display a show more link at the end of your posts that takes the user to a predefined place. | @@ -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 | @@ -313,6 +314,13 @@ Many of the article defaults here can be overridden on a per article basis by sp | `fathomAnalytics.site` | _Not set_ | The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | | `fathomAnalytics.domain` | _Not set_ | If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain. | +### 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. | + ### BuyMeACoffee | Name | Default | Description | diff --git a/exampleSite/content/docs/configuration/index.ja.md b/exampleSite/content/docs/configuration/index.ja.md index 0abe430a0..8384efe14 100644 --- a/exampleSite/content/docs/configuration/index.ja.md +++ b/exampleSite/content/docs/configuration/index.ja.md @@ -62,8 +62,8 @@ Blowfish is optimised for full multilingual websites and theme assets are transl The theme currently supports the following languages by default: -| Language | Code | -| ------------------------------ | ------- | +| Language | Code | +| ---------------------------- | ------- | | Arabic | `ar` | | Bulgarian | `bg` | | Bengali | `bn` | @@ -138,7 +138,7 @@ The default file can be used as a template to create additional languages, or re | Name | Default | Description | | ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `author.name` | _Not set_ | The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used. | -| `author.image` | _Not set_ | Path to the image file of the author. The image should be a 1:1 aspect ratio. The image can be placed in the site's `assets/` folder or can be external url. | +| `author.image` | _Not set_ | Path to the image file of the author. The image should be a 1:1 aspect ratio. The image can be placed in the site's `assets/` folder or can be external url. | | `author.headline` | _Not set_ | A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name. | | `author.bio` | _Not set_ | A Markdown string containing the author's bio. It will be displayed in article footers. | | `author.links` | _Not set_ | The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`. | @@ -162,25 +162,25 @@ 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`. | -| `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | -| `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. | -| `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. | -| `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | -| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | -| `robots` | _Not set_ | String that indicates how robots should handle your site. 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. | -| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | -| `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. | -| `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | -| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | -| `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overridden by a local `featured` image. | -| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected | -| `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | -| `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | +| 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`. | +| `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | +| `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. | +| `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. | +| `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | +| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | +| `robots` | _Not set_ | String that indicates how robots should handle your site. 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. | +| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | +| `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. | +| `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | +| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | +| `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overridden by a local `featured` image. | +| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected | +| `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | +| `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | ### Header @@ -201,7 +201,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | Name | Default | Description | | ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `homepage.layout` | `"profile"` | The layout of the homepage. Valid values are `page`, `profile`, `hero`, `card`, `background`, or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | -| `homepage.homepageImage` | _Not set_ | Image to be used in `hero` and `card` layouts. Can be set as local image from asset directory or external image url. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | +| `homepage.homepageImage` | _Not set_ | Image to be used in `hero` and `card` layouts. Can be set as local image from asset directory or external image url. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | | `homepage.showRecent` | `false` | Whether or not to display the recent articles list on the homepage. | | `homepage.showRecentItems` | 5 | How many articles to display if showRecent is true. If variable is set to 0 or if it isn't defined the system will default to 5 articles. | | `homepage.showMoreLink` | `false` | Whether or not to display a show more link at the end of your posts that takes the user to a predefined place. | @@ -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 | @@ -313,6 +314,13 @@ Many of the article defaults here can be overridden on a per article basis by sp | `fathomAnalytics.site` | _Not set_ | The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | | `fathomAnalytics.domain` | _Not set_ | If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain. | +### 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. | + ### BuyMeACoffee | Name | Default | Description | diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 0abe430a0..15b0a2c9c 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -62,8 +62,8 @@ Blowfish is optimised for full multilingual websites and theme assets are transl The theme currently supports the following languages by default: -| Language | Code | -| ------------------------------ | ------- | +| Language | Code | +| ---------------------------- | ------- | | Arabic | `ar` | | Bulgarian | `bg` | | Bengali | `bn` | @@ -138,7 +138,7 @@ The default file can be used as a template to create additional languages, or re | Name | Default | Description | | ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `author.name` | _Not set_ | The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used. | -| `author.image` | _Not set_ | Path to the image file of the author. The image should be a 1:1 aspect ratio. The image can be placed in the site's `assets/` folder or can be external url. | +| `author.image` | _Not set_ | Path to the image file of the author. The image should be a 1:1 aspect ratio. The image can be placed in the site's `assets/` folder or can be external url. | | `author.headline` | _Not set_ | A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name. | | `author.bio` | _Not set_ | A Markdown string containing the author's bio. It will be displayed in article footers. | | `author.links` | _Not set_ | The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`. | @@ -162,25 +162,25 @@ 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`. | -| `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | -| `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. | -| `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. | -| `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | -| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | -| `robots` | _Not set_ | String that indicates how robots should handle your site. 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. | -| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | -| `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. | -| `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | -| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | -| `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overridden by a local `featured` image. | -| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected | -| `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | -| `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | +| 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`. | +| `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | +| `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. | +| `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. | +| `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | +| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | +| `robots` | _Not set_ | String that indicates how robots should handle your site. 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. | +| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | +| `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. | +| `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | +| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | +| `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overridden by a local `featured` image. | +| `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main menu when selected | +| `smartTOC` | _Not set_ | Activate smart Table of Contents, items in view will be highlighted. | +| `smartTOCHideUnfocusedChildren` | _Not set_ | When smart Table of Contents is turned on, this will hide deeper levels of the table when they are not in focus. | ### Header @@ -201,7 +201,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | Name | Default | Description | | ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `homepage.layout` | `"profile"` | The layout of the homepage. Valid values are `page`, `profile`, `hero`, `card`, `background`, or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | -| `homepage.homepageImage` | _Not set_ | Image to be used in `hero` and `card` layouts. Can be set as local image from asset directory or external image url. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | +| `homepage.homepageImage` | _Not set_ | Image to be used in `hero` and `card` layouts. Can be set as local image from asset directory or external image url. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details. | | `homepage.showRecent` | `false` | Whether or not to display the recent articles list on the homepage. | | `homepage.showRecentItems` | 5 | How many articles to display if showRecent is true. If variable is set to 0 or if it isn't defined the system will default to 5 articles. | | `homepage.showMoreLink` | `false` | Whether or not to display a show more link at the end of your posts that takes the user to a predefined place. | @@ -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 | @@ -313,6 +314,14 @@ Many of the article defaults here can be overridden on a per article basis by sp | `fathomAnalytics.site` | _Not set_ | The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | | `fathomAnalytics.domain` | _Not set_ | If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain. | +### 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. | + + ### BuyMeACoffee | Name | Default | Description | diff --git a/exampleSite/content/docs/configuration/index.zh-cn.md b/exampleSite/content/docs/configuration/index.zh-cn.md index e80b6b769..48affd3a6 100644 --- a/exampleSite/content/docs/configuration/index.zh-cn.md +++ b/exampleSite/content/docs/configuration/index.zh-cn.md @@ -38,17 +38,17 @@ Blowfish 主题支持了 Hugo 框架中定义的所有标准配置变量。但 值得注意的是,表格中提供的变量名可以使用点表示法来简化 TOML 数据结构,例如 `outputs.home` 指的是 `[outputs] home`。 -| 名称 | 默认值 | 描述 | -|--------------------------|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `theme` | `"blowfish"` | 当你使用 Hugo 模块安装时,应该移除这个配置项。但对 Git 子模块或本地文件复制的安装方式,必须将其设置为 blowfish 才能正常工作。 | -| `baseURL` | 无 | 网站 URL 根地址。 | -| `defaultContentLanguage` | `"en"` | 这个值决定了主题中组件和内容所使用的默认语言。 参考 [语言和 i18n](#language-and-i18n) 部分来了解 blowfish 支持的所有语言代码。 | +| 名称 | 默认值 | 描述 | +| ------------------------ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `theme` | `"blowfish"` | 当你使用 Hugo 模块安装时,应该移除这个配置项。但对 Git 子模块或本地文件复制的安装方式,必须将其设置为 blowfish 才能正常工作。 | +| `baseURL` | 无 | 网站 URL 根地址。 | +| `defaultContentLanguage` | `"en"` | 这个值决定了主题中组件和内容所使用的默认语言。 参考 [语言和 i18n](#language-and-i18n) 部分来了解 blowfish 支持的所有语言代码。 | | `enableRobotsTXT` | `true` | 当开启这个值,`robots.txt` 文件将会被创建在站点根目录, 这将允许搜索引擎抓取整个网站。如果你想要自己提供 `robots.txt`,那么设置这个值为 `false` 并把你的文件放置到 `static` 目录下。 为了实现完全控制,你可以需要提供一个 [自定义布局]({{< ref "content-examples#custom-layouts" >}}) 来生成此文件。 | -| `paginate` | `10` | 定义文章列表中,每页展示的文章数量。 | -| `summaryLength` | `0` | 当[扉页参数]({{< ref "front-matter" >}}) 中没有提供文章摘要时,此参数定义了自动生成文章摘要的单词数量。如果值为`0`,则默认使用第一句话作为摘要。当摘要被隐藏,这个值没有任何效果。 | -| `outputs.home` | `["HTML", "RSS", "JSON"]` | 为站点自动生成输出格式。Blowfish 要求 HTML、RSS 和 JSON 都需要有,以保证主题组件可以正常运作。 | -| `permalinks` | 无 | 参考 [Hugo 文档](https://gohugo.io/content-management/urls/#permalinks) 中的自定义文章的固定链接配置。 | -| `taxonomies` | 无 | 参考 [整理内容]({{< ref "getting-started#organising-content" >}}) 中的分类器配置。 | +| `paginate` | `10` | 定义文章列表中,每页展示的文章数量。 | +| `summaryLength` | `0` | 当[扉页参数]({{< ref "front-matter" >}}) 中没有提供文章摘要时,此参数定义了自动生成文章摘要的单词数量。如果值为`0`,则默认使用第一句话作为摘要。当摘要被隐藏,这个值没有任何效果。 | +| `outputs.home` | `["HTML", "RSS", "JSON"]` | 为站点自动生成输出格式。Blowfish 要求 HTML、RSS 和 JSON 都需要有,以保证主题组件可以正常运作。 | +| `permalinks` | 无 | 参考 [Hugo 文档](https://gohugo.io/content-management/urls/#permalinks) 中的自定义文章的固定链接配置。 | +| `taxonomies` | 无 | 参考 [整理内容]({{< ref "getting-started#organising-content" >}}) 中的分类器配置。 | ## 缩略图 @@ -63,8 +63,8 @@ Blowfish 针对多语言网站进行了优化,主题的资源素材目前已 Blowfish 主题目前默认支持了以下语言: -| 语言 | 代码 | -|------------------------------|---------| +| 语言 | 代码 | +| ---------------------------- | ------- | | Arabic | `ar` | | Bulgarian | `bg` | | Bengali | `bn` | @@ -109,39 +109,39 @@ Blowfish 主题目前默认支持了以下语言: #### 全局 -| 名称 | 默认值 | 描述 | -|----------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------| +| 名称 | 默认值 | 描述 | +| -------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `languageCode` | `"en"` | Hugo 中的默认语言代码。他可以是一个高层级语言(例如 `en`),也可以是一个变体子语言(例如 `en-au`),但一定需要和语言配置文件中的语言代码相匹配。为了符合 HTML 的规范并设置设置大小写敏感的 `isoCode`,Hugo希望这个值最好是小写。 | -| `languageName` | `"English"` | 语言名称。 | -| `weight` | `1` | 权重决定了在构建多语言时的语言顺序。 | -| `title` | `"Blowfish"` | 网站的标题。它将在网站头部和底部进行展示。 | +| `languageName` | `"English"` | 语言名称。 | +| `weight` | `1` | 权重决定了在构建多语言时的语言顺序。 | +| `title` | `"Blowfish"` | 网站的标题。它将在网站头部和底部进行展示。 | #### 参数 -| 名称 | 默认值 | 描述 | -|------------------------|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------| -| `params.displayName` | `"EN"` | 语言在网站中的展示名。 | -| `params.isoCode` | `"en"` | 用于 HTML 元数据的 ISO 语言代码。他可以是一个高层级语言(例如 `en`),也可以是一个变体子语言(例如 `en-au`)。 | -| `params.rtl` | `false` | 用于指定是否是 RTL 语言。设置为 `true` 则网站会从右向左重拍内容。Blowfish 完全支持同时使用 RTL 和 LTR 语言,并将动态调整。 | -| `params.dateFormat` | `"2 January 2006"` | 用于指定如何日期格式化。参考 [Hugo 文档](https://gohugo.io/functions/format/#gos-layout-string) 了解可以支持的格式。 | -| `params.logo` | 无 | `assets/` 文件夹中站点 logo 的相对路径。该 logo 文件需要提供 2x 分辨率并支持任何图像尺寸。 | -| `params.secondaryLogo` | 无 | `assets/` 文件夹中站点次要 logo 的相对路径。该 logo 文件需要提供 2x 分辨率并支持任何图像尺寸。这个 logo 的颜色方案应该是和上面的是相反或对比的。如果设置了这个值,当用户从 `defaultAppearance` 模式切换时,将会显示这个 logo。 | -| `params.description` | 无 | 网站表述。此参数将会被用作站点元数据。 | -| `params.copyright` | 无 | 此参数是一个 Markdown,用于网站页脚的版权声明。此参数可以包含占位符 { year } ,以此动态插入当前年份。 如果没有提供,Blowfish 将会使用网站 `title` 自动生成版权信息。 | +| 名称 | 默认值 | 描述 | +| ---------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `params.displayName` | `"EN"` | 语言在网站中的展示名。 | +| `params.isoCode` | `"en"` | 用于 HTML 元数据的 ISO 语言代码。他可以是一个高层级语言(例如 `en`),也可以是一个变体子语言(例如 `en-au`)。 | +| `params.rtl` | `false` | 用于指定是否是 RTL 语言。设置为 `true` 则网站会从右向左重拍内容。Blowfish 完全支持同时使用 RTL 和 LTR 语言,并将动态调整。 | +| `params.dateFormat` | `"2 January 2006"` | 用于指定如何日期格式化。参考 [Hugo 文档](https://gohugo.io/functions/format/#gos-layout-string) 了解可以支持的格式。 | +| `params.logo` | 无 | `assets/` 文件夹中站点 logo 的相对路径。该 logo 文件需要提供 2x 分辨率并支持任何图像尺寸。 | +| `params.secondaryLogo` | 无 | `assets/` 文件夹中站点次要 logo 的相对路径。该 logo 文件需要提供 2x 分辨率并支持任何图像尺寸。这个 logo 的颜色方案应该是和上面的是相反或对比的。如果设置了这个值,当用户从 `defaultAppearance` 模式切换时,将会显示这个 logo。 | +| `params.description` | 无 | 网站表述。此参数将会被用作站点元数据。 | +| `params.copyright` | 无 | 此参数是一个 Markdown,用于网站页脚的版权声明。此参数可以包含占位符 { year } ,以此动态插入当前年份。 如果没有提供,Blowfish 将会使用网站 `title` 自动生成版权信息。 | #### 作者 -| 名称 | 默认值 | 描述 | -|-------------------|-----------|------------------------------------------------------------------------------------------------------| -| `author.name` | 无 | 作者名。此参数将展示在文章页脚。并且如果主页使用了个人资料布局,也会展示此值。 | -| `author.image` | 无 | 作者头像的文件路径。图像应该是 1:1 的宽高比。可以放在网站的 `assets/` 文件夹中,也可以是外部 URL。 | -| `author.headline` | 无 | 包含作者头衔的 Markdown。它将展示在主页中作者姓名打分下方。 | -| `author.bio` | 无 | 包含作者简介的 Markdown。它将展示在文章页脚。 | -| `author.links` | 无 | 与作者详细信息一起显示的链接。配置文件中包含示例链接,取消注释即可启用。链接展示的顺序由他们在数组中定义的顺序决定。如果你想自定义链接,可以在 `assets/icons/` 中提供相应的SVG图片。 | +| 名称 | 默认值 | 描述 | +| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `author.name` | 无 | 作者名。此参数将展示在文章页脚。并且如果主页使用了个人资料布局,也会展示此值。 | +| `author.image` | 无 | 作者头像的文件路径。图像应该是 1:1 的宽高比。可以放在网站的 `assets/` 文件夹中,也可以是外部 URL。 | +| `author.headline` | 无 | 包含作者头衔的 Markdown。它将展示在主页中作者姓名打分下方。 | +| `author.bio` | 无 | 包含作者简介的 Markdown。它将展示在文章页脚。 | +| `author.links` | 无 | 与作者详细信息一起显示的链接。配置文件中包含示例链接,取消注释即可启用。链接展示的顺序由他们在数组中定义的顺序决定。如果你想自定义链接,可以在 `assets/icons/` 中提供相应的SVG图片。 | ### 菜单 @@ -162,179 +162,188 @@ 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`。 | -| `enableSearch` | `false` | 是否开启网站的搜索功能,设为 `true` 即为启用。注意,搜索功能依赖于[站点设置](#site-configuration)中的 `outputs.home` 设置,请确保此值配置正确。 | -| `enableCodeCopy` | `false` | 是否可以将``代码块复制到剪贴板。想要使用代码复制功能,需要将 `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` | 无 | 当开启智能目录,如果目录级别不再被聚焦时,将会隐藏更深层次的目录。 | +| `defaultAppearance` | `"light"` | 默认的主题外观,可以是 `light` 或者 `dark`。 | +| `autoSwitchAppearance` | `true` | 主题外观是否根据访问者操作系统的偏好自动切换。设置为 `false` 会强制网站始终使用 `defaultAppearance`。 | +| `enableSearch` | `false` | 是否开启网站的搜索功能,设为 `true` 即为启用。注意,搜索功能依赖于[站点设置](#site-configuration)中的 `outputs.home` 设置,请确保此值配置正确。 | +| `enableCodeCopy` | `false` | 是否可以将``代码块复制到剪贴板。想要使用代码复制功能,需要将 `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.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` 时,显示返回顶部的箭头按钮。 | +| `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` | 向下滚动主页时,是否模糊背景图。 | +| `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` | 指定是否激活文章阅读的禅模式,即隐藏常规的界面元素。 | +| 名称 | 默认值 | 描述 | +| ------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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` | 向下滚动文章页时,是否模糊背景图。 | +| `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` | 是否显示目录。 | +| 名称 | 默认值 | 描述 | +| ---------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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` | 将列表展示为卡片容器。 | +| 名称 | 默认值 | 描述 | +| ------------------------------ | ------- | ----------------------------------------------------------------------------------------- | +| `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` | 增强列表中卡片的宽度,使其可以占据可用的全部宽度。 | +| 名称 | 默认值 | 描述 | +| -------------------------- | ------- | ------------------------------------------------------------------------------------------ | +| `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" >}})。 | +| 名称 | 默认值 | 描述 | +| ---------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `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`】。 | +| 名称 | 默认值 | 描述 | +| ------------------------ | ------ | ------------------------------------------------------------------------------------------- | +| `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`。 | + ### BuyMeACoffee -| 名称 | 默认值 | 描述 | -| ----------------------------------- | --------- |---------------------------| -| `buymeacoffee.identifier` | 无 | buymeacoffee 账号的用户名。 | -| `buymeacoffee.globalWidget` | 无 | 激活位于全局的 buymeacoffee 组件。 | -| `buymeacoffee.globalWidgetMessage` | 无 | 新用户首次访问网站时显示的消息。 | -| `buymeacoffee.globalWidgetColor` | 无 | 组件颜色,使用 HEX 格式。 | -| `buymeacoffee.globalWidgetPosition` | 无 | 组件位置,例如 "Left" 或 "Right"。 | +| 名称 | 默认值 | 描述 | +| ----------------------------------- | ------ | ---------------------------------- | +| `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 提供的网站验证字符串,用于在网站元数据中包含。 | +| 名称 | 默认值 | 描述 | +| ------------------------ | ------ | -------------------------------------------------------- | +| `verification.google` | 无 | Google 提供的网站验证字符串,用于在网站元数据中包含。 | +| `verification.bing` | 无 | Bing 提供的网站验证字符串,用于在网站元数据中包含。 | +| `verification.pinterest` | 无 | Pinterest 提供的网站验证字符串,用于在网站元数据中包含。 | +| `verification.yandex` | 无 | Yandex 提供的网站验证字符串,用于在网站元数据中包含。 | ## 别的配置文件 diff --git a/exampleSite/content/docs/front-matter/index.it.md b/exampleSite/content/docs/front-matter/index.it.md index 50126a5f6..38c477b49 100644 --- a/exampleSite/content/docs/front-matter/index.it.md +++ b/exampleSite/content/docs/front-matter/index.it.md @@ -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. | diff --git a/exampleSite/content/docs/front-matter/index.ja.md b/exampleSite/content/docs/front-matter/index.ja.md index 50126a5f6..38c477b49 100644 --- a/exampleSite/content/docs/front-matter/index.ja.md +++ b/exampleSite/content/docs/front-matter/index.ja.md @@ -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. | diff --git a/exampleSite/content/docs/front-matter/index.md b/exampleSite/content/docs/front-matter/index.md index 50126a5f6..38c477b49 100644 --- a/exampleSite/content/docs/front-matter/index.md +++ b/exampleSite/content/docs/front-matter/index.md @@ -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. | diff --git a/exampleSite/content/docs/front-matter/index.zh-cn.md b/exampleSite/content/docs/front-matter/index.zh-cn.md index 9a38bb821..bee821302 100644 --- a/exampleSite/content/docs/front-matter/index.zh-cn.md +++ b/exampleSite/content/docs/front-matter/index.zh-cn.md @@ -11,47 +11,48 @@ series_order: 7 除了 [Hugo 中默认的 front matter](https://gohugo.io/content-management/front-matter/#front-matter-variables),Blowfish 主题中还添加了大量的参数选项来自定义单个页面的展示方式。所有可用的扉页参数如下。 -扉页参数中的默认值是从[基础配置]({{< ref "configuration" >}})中继承的,所有只有当你想要覆盖默认值时,才需要在当前页面指定这些参数。 +front matter 参数中的默认值是从[基础配置]({{< 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 的特征图片链接。 -| `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` | 在标题和正文之间添加空白区域间隔。 | +| 名称 | 默认值 | 描述 | +| ----------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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` | 是否在页脚处显示作者框。 | +| `showAuthorBottom` | `article.showAuthorBottom` | 作者框显示在每页的底部而不是顶部。 | +| `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/getting-started/index.it.md b/exampleSite/content/docs/getting-started/index.it.md index b1235bad5..dcefb4554 100644 --- a/exampleSite/content/docs/getting-started/index.it.md +++ b/exampleSite/content/docs/getting-started/index.it.md @@ -1,21 +1,21 @@ --- -title: "Getting Started" +title: "Per iniziare" date: 2020-08-15 draft: false -description: "All the front matter variables available in Blowfish." -slug: "getting-started" -tags: ["installation", "docs"] -series: ["Documentation"] +description: "Tutte le variabili del front matter sono disponibili in Blowfish. +slug: "per-iniziare" +tags: ["installazione", "documenti"] +series: ["Documentazione"] series_order: 3 --- {{< alert >}} -This section assumes you have already [installed the Blowfish theme]({{< ref "docs/installation" >}}). +Questa sezione presuppone che si sia già [installato il tema Blowfish]({{< ref "docs/installation" >}}). {{< /alert >}}
{{< alert "fire" >}} -We just launched a CLI tool to help you get started with Blowfish. It will help you with installation and configuration. Install the CLI tool globally using: +Abbiamo appena lanciato uno strumento CLI per aiutarvi a iniziare con Blowfish. Vi aiuterà con l'installazione e la configurazione. Installate lo strumento CLI a livello globale utilizzando: ```bash npx blowfish-tools ``` diff --git a/exampleSite/content/docs/installation/index.it.md b/exampleSite/content/docs/installation/index.it.md index fd367e8b2..eb71b365f 100644 --- a/exampleSite/content/docs/installation/index.it.md +++ b/exampleSite/content/docs/installation/index.it.md @@ -1,83 +1,82 @@ --- -title: "Installation" +title: "Installazione" date: 2020-08-16 draft: false -description: "How to install the Blowfish theme." +description: "Come installare il tema Blowfish." slug: "installation" -tags: ["installation", "docs"] -series: ["Documentation"] +tags: ["installazione", "documenti"] +series: ["Documentazione"] series_order: 2 --- -Simply follow the standard Hugo [Quick Start](https://gohugo.io/getting-started/quick-start/) procedure to get up and running quickly. +Segui semplicemente la procedura standard [Avvio Rapido](https://gohugo.io/getting-started/quick-start/) di Hugo per iniziare subito. -Detailed installation instructions can be found below. Instructions for [updating the theme](#installing-updates) are also available. +Sono riportate le istruzioni dettagliate per l'installazione. Sono disponibili anche le istruzioni per [aggiornare il tema](#installazione-aggiornamenti). -## Installation +## Installazione -These instructions will get you up and running using Hugo and Blowfish from a completely blank state. Most of the dependencies mentioned in this guide can be installed using the package manager of choice for your platform. +Queste istruzioni ti consentiranno di iniziare a utilizzare Hugo e Blowfish partendo da uno stato completamente vuoto. La maggior parte delle dipendenze menzionate in questa guida possono essere installate utilizzando il gestore pacchetti corretti per la tua piattaforma. -### Install Hugo +### Installare Hugo -If you haven't used Hugo before, you will need to [install it onto your local machine](https://gohugo.io/getting-started/installing). You can check if it's already installed by running the command `hugo version`. +Se non hai mai utilizzato Hugo prima, dovrai [installarlo nella tua local machine] (https://gohugo.io/getting-started/installing). +Puoi verificare se hai già installato Hugo utilizzando il comando `hugo version`. {{< alert >}} -Make sure you are using **Hugo version 0.87.0** or later as the theme takes advantage of some of the latest Hugo features. +Assicurati di usare la **versione 0.87.0 di Hugo** o successiva, poiché il tema sfrutta alcune delle ultime caratteristiche di Hugo. {{< /alert >}} -You can find detailed installation instructions for your platform in the [Hugo docs](https://gohugo.io/getting-started/installing). +Puoi trovare le istruzioni dettagliate sull'installazione per la propria piattaforma in [Documenti Hugo](https://gohugo.io/getting-started/installing). -### Blowfish Tools (recommended) +### Strumenti Blowfish (raccomandato) -We just launched a new CLI tool to help you get started with Blowfish. It will create a new Hugo project, install the theme and set up the theme configuration files for you. It's still in beta so please [report any issues you find](https://github.com/nunocoracao/blowfish-tools). +Abbiamo appena lanciato un nuovo strumento CLI per aiutarti a iniziare con Blowfish. Questo ti permette di creare un nuovo progetto Hugo, di installare il tema e di impostare i file di configurazione del tema per te. È ancora in fase beta, quindi per favore [segnala qualsiasi problema che riscontri] (https://github.com/nunocoracao/blowfish-tools). -Install the CLI tool globally using npm (or other package manager): +Installa globalmente lo strumento CLI usando npm (o altri gestori di pacchetti): ```shell npx blowfish-tools ``` -or +oppure ```shell npm i -g blowfish-tools ``` -Then run the command `blowfish-tools` to start an interactive run which will guide you through creation and configuration use-cases. +Poi esegui il comando `blowfish-tools` per avviare un'esecuzione interattiva che ti guiderà attraverso la creazione e la configurazione dei casi d'uso. ```shell blowfish-tools ``` - -You can also run the command `blowfish-tools new` to create a new Hugo project and install the theme in one go. Check the CLI help for more information. +È anche possibile eseguire il comando `blowfish-tools new` per creare un nuovo progetto Hugo e installare il tema in una sola volta. Per ulteriori informazioni, consulta la guida del CLI. ```shell blowfish-tools new mynewsite ``` - -Here's a quick video of how fast it is to get started with Blowfish using the CLI tool: +Ecco un rapido video che ti mostra quanto sia veloce iniziare a utilizzare Blowfish con lo strumento CLI: -### Install Manually +### Installazione Manuale -#### Create a new site +#### Crea un novo sito -Run the command `hugo new site mywebsite` to create a new Hugo site in a directory named `mywebsite`. +Esegui il comando `hugo new site mywebsite` per creare un nuovo sito di Hugo in una cartella chiamata `mywebsite`. -Note that you can name the project directory whatever you choose, but the instructions below will assume it's named `mywebsite`. If you use a different name, be sure to substitute it accordingly. +La cartella del progetto può essere chiamata come si vuole, ma le istruzioni che seguono presuppongono che si chiami `mywebsite`. Se si usa un nome diverso, sostituiscilo di conseguenza. -#### Download the Blowfish theme +#### Scaricare il tema Blowfish -There several different ways to install the Blowfish theme into your Hugo website. From easiest to most difficult to install and maintain, they are: +Esistono diversi modi per installare il tema Blowfish nel proprio sito web Hugo. Dal più facile al più difficile da installare e mantenere, sono: - [Git submodule](#install-using-git) (recommended) - [Hugo module](#install-using-hugo) -- [Manual file copy](#install-manually) +- [Copia manuale dei file](#install-manually) -If you're unsure, choose the Git submodule method. +Se non sei sicuro, scegli il metodo Git submodule. -##### Install using git +##### Installazione usando Git -This method is the quickest and easiest for keeping the theme up-to-date. Besides **Hugo** and **Go**, you'll also need to ensure you have **Git** installed on your local machine. +Questo è il metodo piu facile e veloce per mantere il tema aggiornato. Oltre **Hugo** e **Go**, dovrai assicurarti di avere **Git** installato nel tuo local machine. -Change into the directory for your Hugo website (that you created above), initialise a new `git` repository and add Blowfish as a submodule. +cambia la directory del tuo sito web Hugo (che hai creato sopra), inizializza un nuovo repository `git` e aggiungi Blowfish come sottomodulo. ```bash cd mywebsite @@ -85,61 +84,61 @@ git init git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish ``` -Then continue to [set up the theme configuration files](#set-up-theme-configuration-files). +poi continua a [impostare i file di configurazione del tema](#set-up-theme-configuration-files). -##### Install using Hugo +##### Installazione usando Hugo -For this method you'll use Hugo to manage your themes. Hugo uses **Go** to initialise and manage modules so you need to ensure you have `go` installed before proceeding. +Per questo metodo utilizzerai Hugo per gestire i tuoi temi. Hugo utilizza **Go** per inizializzare e gestire i moduli, quindi assicurati di aver installato `go` prima di procedere. -1. [Download](https://golang.org/dl/) and install Go. You can check if it's already installed by using the command `go version`. +1. [Scarica](https://golang.org/dl/) e installa Go. Puoi verificare se l'hai già installato utilizzando il comando `go version`. {{< alert >}} - Make sure you are using **Go version 1.12** or later as Hugo requires this for modules to work correctly. + Assicurati di usare la **versione Go 1.12** o successive poiché Hugo lo richiede affinché i moduli funzionino correttamente. {{< /alert >}} -2. From your Hugo project directory (that you created above), initialise modules for your website: +2. Dalla directory del tuo progetto Hugo (che hai creato sopra), inizializza i moduli per il tuo sito web: ```shell - # If you're managing your project on GitHub - hugo mod init github.com// + # Se gestisci il tuo progetto su GitHub + Hugo mod init github.com// - # If you're managing your project locally - hugo mod init my-project + # Se gestisci il tuo progetto localmente + Hugo mod init my-project ``` -3. Add the theme to your configuration by creating a new file `config/_default/module.toml` and adding the following: +3. Aggiungi il tema alla tua configurazione creando un nuovo file `config/_default/module.toml` e aggiungendo quanto segue: ```toml [[imports]] path = "github.com/nunocoracao/blowfish/v2" ``` -4. Start your server using `hugo server` and the theme will be downloaded automatically. -5. Continue to [set up the theme configuration files](#set-up-theme-configuration-files). - -##### Install manually +4. Avvia il tuo server utilizzando `hugo server` e il tema verrà scaricato automaticamente. +5. Continua con [impostare i file di configurazione del tema](#set-up-theme-configuration-files). -1. Download the latest release of the theme source code. +##### Installazione manuale +1. Scarica l'ultima versione del codice sorgente del tema. - {{< button href="https://github.com/nunocoracao/blowfish/releases/latest" target="_blank" >}}Download from Github{{< /button >}} + {{< button href="https://github.com/nunocoracao/blowfish/releases/latest" target="_blank" >}}Scarica da Github{{< /button >}} -2. Extract the archive, rename the folder to `blowfish` and move it to the `themes/` directory inside your Hugo project's root folder. -3. Continue to [set up the theme configuration files](#set-up-theme-configuration-files). + "blowfish" e "themes/" +2. Estrai l'archivio, rinomina la cartella in `blowfish` spostala nella directory `themes/` all'interno della cartella principale del tuo progetto Hugo. +3. Continua con [impostare i file di configurazione del tema](#set-up-theme-configuration-files). -#### Set up theme configuration files +#### Imposta i file di configurazione del tema -In the root folder of your website, delete the `config.toml` file that was generated by Hugo. Copy the `*.toml` config files from the theme into your `config/_default/` folder. This will ensure you have all the correct theme settings and will enable you to easily customise the theme to your needs. +Nella cartella principale del tuo sito web, elimina il file `config.toml` generato da Hugo. Copia i file di configurazione `*.toml` dal tema nella tua cartella `config/_default/`. Ciò ti garantirà di avere tutte le impostazioni corrette del tema e ti consentirà di personalizzare facilmente il tema in base alle tue esigenze. {{< alert >}} -**Note:** You should not overwrite the `module.toml` file if one already exists in your project! +**Note:** Non dovresti sovrascrivere il file `module.toml` se ne esiste già uno nel tuo progetto! {{< /alert >}} -Depending on how you installed the theme you will find the theme config files in different places: +A seconda di come hai installato il tema, troverai i file di configurazione del tema in posti diversi: -- **Hugo Modules:** In the Hugo cache directory, or [download a copy](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/tree/main/config/_default) from GitHub -- **Git submodule or Manual install:** `themes/blowfish/config/_default` +- **Hugo modules:** Nella directory della cache di Hugo o [scarica una copia](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/ tree/main/config/_default) da GitHub +- **Git submodule o installazione manuale:** `themes/blowfish/config/_default` -Once you've copied the files, your config folder should look like this: +Una volta che hai copiato i file, la tua cartella delle configurazioni dovrebbe essere cosi: ```shell config/_default/ @@ -147,64 +146,64 @@ config/_default/ ├─ languages.en.toml ├─ markup.toml ├─ menus.en.toml -├─ module.toml # if you installed using Hugo Modules +├─ module.toml # se hai usato Hugo modules come installazione └─ params.toml ``` {{< alert >}} -**Important:** If you didn't use Hugo Modules to install Blowfish, you must add the line `theme = "blowfish"` to the top of your `config.toml` file. +**Importante:** Se non hai utilizzato Hugo Modules per installare Blowfish, devi aggiungere la riga `theme = "blowfish"` all'inizio del tuo file `config.toml`. {{< /alert >}} -### Next steps +### Passo successivo -The basic Blowfish installation is now complete. Continue to the [Getting Started]({{< ref "getting-started" >}}) section to learn more about configuring the theme. +L'installazione di base di Blowfish è ora completa. Continua alla sezione [Per iniziare]({{< ref "getting-started" >}}) per ulteriori informazioni sulla configurazione del tema. --- -## Installing updates +## Installazione degli aggiornamenti -From time to time there will be [new releases](https://github.com/nunocoracao/blowfish/releases) posted that apply fixes and add new functionality to the theme. In order to take advantage of these changes, you will need to update the theme files on your website. +Di tanto in tanto verranno pubblicate [nuove versioni](https://github.com/nunocoracao/blowfish/releases) che applicano correzioni e aggiungono nuove funzionalità al tema. Per sfruttare questi cambiamenti, dovrai aggiornare i file del tema sul tuo sito web. -How you go about this will depend on the installation method you chose when the theme was originally installed. Instructions for each method can be found below. +Il modo in cui procedere dipenderà dal metodo di installazione scelto al momento dell'installazione originale del tema. Le istruzioni per ciascun metodo sono disponibili di seguito. - [Git submodule](#update-using-git) - [Hugo module](#update-using-hugo) -- [Manual file copy](#update-manually) +- [Copia manuale del file](#aggiornamento-manuale) -### Update using git +### Aggiornamento utilizzando Git -Git submodules can be updated using the `git` command. Simply execute the following command and the latest version of the theme will be downloaded into your local repository: +I sottomoduli Git possono essere aggiornati utilizzando il comando `git`. Esegui semplicemente il comando seguente e l'ultima versione del tema verrà scaricata nel tuo repository locale: ```shell git submodule update --remote --merge ``` -Once the submodule has been updated, rebuild your site and check everything works as expected. +Una volta aggiornato il sottomodulo, riavvia il tuo sito e verifica che tutto funzioni come previsto. -### Update using Hugo +### Aggiornamento utilizzando Hugo -Hugo makes updating modules super easy. Simply change into your project directory and execute the following command: +Hugo rende l'aggiornamento dei moduli estremamente semplice. Basta passare alla directory del progetto ed eseguire il seguente comando: ```shell hugo mod get -u ``` -Hugo will automatically update any modules that are required for your project. It does this by inspecting your `module.toml` and `go.mod` files. If you have any issues with the update, check to ensure these files are still configured correctly. +Hugo aggiornerà automaticamente tutti i moduli richiesti per il tuo progetto. Lo fa controllando i file `module.toml` e `go.mod`. In caso di problemi con l'aggiornamento, assicurati che questi file siano ancora configurati correttamente. -Then simply rebuild your site and check everything works as expected. +Quindi riavvia semplicemente il tuo sito e verifica che tutto funzioni come previsto. -### Update manually +### Aggiornamenti manuali -Updating Blowfish manually requires you to download the latest copy of the theme and replace the old version in your project. +L'aggiornamento manuale di Blowfish richiede il download dell'ultima copia del tema e la sostituzione della vecchia versione nel progetto. {{< alert >}} -Note that any local customisations you have made to the theme files will be lost during this process. +Tieni presente che ogni personalizzazione locale apportata ai file del tema andranno perse durante questo processo. {{< /alert >}} -1. Download the latest release of the theme source code. +1. Scarica l'ultima versione del codice sorgente del tema. - {{< button href="https://github.com/nunocoracao/blowfish/releases/latest" target="_blank" >}}Download from Github{{< /button >}} + {{< button href="https://github.com/nunocoracao/blowfish/releases/latest" target="_blank" >}}Scarica da Github{{< /button >}} -2. Extract the archive, rename the folder to `blowfish` and move it to the `themes/` directory inside your Hugo project's root folder. You will need to overwrite the existing directory to replace all the theme files. +2. Estrai l'archivio, rinomina la cartella in "blowfish" e spostala nella directory "themes/" all'interno della cartella principale del tuo progetto Hugo. Dovrai sovrascrivere la directory esistente per sostituire tutti i file del tema. -3. Rebuild your site and check everything works as expected. +3. Riavvia il tuo sito e verifica che tutto funzioni come previsto. diff --git a/exampleSite/content/docs/installation/index.zh-cn.md b/exampleSite/content/docs/installation/index.zh-cn.md index fb1b59438..6338a5a57 100644 --- a/exampleSite/content/docs/installation/index.zh-cn.md +++ b/exampleSite/content/docs/installation/index.zh-cn.md @@ -9,7 +9,7 @@ series: ["部署教程"] series_order: 2 --- -如果想快速上有,可以按照标准的 Hugo [快速启动](https://gohugo.io/getting-started/quick-start/) 文档。 +如果想快速上手,可以按照标准的 Hugo [快速启动](https://gohugo.io/getting-started/quick-start/) 文档。 更详细的安装如下,[更新主题](#installing-updates)的教程也可以看此文档。 @@ -206,4 +206,4 @@ Hugo 将自动更新项目中所需的任何模块。它通过检查 `module.tom 2. 解压缩, 将文件夹重命名为 `blowfish`,并移动到根目录 `themes/` 目录下。你需要覆盖旧版以替换所有的主题文件。 -3. 重建站点,并检查网站是否一切正常。 \ No newline at end of file +3. 重建站点,并检查网站是否一切正常。 diff --git a/exampleSite/content/docs/partials/index.it.md b/exampleSite/content/docs/partials/index.it.md index 4af2a5366..66b6f8ba3 100644 --- a/exampleSite/content/docs/partials/index.it.md +++ b/exampleSite/content/docs/partials/index.it.md @@ -40,6 +40,19 @@ googleAnalytics = "UA-PROPERTY_ID" googleAnalytics = "G-MEASUREMENT_ID" ``` +### Umami Analytics + +To enable Umami Analytics support, simply provide your [Umami tracking code](https://umami.is/docs/collect-data) in the `config/_default/params.toml` file. +If you also use the custom domain feature of Umami and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Umami DNS (analytics.umami.is). + +```toml +# config/_default/params.toml + +[umamiAnalytics] + websiteid = "ABC12345" + domain = "llama.yoursite.com" +``` + ### Custom analytics providers If you wish to use a different analytics provider on your website you can also override the analytics partial and provide your own script. Simply create the file `layouts/partials/extend-head.html` in your project and it will automatically include it in the `` of the website. diff --git a/exampleSite/content/docs/partials/index.ja.md b/exampleSite/content/docs/partials/index.ja.md index 4af2a5366..66b6f8ba3 100644 --- a/exampleSite/content/docs/partials/index.ja.md +++ b/exampleSite/content/docs/partials/index.ja.md @@ -40,6 +40,19 @@ googleAnalytics = "UA-PROPERTY_ID" googleAnalytics = "G-MEASUREMENT_ID" ``` +### Umami Analytics + +To enable Umami Analytics support, simply provide your [Umami tracking code](https://umami.is/docs/collect-data) in the `config/_default/params.toml` file. +If you also use the custom domain feature of Umami and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Umami DNS (analytics.umami.is). + +```toml +# config/_default/params.toml + +[umamiAnalytics] + websiteid = "ABC12345" + domain = "llama.yoursite.com" +``` + ### Custom analytics providers If you wish to use a different analytics provider on your website you can also override the analytics partial and provide your own script. Simply create the file `layouts/partials/extend-head.html` in your project and it will automatically include it in the `` of the website. diff --git a/exampleSite/content/docs/partials/index.md b/exampleSite/content/docs/partials/index.md index 4af2a5366..43fe8d9f9 100644 --- a/exampleSite/content/docs/partials/index.md +++ b/exampleSite/content/docs/partials/index.md @@ -11,7 +11,7 @@ series_order: 9 ## Analytics -Blowfish provides built-in support for Fathom Analytics and Google Analytics. Fathom is a paid alternative to Google Analytics that respects user privacy. +Blowfish provides built-in support for Fathom Analytics, Google Analytics annd Umami Analytics. Fathom is a paid alternative to Google Analytics that respects user privacy. ### Fathom Analytics @@ -40,6 +40,19 @@ googleAnalytics = "UA-PROPERTY_ID" googleAnalytics = "G-MEASUREMENT_ID" ``` +### Umami Analytics + +To enable Umami Analytics support, simply provide your [Umami tracking code](https://umami.is/docs/collect-data) in the `config/_default/params.toml` file. +If you also use the custom domain feature of Umami and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Umami DNS (analytics.umami.is). + +```toml +# config/_default/params.toml + +[umamiAnalytics] + websiteid = "ABC12345" + domain = "llama.yoursite.com" +``` + ### Custom analytics providers If you wish to use a different analytics provider on your website you can also override the analytics partial and provide your own script. Simply create the file `layouts/partials/extend-head.html` in your project and it will automatically include it in the `` of the website. diff --git a/exampleSite/content/docs/partials/index.zh-cn.md b/exampleSite/content/docs/partials/index.zh-cn.md index 0f5c3f0c7..cd810c6eb 100644 --- a/exampleSite/content/docs/partials/index.zh-cn.md +++ b/exampleSite/content/docs/partials/index.zh-cn.md @@ -9,13 +9,15 @@ series: ["部署教程"] series_order: 9 --- -## Analytics +## 站点分析 -Blowfish provides built-in support for Fathom Analytics and Google Analytics. Fathom is a paid alternative to Google Analytics that respects user privacy. +Blowfish 支持了 Fathom、Google 和 Umami。Fathom 和 Umami 都是开源、简单、且注重隐私的站点分析服务,他们可以很好地替代 Google 分析。Fathom 和 Umami 都有公有云的付费版本,当然你也可以自己手动部署开源版。 -### Fathom Analytics -To enable Fathom Analytics support, simply provide your Fathom site code in the `config/_default/params.toml` file. If you also use the custom domain feature of Fathom and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Fathom DNS. +### Fathom + +要启用 Fathom Analytics 支持,只需在 `config/_default/params.toml` 文件中提供您的 Fathom 站点代码。如果您还使用 Fathom 的自定义域功能,并希望从您的域中提供脚本,还可以额外提供 `domain` 配置值。如果不提供 `domain` 值,脚本将直接从 Fath只需要在 `config/_default/params.toml` 文件提供你的 Fathom 站点代码,就可以快速支持 Fathom 站点分析。 +如果你想使用自定义域名来获取跟踪脚本, 那么需要提供 `domain` 参数,否则会从 Fathom 云服务版的地址 (<cdn.usefathom.com>) 获取脚本。 ```toml # config/_default/params.toml @@ -25,38 +27,55 @@ To enable Fathom Analytics support, simply provide your Fathom site code in the domain = "llama.yoursite.com" ``` -### Google Analytics +### Google + +Hugo partial 本身已经支持了 Google 站点分析。只需要在 `config/_default/config.toml` 文件添加 `googleAnalytics` 参数即可,跟踪脚本会自动添加。 -Google Analytics support is provided through the internal Hugo partial. Simply provide the `googleAnalytics` key in the `config/_default/config.toml` file and the script will be added automatically. +版本3 (analytics.js) 和版本4 (gtag.js) 都是支持的,参考如下示例: -Both version 3 (analytics.js) and version 4 (gtag.js) are supported, based on the configuration value provided: ```toml # config/_default/config.toml -# version 3 +# 版本 3 googleAnalytics = "UA-PROPERTY_ID" -# version 4 +# 版本 4 googleAnalytics = "G-MEASUREMENT_ID" ``` -### Custom analytics providers -If you wish to use a different analytics provider on your website you can also override the analytics partial and provide your own script. Simply create the file `layouts/partials/extend-head.html` in your project and it will automatically include it in the `` of the website. +### Umami + +只需要在 `config/_default/params.toml` 文件提供你的 [Umami 跟踪代码](https://umami.is/docs/collect-data),就可以快速支持 Umami 站点分析。 +如果你想使用自定义域名来获取跟踪脚本, 那么需要提供 `domain` 参数,否则会从 Umami 云服务版的地址 (analytics.umami.is) 获取脚本。 + +```toml +# config/_default/params.toml -## Comments +[umamiAnalytics] + websiteid = "ABC12345" + domain = "llama.yoursite.com" +``` -To add comments to your articles, Blowfish includes support for a comments partial that is included at the base of each article page. Simply provide a `layouts/partials/comments.html` which contains the code required to display your chosen comments. +### 提供自定义站点分析 -You can use either the built-in Hugo Disqus template, or provide your own custom code. Refer to the [Hugo docs](https://gohugo.io/content-management/comments/) for further information. +如果你想在你的网站提供其他站点分析,你可以自己提供脚本,并覆盖 Blowfish 主题中内置的 partial。 +只需要创建 `layouts/partials/extend-head.html` 文件并在内容中提供脚本即可,Blowfish 主题会自动将 `extend-head.html` 中的内容添加到整个站点的 `` 中。 -Once the partial has been provided, finer control over where comments are displayed is then managed using the `showComments` parameter. This value can be set at the theme level in the `params.toml` [config file]({{< ref "configuration#theme-parameters" >}}), or on a per-article basis by including it in the [front matter]({{< ref "front-matter" >}}). The parameter defaults to `false` so it must be set to `true` in one of these locations in order for comments to be displayed. +## 评论 -## Favicons +Blowfish 支持了在每篇文章底部添加一个评论功能。只需要提供一个 `layouts/partials/comments.html` 文件,并在其中添加显示评论的代码即可。 -Blowfish provides a default set of blank favicons to get started but you can provide your own assets to override them. The easiest way to obtain new favicon assets is to generate them using a third-party provider like [favicon.io](https://favicon.io). +你可以使用 Hugo 中内置的 Disqus 模板,也可以提供自定义代码。更多内容和细节可以参考 [Hugo 文档](https://gohugo.io/content-management/comments/). + +一旦提供了评论的 partial,你就可以使用 `showComments` 更细致地控制评论的显隐。此参数可以在 `params.toml` [配置文件]({{< ref "configuration#theme-parameters" >}}) 中全局设置,也可以在每篇文章的 [扉页参数]({{< ref "front-matter" >}}) 中单独针对特定文章设置。该参数默认为 `false`,因此需要在上面两个位置设置为 `true` 才能显示评论。 + +## 网站图标(Favicons) + +Blowfish 提供了一套空白网站图标以便快速上手,但你可以提供自己的资源来覆盖他们。想要获取新的图标资源最简单的方法是使用第三方提供商,如 [favicon.io](https://favicon.io)。 + +网站图标资源的位置在 `static/` 文件夹中,并务必按照如下的名称命名。如果你使用了[favicon.io](https://favicon.io),那么下载下来的文件名和下面的示例完全一致;当然你也可以通过别的方式提供,记得重命名就行。 -Icon assets should be placed directly in the `static/` folder of your website and named as per the listing below. If you use [favicon.io](https://favicon.io), these will be the filenames that are automatically generated for you, but you can provide your own assets if you wish. ```shell static/ @@ -69,34 +88,37 @@ static/ └─ site.webmanifest ``` -Alternatively, you can also completely override the default favicon behaviour and provide your own favicon HTML tags and assets. Simply provide a `layouts/partials/favicons.html` file in your project and this will be injected into the site `` in place of the default assets. -## Icon +或者,您也可以完全覆盖默认的 favicon 行为,提供自己的 favicon HTML 标签和资源。只需在项目中提供一个 `layouts/partials/favicons.html` 文件,该文件就会被加入网站的 `` 中,取代默认资源。 -Similar to the [icon shortcode]({{< ref "shortcodes#icon" >}}), you can include icons in your own templates and partials by using Blowfish's `icon.html` partial. The partial takes one parameter which is the name of the icon to be included. +## Icon 图标 -**Example:** +与 [图标简码]({{< ref "shortcodes#icon" >}})类似,您也可以通过使用 Blowfish 的 `icon.html` partial,在自己的模板和 partial 中加入图标。该部分包含一个参数,即要包含的图标名称。 + + +**示例:** ```go {{ partial "icon.html" "github" }} ``` -Icons are populated using Hugo pipelines which makes them very flexible. Blowfish includes a number of built-in icons for social, links and other purposes. Check the [icon samples]({{< ref "samples/icons" >}}) page for a full list of supported icons. -Custom icons can be added by providing your own icon assets in the `assets/icons/` directory of your project. The icon can then be referenced in the partial by using the SVG filename without the `.svg` extension. +图标使用 Hugo 管道填充,因此非常灵活。Blowfish 内置了大量用于社交、链接和其他用途的图标。请查看[图标示例]({{< ref "samples/icons" >}})页面,查看支持图标的完整列表。 + +可以通过在项目的 `assets/icons/` 目录中提供自己的图标资源来添加自定义图标。然后,可以通过使用 SVG 文件名(不含`.svg`扩展名)在局部中引用图标。 -Icons can also be used in article content by calling the [icon shortcode]({{< ref "shortcodes#icon" >}}). +图标还可通过调用[图标简码]({{< ref "shortcodes#icon" >}})在文章内容中使用。 -## Extensions +## 扩展 -Blowfish also provides for a number of extension partials that allow for expanding upon base functionality. +Blowfish 还提供了许多扩展 partial,可以扩展基本功能。 -### Article link +### 文章链接 -If you wish to insert additional code after article links, create a `layouts/partials/extend-article-link.html` file. This is especially powerful when combined with the [`badge`]({{< ref "shortcodes#badge" >}}) shortcode which can be used to highlight metadata for certain articles. +如果您希望在文章链接后插入附加代码,请创建一个 `layouts/partials/extend-article-link.html` 文件。如果与[`badge`]({{< ref "shortcodes#badge" >}})简码结合使用,该功能将尤为强大,可用于突出显示某些文章的元数据。 -### Head and Footer +### 头部和尾部 -The theme allows for inserting additional code directly into the `` and `