Merge branch 'main' into main

This commit is contained in:
BabaRagnarok
2024-08-24 12:36:25 +02:00
committed by GitHub
1396 changed files with 6374 additions and 1065607 deletions
+2 -1
View File
@@ -5,7 +5,7 @@
theme = "blowfish"
baseURL = "https://localhost:1313"
defaultContentLanguage = "en"
#disableLanguages = ['ja'] #to allow translation work requiring shipping to production
disableLanguages = [] #to allow translation work requiring shipping to production
# pluralizeListTitles = "true" # hugo function useful for non-english languages, find out more in https://gohugo.io/getting-started/configuration/#pluralizelisttitles
@@ -17,6 +17,7 @@ hasCJKLanguage = true
buildDrafts = false
buildFuture = false
enableEmoji = true
googleAnalytics = "G-PEDMYR1V0K"
@@ -13,6 +13,7 @@ title = "Blowfish"
[author]
name = "Blowfish"
email = "nuno@n9o.xyz"
image = "img/blowfish_logo.png"
headline = "A powerful, lightweight theme for Hugo."
bio = "A powerful, lightweight theme for Hugo."
@@ -1,6 +1,6 @@
languageCode = "ja"
languageName = "日本語"
weight = 2
weight = 3
title = "Blowfish"
[params]
@@ -1,6 +1,6 @@
languageCode = "zh-cn"
languageName = "简体中文"
weight = 2
weight = 4
title = "Blowfish"
[params]
+1 -1
View File
@@ -43,7 +43,7 @@
weight = 40
[[main]]
name = "客户样例"
name = "用户列表"
pageRef = "users"
weight = 90
+31 -16
View File
@@ -12,11 +12,14 @@ autoSwitchAppearance = true
enableSearch = true
enableCodeCopy = true
replyByEmail = false
mainSections = ["docs"]
# robots = ""
disableImageOptimization = false
disableTextInHeader = false
# backgroundImageWidth = 1200
defaultBackgroundImage = "/img/background.svg"
defaultFeaturedImage = "/img/featured.svg"
@@ -48,11 +51,12 @@ smartTOCHideUnfocusedChildren = false
[article]
showDate = false
showViews = true
showLikes = true
showViews = false
showLikes = 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
@@ -72,7 +76,7 @@ smartTOCHideUnfocusedChildren = false
showTaxonomies = true
showAuthorsBadges = true
showWordCount = false
sharingLinks = [ "linkedin", "twitter", "reddit", "whatsapp", "telegram", "pinterest", "facebook", "email"]
sharingLinks = [ "linkedin", "twitter", "bluesky", "reddit", "whatsapp", "telegram", "pinterest", "facebook", "email"]
showZenMode = true
[list]
@@ -82,10 +86,11 @@ smartTOCHideUnfocusedChildren = false
layoutBackgroundHeaderSpace = false
showBreadcrumbs = false
showSummary = false
showViews = true
showLikes = true
showViews = false
showLikes = false
showTableOfContents = true
showCards = true
orderByWeight = true
groupByYear = false
cardView = true
cardViewScreenWidth = false
@@ -99,8 +104,8 @@ smartTOCHideUnfocusedChildren = false
showHero = true
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
showBreadcrumbs = false
showViews = true
showLikes = true
showViews = false
showLikes = false
showTableOfContents = true
cardView = false
@@ -108,26 +113,36 @@ smartTOCHideUnfocusedChildren = false
showHero = true
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
showBreadcrumbs = false
showViews = true
showLikes = true
showViews = false
showLikes = false
showTableOfContents = true
groupByYear = false
cardView = true
cardViewScreenWidth = false
[firebase]
apiKey = "AIzaSyB5tqlqDky77Vb4Tc4apiHV4hRZI18KGiY"
authDomain = "blowfish-21fff.firebaseapp.com"
projectId = "blowfish-21fff"
storageBucket = "blowfish-21fff.appspot.com"
messagingSenderId = "60108104191"
appId = "1:60108104191:web:039842ebe1370698b487ca"
measurementId = "G-PEDMYR1V0K"
#apiKey = "AIzaSyB5tqlqDky77Vb4Tc4apiHV4hRZI18KGiY"
#authDomain = "blowfish-21fff.firebaseapp.com"
#projectId = "blowfish-21fff"
#storageBucket = "blowfish-21fff.appspot.com"
#messagingSenderId = "60108104191"
#appId = "1:60108104191:web:039842ebe1370698b487ca"
#measurementId = "G-PEDMYR1V0K"
[fathomAnalytics]
# site = "ABC12345"
# domain = "llama.yoursite.com"
[umamiAnalytics]
# websiteid = "ABC12345"
# domain = "llama.yoursite.com"
# dataDomains = "yoursite.com,yoursite2.com"
# enableTrackEvent = false
[selineAnalytics]
# token = "XXXXXX"
# enableTrackEvent = false
[buymeacoffee]
identifier = "nunocoracao"
globalWidget = true
+9 -13
View File
@@ -1,21 +1,19 @@
---
title: "Welcome to Blowfish! :tada:"
description: "This page was built using the Blowfish theme for Hugo."
title: "Benvenuti a Blowfish!"
description: "Questa pagina è stata creata utilizzando il tema Blowfish per Hugo."
---
<div class="flex px-4 py-2 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
<span class="flex items-center ltr:pr-3 rtl:pl-3 text-primary-400">
{{< icon "triangle-exclamation" >}}
</span>
<span class="flex items-center justify-between grow dark:text-neutral-300">
<span class="prose dark:prose-invert">This is a demo of the <code id="layout">background</code> layout.</span>
<button
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"
<span class="prose dark:prose-invert">Questa è una demo del layout <code id="layout">background</code>.</span>
<pulsante
id="interruttore-layout-pulsante"
class="px-4 !text-neutral !no-underline round-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
>
Switch layout &orarr;
</button>
Cambia layout &orarr;
</pulsante>
</span>
</div>
@@ -24,6 +22,4 @@ description: "This page was built using the Blowfish theme for Hugo."
npx blowfish-tools
```
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" >}}
{{< youtubeLite id="SgXhGb-7QbU" label="Demo degli strumenti Blowfish" >}}
+1 -1
View File
@@ -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"
>
レイアウトを変更する &orarr;
レイアウトを変更する&orarr;
</button>
</span>
</div>
+3 -3
View File
@@ -1,5 +1,5 @@
---
title: "Authors Taxonomy Listing Example"
---
title: "Esempio di elenco di tassonomia degli autori"
A quick example of how to start using author taxonomies in your articles.
---
Un rapido esempio di come iniziare a utilizzare le tassonomie degli autori nei tuoi articoli.
+1 -1
View File
@@ -2,4 +2,4 @@
title: "作者列表示例"
---
在你的文章中添加不同作者分类的简单示例。
在你的文章中添加不同作者的简单示例。
@@ -1,5 +1,5 @@
---
title: "Nuno Coração"
---
title: "Nuno Coraçao"
Nuno's awesome dummy bio.
---
La fantastica biografia di Nuno.
@@ -2,4 +2,4 @@
title: "Nuno Coração"
---
Nuno's awesome dummy bio.
Nuno の素晴らしいダミープロフィールです。
@@ -2,4 +2,4 @@
title: "Nuno Coração"
---
Nuno's awesome dummy bio.
假装这里有一份 Nuno 的简介。
@@ -1,5 +1,5 @@
---
title: "Dummy Second Author"
---
title: "Secondo autore fittizio"
Dummy Second Author's awesome dummy bio.
---
La fantastica biografia fittizia di Dummy Second Author.
@@ -1,5 +1,5 @@
---
title: "Dummy Second Author"
title: "2人目のダミー作者"
---
Dummy Second Author's awesome dummy bio.
2人目のダミー作者の素晴らしいダミープロフィールです。
@@ -2,4 +2,4 @@
title: "Dummy Second Author"
---
Dummy Second Author's awesome dummy bio.
假装这里有一份第二位作者的简介。
+5 -7
View File
@@ -1,17 +1,15 @@
---
title: "Documentation"
description: "Learn how to use Blowfish and its features."
title: "Documenti"
description: "Scopri come utilizzare Blowfish e le sue funzionalità."
cascade:
showDate: false
showAuthor: false
invertPagination: true
---
---
{{< lead >}}
Simple, yet powerful. Learn how to use Blowfish and its features.
Semplice ma potente. Scopri come utilizzare Blowfish e le sue funzionalità.
{{< /lead >}}
This section contains everything you need to know about Blowfish. If you're new, check out the [Installation]({{< ref "docs/installation" >}}) guide to begin or visit the [Samples]({{< ref "samples" >}}) section to see what Blowfish can do.
---
Questa sezione contiene tutto ciò che devi sapere su Blowfish. Se sei nuovo, consulta la guida [Installazione]({{< ref "docs/installation" >}}) per iniziare o visita la sezione [Esempi]({{< ref "samples" >}}) per vedere cosa può fare Blowfish.
@@ -1,6 +1,6 @@
---
title: "Advanced Customisation"
date: 2020-08-08
weight: 13
draft: false
description: "Learn how to build Blowfish manually."
slug: "advanced-customisation"
@@ -1,6 +1,6 @@
---
title: "Advanced Customisation"
date: 2020-08-08
weight: 13
draft: false
description: "Learn how to build Blowfish manually."
slug: "advanced-customisation"
@@ -1,6 +1,6 @@
---
title: "Advanced Customisation"
date: 2020-08-08
weight: 13
draft: false
description: "Learn how to build Blowfish manually."
slug: "advanced-customisation"
@@ -1,6 +1,6 @@
---
title: 进阶自定义
date: 2020-08-08
weight: 13
draft: false
description: "了解如何手动构建 Blowfish。"
slug: "advanced-customisation"
@@ -1,6 +1,7 @@
---
title: "Configurazioni"
date: 2020-08-14
title: "Configurazione"
weight: 4
draft: false
description: "Tutte le configurazioni disponibili in Blowfish."
slug: "configurazioni"
@@ -62,8 +63,8 @@ Blowfish è ottimizzato per siti Web multilingue completi e le risorse tematiche
Il tema attualmente supporta le seguenti lingue per impostazione predefinita:
| Language | Code |
| ------------------------------ | ------- |
| Language | Code |
| ---------------------------- | ------- |
| Arabic | `ar` |
| Bulgarian | `bg` |
| Bengali | `bn` |
@@ -88,6 +89,7 @@ Il tema attualmente supporta le seguenti lingue per impostazione predefinita:
| Russian | `ru` |
| Turkish | `tr` |
| Vietnamese | `vi` |
| Ukrainian | `uk` |
| Simplified Chinese (China) | `zh-cn` |
| Traditional Chinese (Taiwan) | `zh-tw` |
@@ -138,7 +140,7 @@ Il file predefinito può essere utilizzato come modello per creare lingue aggiun
| 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 +164,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 `<code>` 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 `<code>` 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 +203,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 +221,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 |
@@ -257,6 +260,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `list.showViews` | `false` | Whether or not list views are displayed. This requires firebase integrations to be enabled, look below. |
| `list.showLikes` | `false` | Whether or not list likes are displayed. This requires firebase integrations to be enabled, look below. |
| `list.showCards` | `false` | Whether or not each article is displayed as a card or as simple inline text. |
| `list.orderByWeight` | `false` | Whether or not articles are sorted by [weights](https://gohugo.io/methods/page/weight/). |
| `list.groupByYear` | `true` | Whether or not articles are grouped by year on list pages. |
| `list.cardView` | `false` | Display lists as a gallery of cards. |
| `list.cardViewScreenWidth` | `false` | Enhance the width of card galleries in lists to take the full width available. |
@@ -313,6 +317,22 @@ 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. |
| `umamiAnalytics.dataDomains` | _Not set_ | If you want the tracker to only run on specific domains, provide it for your tracker script. This is a comma delimited list of domain names. Such as "yoursite.com,yoursite2.com". |
| `umamiAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. |
### Seline Analytics
| Name | Default | Description |
|-----------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `selineAnalytics.token` | _Not set_ | The token generated by Seline Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `selineAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. |
### BuyMeACoffee
| Name | Default | Description |
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: 2020-08-14
weight: 4
draft: false
description: "All the configuration variables available in Blowfish."
slug: "configuration"
@@ -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 `<code>` 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 `<code>` 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 |
@@ -257,6 +258,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `list.showViews` | `false` | Whether or not list views are displayed. This requires firebase integrations to be enabled, look below. |
| `list.showLikes` | `false` | Whether or not list likes are displayed. This requires firebase integrations to be enabled, look below. |
| `list.showCards` | `false` | Whether or not each article is displayed as a card or as simple inline text. |
| `list.orderByWeight` | `false` | Whether or not articles are sorted by [weights](https://gohugo.io/methods/page/weight/). |
| `list.groupByYear` | `true` | Whether or not articles are grouped by year on list pages. |
| `list.cardView` | `false` | Display lists as a gallery of cards. |
| `list.cardViewScreenWidth` | `false` | Enhance the width of card galleries in lists to take the full width available. |
@@ -313,6 +315,22 @@ 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. |
| `umamiAnalytics.dataDomains` | _Not set_ | If you want the tracker to only run on specific domains, provide it for your tracker script. This is a comma delimited list of domain names. Such as "yoursite.com,yoursite2.com". |
| `umamiAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. |
### Seline Analytics
| Name | Default | Description |
|-----------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `selineAnalytics.token` | _Not set_ | The token generated by Seline Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `selineAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. |
### BuyMeACoffee
| Name | Default | Description |
+56 -30
View File
@@ -1,6 +1,6 @@
---
title: "Configuration"
date: 2020-08-14
weight: 4
draft: false
description: "All the configuration variables available in Blowfish."
slug: "configuration"
@@ -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` |
@@ -74,6 +74,7 @@ The theme currently supports the following languages by default:
| Spanish (Spain) | `es` |
| Finnish | `fi` |
| French | `fr` |
| Galician | `gl` |
| Hebrew | `he` |
| Croatian | `hr` |
| Hungarian | `hu` |
@@ -81,6 +82,7 @@ The theme currently supports the following languages by default:
| Italian | `it` |
| Japanese | `ja` |
| Korean | `ko` |
| Persian | `fa` |
| Polish | `pl` |
| Portuguese (Brazil) | `pt-br` |
| Portuguese (Portugal) | `pt-pt` |
@@ -135,13 +137,15 @@ The default file can be used as a template to create additional languages, or re
<!-- prettier-ignore-end -->
#### Author
| 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.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/`. |
| 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.email` | _Not set_ | The author's email. This will be used if the reply-via-email functionality is enabled. |
| `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.imageQuality` | `96` | The author's image file will be treated as a "high quality" image to minimize artifacts on the front page. Value range 1-100. |
| `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/`. |
<!-- prettier-ignore-end -->
### Menus
@@ -162,25 +166,29 @@ 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 `<code>` 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 `<code>` 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. |
| `replyByEmail` | `false` | Whether the reply-by-email link is enabled after post. The `author.email` parameter in `config/_default/languages.en.toml` must be set. |
| `forgejoDefaultServer` | _Not set_ | The default `server` parameter for the `forgejo` shortcode. |
| `giteaDefaultServer` | _Not set_ | The default `server` parameter for the `gitea` shortcode. |
| `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. |
| `backgroundImageWidth` | `1200` | Width (in pixels) to scale background images to. |
| `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 +209,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 +227,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 |
@@ -257,6 +266,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `list.showViews` | `false` | Whether or not list views are displayed. This requires firebase integrations to be enabled, look below. |
| `list.showLikes` | `false` | Whether or not list likes are displayed. This requires firebase integrations to be enabled, look below. |
| `list.showCards` | `false` | Whether or not each article is displayed as a card or as simple inline text. |
| `list.orderByWeight` | `false` | Whether or not articles are sorted by [weights](https://gohugo.io/methods/page/weight/). |
| `list.groupByYear` | `true` | Whether or not articles are grouped by year on list pages. |
| `list.cardView` | `false` | Display lists as a gallery of cards. |
| `list.cardViewScreenWidth` | `false` | Enhance the width of card galleries in lists to take the full width available. |
@@ -313,6 +323,22 @@ 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. |
| `umamiAnalytics.dataDomains` | _Not set_ | If you want the tracker to only run on specific domains, provide it for your tracker script. This is a comma delimited list of domain names. Such as "yoursite.com,yoursite2.com". |
| `umamiAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. |
### Seline Analytics
| Name | Default | Description |
|-----------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `selineAnalytics.token` | _Not set_ | The token generated by Seline Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. |
| `selineAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. |
### BuyMeACoffee
| Name | Default | Description |
@@ -1,6 +1,6 @@
---
title: "配置"
date: 2020-08-14
weight: 4
draft: false
description: "介绍 Blowfish 中所有可用的的配置变量。"
slug: "configuration"
@@ -38,17 +38,17 @@ Blowfish 主题支持了 Hugo 框架中定义的所有标准配置变量。但
值得注意的是,表格中提供的变量名可以使用点表示法来简化 TOML 数据结构,例如 `outputs.home` 指的是 `[outputs] home`
<!-- prettier-ignore-start -->
| 名称 | 默认值 | 描述 |
|--------------------------|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `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" >}}) 中的分类器配置。 |
<!-- prettier-ignore-end -->
## 缩略图
@@ -63,8 +63,8 @@ Blowfish 针对多语言网站进行了优化,主题的资源素材目前已
Blowfish 主题目前默认支持了以下语言:
| 语言 | 代码 |
|------------------------------|---------|
| 语言 | 代码 |
| ---------------------------- | ------- |
| Arabic | `ar` |
| Bulgarian | `bg` |
| Bengali | `bn` |
@@ -109,39 +109,39 @@ Blowfish 主题目前默认支持了以下语言:
#### 全局
<!-- prettier-ignore-start -->
| 名称 | 默认值 | 描述 |
|----------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------|
| 名称 | 默认值 | 描述 |
| -------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `languageCode` | `"en"` | Hugo 中的默认语言代码。他可以是一个高层级语言(例如 `en`),也可以是一个变体子语言(例如 `en-au`),但一定需要和语言配置文件中的语言代码相匹配。为了符合 HTML 的规范并设置设置大小写敏感的 `isoCode`Hugo希望这个值最好是小写。 |
| `languageName` | `"English"` | 语言名称。 |
| `weight` | `1` | 权重决定了在构建多语言时的语言顺序。 |
| `title` | `"Blowfish"` | 网站的标题。它将在网站头部和底部进行展示。 |
| `languageName` | `"English"` | 语言名称。 |
| `weight` | `1` | 权重决定了在构建多语言时的语言顺序。 |
| `title` | `"Blowfish"` | 网站的标题。它将在网站头部和底部进行展示。 |
<!-- prettier-ignore-end -->
#### 参数
<!-- prettier-ignore-start -->
| 名称 | 默认值 | 描述 |
|------------------------|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `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` 自动生成版权信息。 |
<!-- prettier-ignore-end -->
#### 作者
| 名称 | 默认值 | 描述 |
|-------------------|-----------|------------------------------------------------------------------------------------------------------|
| `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图片。 |
<!-- prettier-ignore-end -->
### 菜单
@@ -162,179 +162,196 @@ 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` | 是否可以将`<code>`代码块复制到剪贴板。想要使用代码复制功能,需要将 `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` | 是否可以将`<code>`代码块复制到剪贴板。想要使用代码复制功能,需要将 `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 图片的时候非常有用。 |
### 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(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
### 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` |
### BuyMeACoffee
### Umami Analytics(一种网站分析工具)
| 名称 | 默认值 | 描述 |
| ----------------------------------- | --------- |---------------------------|
| `buymeacoffee.identifier` | 无 | buymeacoffee 账号的用户名。 |
| `buymeacoffee.globalWidget` | 无 | 激活位于全局的 buymeacoffee 组件。 |
| `buymeacoffee.globalWidgetMessage` | 无 | 新用户首次访问网站时显示的消息。 |
| `buymeacoffee.globalWidgetColor` | 无 | 组件颜色,使用 HEX 格式。 |
| `buymeacoffee.globalWidgetPosition` | 无 | 组件位置,例如 "Left" 或 "Right"。 |
| Name | Default | Description |
|------------------------------|-----------|-------------------------------------------------------------------------------------|
| `umamiAnalytics.websiteid` | 无 | 支持 Umami 站点分析平台。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 |
| `umamiAnalytics.domain` | 无 | 如果使用自定义域名的 Umami Analytics,请在此提供,以便从自定义域名获取 `script.js` |
| `umamiAnalytics.dataDomains` | 无 | 如果你只想在特别的数个域名中使用 tracker 功能,那么你需要设置它。这个参数的值是逗号分隔的域名列表,如:yoursite.com,yoursite2.com。 |
| `umamiAnalytics.enableTrackEvent` | true | 默认会自动添加 Umami Track Event。如果你不想添加 Event,那学需要设置为 `false` |
### Seline Analytics
| Name | Default | Description |
|-----------------------------------|---------|--------------------------------------------------------------------------|
| `selineAnalytics.token` | 无 | Seline 站点分析平台的 token。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 |
| `selineAnalytics.enableTrackEvent` | true | 默认会自动添加 Umami Track Event。如果你不想添加 Event,那学需要设置为 `false`。 |
### BuyMeACoffee(赞助平台)
| 名称 | 默认值 | 描述 |
| ----------------------------------- | ------ | ---------------------------------- |
| `buymeacoffee.identifier` | 无 | buymeacoffee 账号的用户名。 |
| `buymeacoffee.globalWidget` | 无 | 激活位于全局的 buymeacoffee 组件。 |
| `buymeacoffee.globalWidgetMessage` | 无 | 新用户首次访问网站时显示的消息。 |
| `buymeacoffee.globalWidgetColor` | 无 | 组件颜色,使用 HEX 格式。 |
| `buymeacoffee.globalWidgetPosition` | 无 | 组件位置,例如 "Left" 或 "Right"。 |
### 验证
| 名称 | 默认值 | 描述 |
|--------------------------| --------- |----------------------------------------------------------------------------------------|
| `verification.google` | 无 | Google 提供的网站验证字符串,用于在网站元数据中包含。 |
| `verification.bing` | 无 | Bing 提供的网站验证字符串,用于在网站元数据中包含。 |
| `verification.pinterest` | 无 | Pinterest 提供的网站验证字符串,用于在网站元数据中包含。 |
| `verification.yandex` | 无 | Yandex 提供的网站验证字符串,用于在网站元数据中包含。 |
| 名称 | 默认值 | 描述 |
| ------------------------ | ------ | -------------------------------------------------------- |
| `verification.google` | 无 | Google 提供的网站验证字符串,用于在网站元数据中包含。 |
| `verification.bing` | 无 | Bing 提供的网站验证字符串,用于在网站元数据中包含。 |
| `verification.pinterest` | 无 | Pinterest 提供的网站验证字符串,用于在网站元数据中包含。 |
| `verification.yandex` | 无 | Yandex 提供的网站验证字符串,用于在网站元数据中包含。 |
<!-- prettier-ignore-end -->
## 别的配置文件
@@ -1,6 +1,6 @@
---
title: "Content Examples"
date: 2020-08-09
weight: 11
draft: false
description: "All the partials available in Blowfish."
slug: "content-examples"
@@ -1,6 +1,6 @@
---
title: "Content Examples"
date: 2020-08-09
weight: 11
draft: false
description: "All the partials available in Blowfish."
slug: "content-examples"
@@ -1,6 +1,6 @@
---
title: "Content Examples"
date: 2020-08-09
weight: 11
draft: false
description: "All the partials available in Blowfish."
slug: "content-examples"
@@ -1,6 +1,6 @@
---
title: "内容示例"
date: 2020-08-09
weight: 11
draft: false
description: "包含 Blowfish 中所有可用部分的示例、"
slug: "content-examples"
@@ -1,6 +1,6 @@
---
title: "Firebase: Views & Likes"
date: 2020-08-03
weight: 15
draft: false
description: "Learn how to integrate Firebase and get dynamic data for views and likes."
slug: "firebase-views"
@@ -1,6 +1,6 @@
---
title: "Firebase: Views & Likes"
date: 2020-08-03
weight: 15
draft: false
description: "Learn how to integrate Firebase and get dynamic data for views and likes."
slug: "firebase-views"
@@ -1,6 +1,6 @@
---
title: "Firebase: Views & Likes"
date: 2020-08-03
weight: 15
draft: false
description: "Learn how to integrate Firebase and get dynamic data for views and likes."
slug: "firebase-views"
@@ -1,6 +1,6 @@
---
title: "Firebase: 阅读量 & 点赞量"
date: 2020-08-03
weight: 15
draft: false
description: "了解 Blowfish 如何集成 Firebase,并动态显示阅读量和点赞量。"
slug: "firebase-views"
@@ -1,6 +1,6 @@
---
title: "Front Matter"
date: 2020-08-10
weight: 7
draft: false
description: "Tutte le variabili in primo piano disponibili in Blowfish."
slug: "front-matter"
@@ -54,4 +54,44 @@ I valori predefiniti dei parametri del front metter vengono ereditati dalla [con
| `xml` | `true` unless excluded by `sitemap.excludedKinds` | Se questo articolo è incluso o meno nel file `/sitemap.xml` generato. |
| `layoutBackgroundBlur` | `true` | Rende l'immagine di sfondo sullo sfondo heroStyle sfocata con lo scorrimento. |
| `layoutBackgroundHeaderSpace` | `true` | Aggiungi spazio tra l'intestazione e il body. |
| `title` | _Not set_ | The name of the article. |
| `description` | _Not set_ | The text description for the article. It is used in the HTML metadata. |
| `externalUrl` | _Not set_ | If this article is published on a third-party website, the URL to this article. Providing a URL will prevent a content page being generated and any references to this article will link directly to the third-party website. |
| `editURL` | `article.editURL` | When `showEdit` is active, the URL for the edit link. |
| `editAppendPath` | `article.editAppendPath` | When `showEdit` is active, whether or not the path to the current article should be appended to the URL set at `editURL`. |
| `groupByYear` | `list.groupByYear` | Whether or not articles are grouped by year on list pages. |
| `menu` | _Not set_ | When a value is provided, a link to this article will appear in the named menus. Valid values are `main` or `footer`. |
| `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` |
| `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. |
| `showDate` | `article.showDate` | Whether or not the article date is displayed. The date is set using the `date` parameter. |
| `showDateUpdated` | `article.showDateUpdated` | Whether or not the date the article was updated is displayed. The date is set using the `lastmod` parameter. |
| `showEdit` | `article.showEdit` | Whether or not the link to edit the article content should be displayed. |
| `showHeadingAnchors` | `article.showHeadingAnchors` | Whether or not heading anchor links are displayed alongside headings within this article. |
| `showPagination` | `article.showPagination` | Whether or not the next/previous article links are displayed in the article footer. |
| `invertPagination` | `article.invertPagination` | Whether or not to flip the direction of the next/previous article links. |
| `showReadingTime` | `article.showReadingTime` | Whether or not the article reading time is displayed. |
| `showTaxonomies` | `article.showTaxonomies` | Whether or not the taxonomies that relate to this article are displayed. |
| `showTableOfContents` | `article.showTableOfContents` | Whether or not the table of contents is displayed on this article. |
| `showWordCount` | `article.showWordCount` | Whether or not the article word count is displayed. |
| `showComments` | `article.showComments` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. |
| `showSummary` | `list.showSummary` | Whether or not the article summary should be displayed on list pages. |
| `showViews` | `article.showViews` | Whether or not the article views should be displayed in lists and detailed view. This requires a firebase integration. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish |
| `showLikes` | `article.showLikes` | Whether or not the article likes should be displayed in lists and detailed view. This requires a firebase integration. Check [this page]({{< ref "firebase-views" >}}) for a guide on how to integrate Firebase into Blowfish |
| `seriesOpened` | `article.seriesOpened` | Whether or not the series module will be displayed open by default or not. |
| `series` | _Not set_ | Array of series the article belongs to, we recommend using only one series per article. |
| `series_order` | _Not set_ | Number of the article within the series. |
| `summary` | Auto generated using `summaryLength` (see [site configuration]({{< ref "configuration#site-configuration" >}})) | When `showSummary` is enabled, this is the Markdown string to be used as the summary for this article. |
| `xml` | `true` unless excluded by `sitemap.excludedKinds` | Whether or not this article is included in the generated `/sitemap.xml` file. |
| `layoutBackgroundBlur` | `true` | Makes the background image in the background heroStyle blur with the scroll |
| `layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. |
<!-- prettier-ignore-end -->
@@ -1,6 +1,6 @@
---
title: "Front Matter"
date: 2020-08-10
weight: 7
draft: false
description: "All the front matter variables available in Blowfish."
slug: "front-matter"
@@ -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. |
@@ -1,6 +1,6 @@
---
title: "Front Matter"
date: 2020-08-10
weight: 7
draft: false
description: "All the front matter variables available in Blowfish."
slug: "front-matter"
@@ -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. |
@@ -1,6 +1,6 @@
---
title: "Front Matter"
date: 2020-08-10
title: "Front Matter(文件头信息)"
weight: 7
draft: false
description: "文本主要介绍 Blowfish 中页面中可以添加的所有的 Front Matter 参数。"
slug: "front-matter"
@@ -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" >}})中继承的,所有只有当你想要覆盖默认值时,才需要在当前页面指定这些参数。
<!-- prettier-ignore-start -->
| 名称 | 默认值 | 描述 |
|-------------------------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| `title` | 无 | 文章名称。 |
| `description` | 无 | 文章的描述信息,它会被添加在 HTML 的 `<meta>` 元数据中。 |
| `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 的 `<meta>` 元数据中。 |
| `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` | 在标题和正文之间添加空白区域间隔。 |
<!-- prettier-ignore-end -->
@@ -1,8 +1,8 @@
---
title: "Per iniziare"
date: 2020-08-15
weight: 3
draft: false
description: "Tutte le variabili del front matter sono disponibili in Blowfish.
description: "Tutte le variabili del front matter sono disponibili in Blowfish."
slug: "per-iniziare"
tags: ["installazione", "documenti"]
series: ["Documentazione"]
@@ -27,9 +27,10 @@ I file di configurazione forniti con Blowfish contengono tutte le possibili impo
## Configurazione di base
Prima di creare qualsiasi contenuto, è necessario impostare alcune cose per una nuova installazione. Iniziando dal file `config.toml`, imposta i parametri `baseURL` e `lingualCode`. Il `lingualCode` dovrebbe essere impostato sulla lingua principale che utilizzerai per creare i tuoi contenuti.
=======
```toml
# config/_default/config.toml
# config/_default/hugo.toml
baseURL = "https://your_domain.com/"
languageCode = "en"
@@ -40,7 +41,9 @@ Il passo successivo è configurare le impostazioni della lingua. Sebbene Blowfis
Individua il file "languages.en.toml" nella cartella di configurazione. Se la tua lingua principale è l'inglese puoi utilizzare questo file così com'è. Altrimenti, rinominalo in modo che includa il codice della lingua corretto nel nome del file. Ad esempio, per il francese, rinominare il file in "languages.fr.toml".
{{< alert >}}
Tieni presente che il codice della lingua nel nome del file di configurazione della lingua deve corrispondere all'impostazione "languageCode" in "config.toml".
{{< /alert >}}
```toml
@@ -257,7 +260,7 @@ Questo renderà una seconda riga con le sottocategorie sotto il menu principale
weight = 20
```
Il `name' predefinito è il titolo di `pageRef', con le caselle.
Il `name` predefinito è il titolo di `pageRef`, con le caselle.
## Thumbnails & Backgrounds
@@ -1,6 +1,6 @@
---
title: "Getting Started"
date: 2020-08-15
weight: 3
draft: false
description: "All the front matter variables available in Blowfish."
slug: "getting-started"
@@ -26,10 +26,10 @@ The config files that ship with Blowfish contain all of the possible settings th
## Basic configuration
Before creating any content, there are a few things you should set for a new installation. Starting in the `config.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content.
Before creating any content, there are a few things you should set for a new installation. Starting in the `hugo.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content.
```toml
# config/_default/config.toml
# config/_default/hugo.toml
baseURL = "https://your_domain.com/"
languageCode = "en"
@@ -40,7 +40,7 @@ The next step is to configure the language settings. Although Blowfish supports
Locate the `languages.en.toml` file in the config folder. If your main language is English you can use this file as is. Otherwise, rename it so that it includes the correct language code in the filename. For example, for French, rename the file to `languages.fr.toml`.
{{< alert >}}
Note that the language code in the language config filename should match the `languageCode` setting in `config.toml`.
Note that the language code in the language config filename should match the `languageCode` setting in `hugo.toml`.
{{< /alert >}}
```toml
@@ -1,6 +1,6 @@
---
title: "Getting Started"
date: 2020-08-15
weight: 3
draft: false
description: "All the front matter variables available in Blowfish."
slug: "getting-started"
@@ -26,10 +26,10 @@ The config files that ship with Blowfish contain all of the possible settings th
## Basic configuration
Before creating any content, there are a few things you should set for a new installation. Starting in the `config.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content.
Before creating any content, there are a few things you should set for a new installation. Starting in the `hugo.toml` file, set the `baseURL` and `languageCode` parameters. The `languageCode` should be set to the main language that you will be using to author your content.
```toml
# config/_default/config.toml
# config/_default/hugo.toml
baseURL = "https://your_domain.com/"
languageCode = "en"
@@ -40,7 +40,7 @@ The next step is to configure the language settings. Although Blowfish supports
Locate the `languages.en.toml` file in the config folder. If your main language is English you can use this file as is. Otherwise, rename it so that it includes the correct language code in the filename. For example, for French, rename the file to `languages.fr.toml`.
{{< alert >}}
Note that the language code in the language config filename should match the `languageCode` setting in `config.toml`.
Note that the language code in the language config filename should match the `languageCode` setting in `hugo.toml`.
{{< /alert >}}
```toml
@@ -1,6 +1,6 @@
---
title: "入门指南"
date: 2020-08-15
weight: 3
draft: false
description: "所有在你要使用 Blowfish 主题搭建网站之前的准备工作"
slug: "getting-started"
@@ -26,21 +26,21 @@ Blowfish 中的配置文件中包含了主题需要的所有可能的设置选
## 基础设置
在刚刚安装完成,创建内容之前,有几个设置需要关注。从 `config.toml` 开始,设置 `baseURL``languageCode` 参数。`languageCode`参数是用来指定你创作内容的主要语言。
在刚刚安装完成,创建内容之前,有几个设置需要关注。从 `hugo.toml` 开始,设置 `baseURL``languageCode` 参数。`languageCode`参数是用来指定你创作内容的主要语言。
```toml
# config/_default/config.toml
# config/_default/hugo.toml
baseURL = "https://your_domain.com/"
languageCode = "en"
```
下一步是设置语言。尽管 Blowfish 支持多语言,但是 `config.toml` 只能配置一个主语言。
下一步是设置语言。尽管 Blowfish 支持多语言,但是 `hugo.toml` 只能配置一个主语言。
`config/_default` 文件夹中找到 `languages.en.toml`。如果你的主语言是英语,你可以直接使用此文件。否则需要重命名为主语言对应的文件名。例如,如果主语言是法语,那么需要将文件命名为 `languages.fr.toml`
{{< alert >}}
注意:语言配置文件名中的语言代码需要与 `config.toml``languageCode` 相匹配。
注意:语言配置文件名中的语言代码需要与 `hugo.toml``languageCode` 相匹配。
{{< /alert >}}
```toml
@@ -116,8 +116,7 @@ Blowfish 定义了一种由三种主色调构成的配色方案,每种主色
#### Slate
{{< swatches "#6B7280" "#64748b" "#6B7280" >}}
尽管这些事默认的方案,你也可以创建属于你自己的,详细信息请参阅 [高级自定义]({{< ref "advanced-customisation#colour-schemes" >}}) 部分
尽管这些事默认的方案,你也可以创建属于你自己的,详细信息请参阅 [高级自定义]({{< ref "advanced-customisation#colour-schemes" >}}) 部分。
这些是内置的配色方案,你也可以去自定义这一部分,请参阅 [高级自定义]({{< ref "advanced-customisation#colour-schemes" >}}) 。
## 整理内容
@@ -1,6 +1,6 @@
---
title: "Homepage Layout"
date: 2020-08-13
weight: 5
draft: false
description: "Configurazione del layout della home page nel tema Blowfish."
slug: "homepage-layout"
@@ -1,6 +1,6 @@
---
title: "Homepage Layout"
date: 2020-08-13
weight: 5
draft: false
description: "Configuring the homepage layout in the Blowfish theme."
slug: "homepage-layout"
@@ -1,6 +1,6 @@
---
title: "Homepage Layout"
date: 2020-08-13
weight: 5
draft: false
description: "Configuring the homepage layout in the Blowfish theme."
slug: "homepage-layout"
@@ -1,6 +1,6 @@
---
title: "主页布局"
date: 2020-08-13
weight: 5
draft: false
description: "在 Blowfish 主题中设置主页布局。"
slug: "homepage-layout"
@@ -35,7 +35,7 @@ Blowfish 提供了一个完全灵活的主页布局。你可以选择两种主
## 英雄布局(hero
英雄布局(hearo)组合了个人资料布局(profile)和卡片布局(card)。它不仅显示了网站作者的个人信息,还在个人资料下方加载了你的 markdown 内容。
英雄布局(hero)组合了个人资料布局(profile)和卡片布局(card)。它不仅显示了网站作者的个人信息,还在个人资料下方加载了你的 markdown 内容。
<img class="thumbnailshadow" src="img/home-hero.png"/>
@@ -1,6 +1,6 @@
---
title: "Hosting & Deployment"
date: 2020-08-07
weight: 14
draft: false
description: "Learn how to deploy a Blowfish site."
slug: "hosting-deployment"
@@ -1,6 +1,6 @@
---
title: "Hosting & Deployment"
date: 2020-08-07
weight: 14
draft: false
description: "Learn how to deploy a Blowfish site."
slug: "hosting-deployment"
@@ -1,6 +1,6 @@
---
title: "Hosting & Deployment"
date: 2020-08-07
weight: 14
draft: false
description: "Learn how to deploy a Blowfish site."
slug: "hosting-deployment"
@@ -1,6 +1,6 @@
---
title: "托管和部署"
date: 2020-08-07
weight: 14
draft: false
description: "了解如何部署 Blowfish 网页。"
slug: "hosting-deployment"
@@ -9,30 +9,30 @@ series: ["部署教程"]
series_order: 14
---
There are many ways to deploy your Hugo website built with Blowfish. The theme is designed to be flexible in almost any deployment scenario.
有许多方法可以部署基于 Blowfish 主题的 Hugo 网站。这个主题几乎在任何部署场景中都很灵活。
Blowfish is built using relative URLs throughout the theme. This enables sites to easily be deployed to sub-folders and hosts like GitHub Pages. There's usually no special configuration required for this to work as long as the `baseURL` parameter has been configured in the `config.toml` file.
Blowfish 主题是通过将目录转换成相对 URL 路径来构建的。这让网站可以轻松地将子文件夹部署到类似 GitHub Pages 的托管服务中。只要在 `config.toml` 文件中配置了 `baseURL` 参数即可,通常不需要其他特殊的配置就能正常工作。
The official Hugo [Hosting and Deployment](https://gohugo.io/hosting-and-deployment/) docs are the best place to learn how to deploy your site. The sections below contain some specific theme configuration details that can help you deploy smoothly with certain providers.
Hugo 官方[托管与部署](https://gohugo.io/hosting-and-deployment/)文档是了解如何部署网站的最佳方案。下面会介绍详细介绍一些方案,希望能帮助你在以下平台顺利部署。
**Choose your provider:**
**选择你喜欢的服务商:**
- [GitHub Pages](#github-pages)
- [Netlify](#netlify)
- [Render](#render)
- [Cloudflare Pages](#cloudflare-pages)
- [Shared hosting, VPS or private web server](#shared-hosting-vps-or-private-web-server)
- [共享主机,VPS 或者 私有服务器](#共享主机vps-或者-私有服务器)
---
## GitHub Pages
GitHub allows hosting on [GitHub Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages) using Actions. To enable this functionality, enable Pages on your repo and create a new Actions workflow to build and deploy your site.
GitHub 允许你使用 Actions 在 [GitHub Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages) 上托管静态网站。如果想要启用此功能,需要你在代码库中启用 Pages 并创建一个新的 Actions 工作流,以此来构建和部署你的网站。
The file needs to be in YAML format, placed within the `.github/workflows/` directory of your GitHub repository and named with a `.yml` extension.
工作流文件需要是 YAML 格式,放置在 GitHub 仓库的 `.github/workflows/` 目录下,并以 `.yml` 后缀命名即可。
{{< alert >}}
**Important:** Ensure you set the correct branch name under `branches` and in the deploy step `if` parameter to the source branch used in your project.
**重要:** 确保你需要部署的分支 `branches` 分支下和 YAML 的部署步骤中 `if` 参数一致,保证部署正确的分支。
{{< /alert >}}
```yaml
@@ -74,19 +74,19 @@ jobs:
publish_dir: ./public
```
Push the config file to GitHub and the action should automatically run. It may fail the first time and you'll need to visit the **Settings > Pages** section of your GitHub repo to check the source is correct. It should be set to use the `gh-pages` branch.
将配置文件推动到 Github,Github 会自动运行工作流。你需要访问 Github 代码库的 **Settings > Pages** 部分,检查 YAML 配置是否正确。它应该被设置为使用 `gh-pages` 分支。
{{< screenshot src="github-pages-source.jpg" alt="Screen capture of GitHub Pages source" >}}
Once the settings are configured, re-run the action and the site should build and deploy correctly. You can consult the actions log to check everything deployed successfully.
一旦配置完成后,重新运行 Actions 工作流,网站会正确构建和部署,你就可以查看 Actions 的日志来检查是否部署成功。
## Netlify
To deploy to [Netlify](https://www.netlify.com), create a new continuous deployment site and link it to your source code. The build settings can be left blank in the Netlify UI. You will only need to configure the domain you'll be using.
想要部署 [Netlify](https://www.netlify.com),需要创建一个新的 CI 并关联到你的源码。在 Netlify UI 中,构建的设置可以置空,你只需要配置你要绑定的域名。
{{< screenshot src="netlify-build-settings.jpg" alt="Screen capture of Netlify build settings" >}}
Then in the root of your site repository, create a `netlify.toml` file:
然后在你的代码库根目录下创建一个 `netlify.toml` 文件,具体内容如下:
```toml
# netlify.toml
@@ -108,41 +108,41 @@ Then in the root of your site repository, create a `netlify.toml` file:
HUGO_VERSION = "0.104.1"
```
This configuration assumes you are deploying Blowfish as a Hugo module. If you have installed the theme using another method, change the build command to simply `hugo --gc --minify -b $URL`.
这个配置默认使用的是 Hugo module 的安装方式来加载 Blowfish 主题的。如果你是通过别的方式加载 Blowfish,请将构建命令改为 `hugo --gc --minify -b $URL`
When you push the config file to your repo, Netlify should automatically deploy your site. You can check the deploy logs in the Netlify UI to check for any errors.
当你将配置文件推动到你的代码库时,Netlify 会自动触发并部署你的网站。你可以在 Netlify UI 中查看日志,以检查是否报错。
## Render
Deploying to [Render](https://render.com) is very straightforward and all configuration is via the Render UI.
部署到 [Render](https://render.com) 非常地简单易懂,所有的配置都可以通过 Render UI 来完成。
Create a new **Static Site** and link it to your project's code repository. Then simply configure the build command to be `hugo --gc --minify` and publish directory to be `public`.
创建一个 **静态网站** 并关联到你的代码库。然后只需要配置你的构建命令为 `hugo --gc --minify` 和发布目录为 `public` 即可。
{{< screenshot src="render-settings.jpg" alt="Screen capture of Render settings" >}}
The site will automatically build and deploy whenever you push a change to your repo.
当你更新你的代码库时,[Render](https://render.com) 总会自动构建并重新部署。
## Cloudflare Pages
Cloudflare offers the [Pages](https://pages.cloudflare.com/) service that can host Hugo blogs. It builds the site from a git repository and then hosts it on Cloudflare's CDN. Follow their [Hugo deployment guide](https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site) to get started.
Cloudflare 提供了 [Pages](https://pages.cloudflare.com/) 服务来托管 Hugo 站点。只需要从 Git 仓库构建并托管到 Cloudflare CDN 即可。这部分可以参考 [Hugo 部署指南](https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site)
The Rocket Loader™ feature offered by Cloudflare tries to speed up rendering of web pages with JavaScript, but it breaks the appearance switcher in the theme. It can also cause an annoying light/dark screen flash when browsing your site due to scripts loading in the wrong order.
Cloudflare 提供的 Rocket Loader™ 可以通过 JavaScript 来加速网页渲染,但是会破坏 Blowfish 主题中的外观切换器,甚至还有可能因为错误的加载顺序导致网站出现或亮或暗的屏幕闪烁。
This problem can be fixed by disabling it:
可以通过禁用它来解决:
- Go to the [Cloudflare dashboard](https://dash.cloudflare.com)
- Click on your domain name in the list
- Click _Optimization_ in the _Speed_ section
- Scroll down to _Rocket Loader™_ and disable it
- 点击 [Cloudflare 控制台](https://dash.cloudflare.com)
- 点击你的域名
- 点击 _Speed_ 中的 _Optimization_ 选项
- 滚动到 _Rocket Loader™_ 并禁用它
Hugo sites built with Blowfish still load very quickly, even with this feature disabled.
即使不需要这个功能,基于 Blowfish 主题的 Hugo 站点本身加载就比较快。
## Shared hosting, VPS or private web server
## 共享主机,VPS 或者 私有服务器
Using traditional web hosting, or deploying to your own web server, is as simple as building your Hugo site and transferring the files to your host.
不论你是使用传统的网站托管,或是部署到你自己的服务器中,这和构建 Hugo 网站并传输文件到你的服务一样简单。
Make sure that the `baseURL` parameter in `config.toml` is set to the full URL to the root of your website (including any sub domains or sub-folders).
确保 `config.toml` 文件中的 `baseURL` 参数是你的网站根目录的完整 URL(包括任何子域名或子文件夹)。
Then build your site using `hugo` and copy the contents of the output directory to the root of your web server and you will be ready to go. By default, the output directory is named `public`.
然后使用 `hugo` 构建你的网站,并将输出目录复制到你的服务器根目录,至此你已经部署完毕了。需要注意的是,默认情况下构建好的网站目录是 `public`
_If you need a hosting provider, check out [Vultr](https://www.vultr.com/?ref=8957394-8H) or [DigitalOcean](https://m.do.co/c/36841235e565). Signing up using these affiliate links will give you up to $100 in free credit so you can try the service._
_如果你需要一个托管提供商,你可以尝试 [Vultr](https://www.vultr.com/?ref=8957394-8H) 或者 [DigitalOcean](https://m.do.co/c/36841235e565)。注册这些产品默认会给你100美元的免费额度,以便你托管服务。_
@@ -1,6 +1,6 @@
---
title: "Installazione"
date: 2020-08-16
weight: 2
draft: false
description: "Come installare il tema Blowfish."
slug: "installation"
@@ -54,7 +54,7 @@ Ecco un rapido video che ti mostra quanto sia veloce iniziare a utilizzare Blowf
<iframe width="100%" height="350" src="https://www.youtube.com/embed/SgXhGb-7QbU?si=ce44baicuQ6zMeXz" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
### Installazione Manuale
### Installazione senza CLI
#### Crea un novo sito
@@ -72,7 +72,7 @@ Esistono diversi modi per installare il tema Blowfish nel proprio sito web Hugo.
Se non sei sicuro, scegli il metodo Git submodule.
##### Installazione usando Git
#### Installazione usando Git
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.
@@ -86,7 +86,7 @@ git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blo
poi continua a [impostare i file di configurazione del tema](#set-up-theme-configuration-files).
##### Installazione usando Hugo
#### Installazione usando Hugo
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.
@@ -116,7 +116,7 @@ Per questo metodo utilizzerai Hugo per gestire i tuoi temi. Hugo utilizza **Go**
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).
##### Installazione manuale
#### Installazione manuale
1. Scarica l'ultima versione del codice sorgente del tema.
{{< button href="https://github.com/nunocoracao/blowfish/releases/latest" target="_blank" >}}Scarica da Github{{< /button >}}
@@ -127,7 +127,7 @@ Per questo metodo utilizzerai Hugo per gestire i tuoi temi. Hugo utilizza **Go**
#### Imposta i file di configurazione del tema
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.
Nella cartella principale del tuo sito web, elimina il file `hugo.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:** Non dovresti sovrascrivere il file `module.toml` se ne esiste già uno nel tuo progetto!
@@ -142,7 +142,7 @@ Una volta che hai copiato i file, la tua cartella delle configurazioni dovrebbe
```shell
config/_default/
├─ config.toml
├─ hugo.toml
├─ languages.en.toml
├─ markup.toml
├─ menus.en.toml
@@ -151,7 +151,7 @@ config/_default/
```
{{< alert >}}
**Importante:** Se non hai utilizzato Hugo Modules per installare Blowfish, devi aggiungere la riga `theme = "blowfish"` all'inizio del tuo file `config.toml`.
**Importante:** Se non hai utilizzato Hugo Modules per installare Blowfish, devi aggiungere la riga `theme = "blowfish"` all'inizio del tuo file `hugo.toml`.
{{< /alert >}}
### Passo successivo
@@ -1,6 +1,6 @@
---
title: "Installation"
date: 2020-08-16
weight: 2
draft: false
description: "How to install the Blowfish theme."
slug: "installation"
@@ -55,7 +55,7 @@ Here's a quick video of how fast it is to get started with Blowfish using the CL
<iframe width="100%" height="350" src="https://www.youtube.com/embed/SgXhGb-7QbU?si=ce44baicuQ6zMeXz" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
### Install Manually
### Install without CLI
#### Create a new site
@@ -73,7 +73,7 @@ There several different ways to install the Blowfish theme into your Hugo websit
If you're unsure, choose the Git submodule method.
##### Install using git
#### Install using 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.
@@ -87,7 +87,7 @@ git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blo
Then continue to [set up the theme configuration files](#set-up-theme-configuration-files).
##### Install using Hugo
#### Install using 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.
@@ -117,7 +117,7 @@ For this method you'll use Hugo to manage your themes. Hugo uses **Go** to initi
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
#### Install manually
1. Download the latest release of the theme source code.
@@ -128,7 +128,7 @@ For this method you'll use Hugo to manage your themes. Hugo uses **Go** to initi
#### Set up theme configuration files
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.
In the root folder of your website, delete the `hugo.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.
{{< alert >}}
**Note:** You should not overwrite the `module.toml` file if one already exists in your project!
@@ -143,7 +143,7 @@ Once you've copied the files, your config folder should look like this:
```shell
config/_default/
├─ config.toml
├─ hugo.toml
├─ languages.en.toml
├─ markup.toml
├─ menus.en.toml
@@ -152,7 +152,7 @@ config/_default/
```
{{< 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.
**Important:** If you didn't use Hugo Modules to install Blowfish, you must add the line `theme = "blowfish"` to the top of your `hugo.toml` file.
{{< /alert >}}
### Next steps
@@ -1,6 +1,6 @@
---
title: "Installation"
date: 2020-08-16
weight: 2
draft: false
description: "How to install the Blowfish theme."
slug: "installation"
@@ -55,7 +55,7 @@ Here's a quick video of how fast it is to get started with Blowfish using the CL
<iframe width="100%" height="350" src="https://www.youtube.com/embed/SgXhGb-7QbU?si=ce44baicuQ6zMeXz" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
### Install Manually
### Install without CLI
#### Create a new site
@@ -73,7 +73,7 @@ There several different ways to install the Blowfish theme into your Hugo websit
If you're unsure, choose the Git submodule method.
##### Install using git
#### Install using 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.
@@ -87,7 +87,7 @@ git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blo
Then continue to [set up the theme configuration files](#set-up-theme-configuration-files).
##### Install using Hugo
#### Install using 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.
@@ -117,7 +117,7 @@ For this method you'll use Hugo to manage your themes. Hugo uses **Go** to initi
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
#### Install manually
1. Download the latest release of the theme source code.
@@ -128,7 +128,7 @@ For this method you'll use Hugo to manage your themes. Hugo uses **Go** to initi
#### Set up theme configuration files
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.
In the root folder of your website, delete the `hugo.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.
{{< alert >}}
**Note:** You should not overwrite the `module.toml` file if one already exists in your project!
@@ -143,7 +143,7 @@ Once you've copied the files, your config folder should look like this:
```shell
config/_default/
├─ config.toml
├─ hugo.toml
├─ languages.en.toml
├─ markup.toml
├─ menus.en.toml
@@ -152,7 +152,7 @@ config/_default/
```
{{< 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.
**Important:** If you didn't use Hugo Modules to install Blowfish, you must add the line `theme = "blowfish"` to the top of your `hugo.toml` file.
{{< /alert >}}
### Next steps
@@ -1,6 +1,6 @@
---
title: "安装和配置"
date: 2020-08-16
weight: 2
draft: false
description: "如何安装 Blowfish 主题。"
slug: "installation"
@@ -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)的教程也可以看此文档。
@@ -54,7 +54,7 @@ blowfish-tools new mynewsite
<iframe width="100%" height="350" src="https://www.youtube.com/embed/SgXhGb-7QbU?si=ce44baicuQ6zMeXz" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
### 手动安装
### 无需 CLI 的安装
#### 创建新站点
@@ -72,7 +72,7 @@ blowfish-tools new mynewsite
如果你不确定用哪一个,请直接选择 Git 子模块的方式。
##### 使用 Git 子模块安装
#### 使用 Git 子模块安装
这个方法可以保证主题简单且快速地安装和更新。除了 **Hugo****Go**,你还需要确保本地机器安装了 **Git**
@@ -86,7 +86,7 @@ git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blo
然后 [设置主题的配置文件](#set-up-theme-configuration-files)。
##### 使用 Hugo 模板安装
#### 使用 Hugo 模板安装
这种方法是使用 Hugo 来管理你的主题,Hugo 使用 **Go** 来初始化和管理模块,所以首先需要确保已经安装了`go`
@@ -116,7 +116,7 @@ git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blo
4. 使用`hugo server` 命令后,主题将会自动下载。
5. 然后 [设置主题的配置文件](#set-up-theme-configuration-files).
##### 手动复制文件
#### 手动复制文件
1. 下载最新的主题源码。
@@ -127,7 +127,7 @@ git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blo
#### 设置主题的配置文件
在你的网站根目录中,删除 Hugo 自动生成的 `config.toml` 文件。从主题中复制 `*.toml` 文件,粘贴到 `config/_default/` 目录中。这将确保你的主题设置准确无误,在此基础上你能够轻松地自定义主题。
在你的网站根目录中,删除 Hugo 自动生成的 `hugo.toml` 文件。从主题中复制 `*.toml` 文件,粘贴到 `config/_default/` 目录中。这将确保你的主题设置准确无误,在此基础上你能够轻松地自定义主题。
{{< alert >}}
**注意:** 如果项目中已经存在 `module.toml` 文件,请不要覆盖它!
@@ -142,7 +142,7 @@ git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blo
```shell
config/_default/
├─ config.toml
├─ hugo.toml
├─ languages.en.toml
├─ markup.toml
├─ menus.en.toml
@@ -151,7 +151,7 @@ config/_default/
```
{{< alert >}}
**重要:** 如果你没有使用 Hugo 模块安装 Blowfish,那么你必须在 `config.toml` 文件中添加 `theme = "blowfish"`
**重要:** 如果你没有使用 Hugo 模块安装 Blowfish,那么你必须在 `hugo.toml` 文件中添加 `theme = "blowfish"`
{{< /alert >}}
### 下一步
@@ -180,7 +180,7 @@ git submodule update --remote --merge
一旦子模块更新完毕,请检查你的确实是否一切正常。
### Update using Hugo
### 使用 Hugo 更新
Hugo 更新也十分容易。只需要进入网站根目录,并执行以下命令即可:
@@ -206,4 +206,4 @@ Hugo 将自动更新项目中所需的任何模块。它通过检查 `module.tom
2. 解压缩, 将文件夹重命名为 `blowfish`,并移动到根目录 `themes/` 目录下。你需要覆盖旧版以替换所有的主题文件。
3. 重建站点,并检查网站是否一切正常。
3. 重建站点,并检查网站是否一切正常。
@@ -1,6 +1,6 @@
---
title: "Multiple Authors"
date: 2020-08-10
weight: 8
draft: false
description: "Configure multiple authors for your articles."
slug: "multi-author"
@@ -1,6 +1,6 @@
---
title: "Multiple Authors"
date: 2020-08-10
weight: 8
draft: false
description: "Configure multiple authors for your articles."
slug: "multi-author"
@@ -1,6 +1,6 @@
---
title: "Multiple Authors"
date: 2020-08-10
weight: 8
draft: false
description: "Configure multiple authors for your articles."
slug: "multi-author"
@@ -1,6 +1,6 @@
---
title: "多创作者模式"
date: 2020-08-10
weight: 8
draft: false
description: "为你的文章设置多个作者。"
slug: "multi-author"
+36 -1
View File
@@ -1,6 +1,6 @@
---
title: "Partials"
date: 2020-08-10
weight: 9
draft: false
description: "All the partials available in Blowfish."
slug: "partials"
@@ -40,6 +40,41 @@ 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).
If you want the tracker to only run on specific domains, you can provide the `dataDomains` configuration value. If you don't provide a `dataDomains` value, the script will run on any website where the `domain` and` websiteid` match.
{{< alert >}}
**Note:** If you enable Umami Analytics, Blowfish will support [Umami Track Event](https://umami.is/docs/track-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`.
{{< /alert >}}
```toml
# config/_default/params.toml
[umamiAnalytics]
websiteid = "ABC12345"
domain = "llama.yoursite.com"
dataDomains = "yoursite.com,yoursite2.com"
enableTrackEvent = true
```
### Seline Analytics
To enable Seline Analytics support, simply provide your [Seline token](https://seline.so/docs/install-seline) in the `config/_default/params.toml` file.
{{< alert >}}
**Note:** If you enable Seline Analytics, Blowfish will support [Seline Track Event](https://seline.so/docs/custom-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`.
{{< /alert >}}
```toml
# config/_default/params.toml
[selineAnalytics]
token = "XXXXXX"
enableTrackEvent = true
```
### 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 `<head>` of the website.
+36 -1
View File
@@ -1,6 +1,6 @@
---
title: "Partials"
date: 2020-08-10
weight: 9
draft: false
description: "All the partials available in Blowfish."
slug: "partials"
@@ -40,6 +40,41 @@ 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).
If you want the tracker to only run on specific domains, you can provide the `dataDomains` configuration value. If you don't provide a `dataDomains` value, the script will run on any website where the `domain` and` websiteid` match.
{{< alert >}}
**Note:** If you enable Umami Analytics, Blowfish will support [Umami Track Event](https://umami.is/docs/track-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`.
{{< /alert >}}
```toml
# config/_default/params.toml
[umamiAnalytics]
websiteid = "ABC12345"
domain = "llama.yoursite.com"
dataDomains = "yoursite.com,yoursite2.com"
enableTrackEvent = true
```
### Seline Analytics
To enable Seline Analytics support, simply provide your [Seline token](https://seline.so/docs/install-seline) in the `config/_default/params.toml` file.
{{< alert >}}
**Note:** If you enable Seline Analytics, Blowfish will support [Seline Track Event](https://seline.so/docs/custom-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`.
{{< /alert >}}
```toml
# config/_default/params.toml
[selineAnalytics]
token = "XXXXXX"
enableTrackEvent = true
```
### 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 `<head>` of the website.
+38 -2
View File
@@ -1,6 +1,6 @@
---
title: "Partials"
date: 2020-08-10
weight: 9
draft: false
description: "All the partials available in Blowfish."
slug: "partials"
@@ -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 and Umami Analytics. Fathom is a paid alternative to Google Analytics that respects user privacy.
### Fathom Analytics
@@ -40,6 +40,42 @@ 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).
If you want the tracker to only run on specific domains, you can provide the `dataDomains` configuration value. If you don't provide a `dataDomains` value, the script will run on any website where the `domain` and` websiteid` match.
{{< alert >}}
**Note:** If you enable Umami Analytics, Blowfish will support [Umami Track Event](https://umami.is/docs/track-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`.
{{< /alert >}}
```toml
# config/_default/params.toml
[umamiAnalytics]
websiteid = "ABC12345"
domain = "llama.yoursite.com"
dataDomains = "yoursite.com,yoursite2.com"
enableTrackEvent = true
```
### Seline Analytics
To enable Seline Analytics support, simply provide your [Seline token](https://seline.so/docs/install-seline) in the `config/_default/params.toml` file.
{{< alert >}}
**Note:** If you enable Seline Analytics, Blowfish will support [Seline Track Event](https://seline.so/docs/custom-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`.
{{< /alert >}}
```toml
# config/_default/params.toml
[selineAnalytics]
token = "XXXXXX"
enableTrackEvent = true
```
### 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 `<head>` of the website.
@@ -1,6 +1,6 @@
---
title: "Partials"
date: 2020-08-10
title: "局部模板(Partials)"
weight: 9
draft: false
description: "所有 Blowfish 可以配置的 Partials"
slug: "partials"
@@ -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,79 @@ To enable Fathom Analytics support, simply provide your Fathom site code in the
domain = "llama.yoursite.com"
```
### Google Analytics
### Google
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.
Hugo partial 本身已经支持了 Google 站点分析。只需要在 `config/_default/config.toml` 文件添加 `googleAnalytics` 参数即可,跟踪脚本会自动添加。
版本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 `<head>` of the website.
### Umami
## Comments
只需要在 `config/_default/params.toml` 文件提供你的 [Umami 跟踪代码](https://umami.is/docs/collect-data),就可以快速支持 Umami 站点分析。
如果你想使用自定义域名来获取跟踪脚本, 那么需要提供 `domain` 参数,否则会从 Umami 云服务版的地址 (analytics.umami.is) 获取脚本。
如果你只想在特别的数个域名中使用 tracker 功能,那么需要提供 `dataDomains` 参数。否则任何一个匹配了 `websiteid``domain` 参数值的网站,Umami 脚本都会执行。
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.
{{< alert >}}
**Note:** 开启 Umami 网站分析后, Blowfish 会自动支持 [Umami 事件追踪](https://umami.is/docs/track-events)。如果你不想支持此功能,需要把参数 `enableTrackEvent` 设置为 `false`
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.
{{< /alert >}}
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.
```toml
# config/_default/params.toml
## Favicons
[umamiAnalytics]
websiteid = "ABC12345"
domain = "llama.yoursite.com"
dataDomains = "yoursite.com,yoursite2.com"
```
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).
### Seline
只需要在 `config/_default/params.toml` 文件提供你的 [Seline token](https://seline.so/docs/install-seline),就可以快速支持 Seline 站点分析。
{{< alert >}}
**Note:** 开启 Seline 网站分析后, Blowfish 会自动支持 [Seline 事件追踪](https://seline.so/docs/custom-events)。如果你不想支持此功能,需要把参数 `enableTrackEvent` 设置为 `false`
{{< /alert >}}
```toml
# config/_default/params.toml
[selineAnalytics]
token = "XXXXXX"
enableTrackEvent = true
```
### 提供自定义站点分析
如果你想在你的网站提供其他站点分析,你可以自己提供脚本,并覆盖 Blowfish 主题中内置的 partial。
只需要创建 `layouts/partials/extend-head.html` 文件并在内容中提供脚本即可,Blowfish 主题会自动将 `extend-head.html` 中的内容添加到整个站点的 `<head>` 中。
## 评论
Blowfish 支持了在每篇文章底部添加一个评论功能。只需要提供一个 `layouts/partials/comments.html` 文件,并在其中添加显示评论的代码即可。
你可以使用 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 +112,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 `<head>` in place of the default assets.
## Icon
或者,您也可以完全覆盖默认的 favicon 行为,提供自己的 favicon HTML 标签和资源。只需在项目中提供一个 `layouts/partials/favicons.html` 文件,该文件就会被加入网站的 `<head>` 中,取代默认资源。
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" >}})页面,查看支持图标的完整列表。
Icons can also be used in article content by calling the [icon shortcode]({{< ref "shortcodes#icon" >}}).
可以通过在项目的 `assets/icons/` 目录中提供自己的图标资源来添加自定义图标。然后,可以通过使用 SVG 文件名(不含`.svg`扩展名)在局部中引用图标。
## Extensions
图标还可通过调用[图标简码]{{< ref "shortcodes#icon" >}})在文章内容中使用。
Blowfish also provides for a number of extension partials that allow for expanding upon base functionality.
## 扩展
### Article link
Blowfish 还提供了许多扩展 partial,可以扩展基本功能。
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.
### 文章链接
### Head and Footer
如果您希望在文章链接后插入附加代码,请创建一个 `layouts/partials/extend-article-link.html` 文件。如果与[`badge`]({{< ref "shortcodes#badge" >}})简码结合使用,该功能将尤为强大,可用于突出显示某些文章的元数据。
The theme allows for inserting additional code directly into the `<head>` and `<footer>` sections of the template. These can be useful for providing scripts or other logic that isn't part of the theme.
### 头部和尾部
Simply create either `layouts/partials/extend-head.html` or `layouts/partials/extend-footer.html` and these will automatically be included in your website build. Both partials are injected as the last items in `<head>` and `<footer>` so they can be used to override theme defaults.
本主题允许在模板的`<head>``<footer>`部分直接插入附加代码。这些代码可用于提供不属于主题的脚本或其他逻辑。
只需创建`layouts/partials/extend-head.html``layouts/partials/extend-footer.html`,这些部分就会自动包含在网站构建中。这两个 partial 将作为最后一项注入到 `<head>``<footer>` 中,因此它们可用于覆盖主题默认值。
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Series"
date: 2020-08-09
weight: 12
draft: false
description: "Learn how to group articles under a series."
slug: "series"
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Series"
date: 2020-08-09
weight: 12
draft: false
description: "Learn how to group articles under a series."
slug: "series"
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Series"
date: 2020-08-09
weight: 12
draft: false
description: "Learn how to group articles under a series."
slug: "series"
@@ -1,6 +1,6 @@
---
title: "系列"
date: 2020-08-09
weight: 12
draft: false
description: "了解如何将文章分组到系列中。"
slug: "series"
+95 -13
View File
@@ -1,6 +1,6 @@
---
title: "Shortcodes"
date: 2020-08-11
weight: 6
draft: false
description: "All the shortcodes available in Blowfish."
slug: "shortcodes"
@@ -188,6 +188,59 @@ You can see some additional Chart.js examples on the [charts samples]({{< ref "c
<br/><br/><br/>
## Code Importer
This shortcode is for importing code from external sources easily without copying and pasting.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ------------------------------------------------------- |
| `url` | **Required** URL to an externally hosted code file. |
| `type` | Code type used for syntax highlighting. |
| `startLine` | **Optional** The line number to start the import from. |
| `endLine` | **Optional** The line number to end the import at. |
<!-- prettier-ignore-end -->
**Example:**
```md
{{</* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" */>}}
```
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" >}}
```md
{{</* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18" */>}}
```
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18">}}
<br/><br/>
## Codeberg Card
`codeberg` allows you to quickly link a Codeberg repository via the Codeberg API, providing real-time updates on stats such as stars and forks.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ----------------------------------------------------- |
| `repo` | [String] codeberg repo in the format of `username/repo` |
<!-- prettier-ignore-end -->
**Example 1:**
```md
{{</* codeberg repo="forgejo/forgejo" */>}}
```
{{< codeberg repo="forgejo/forgejo" >}}
<br/><br/><br/>
## Figure
Blowfish includes a `figure` shortcode for adding images to content. The shortcode replaces the base Hugo functionality in order to provide additional performance benefits.
@@ -396,10 +449,10 @@ The input is written in Markdown so you can format it however you please.
**Example1 :**
```md
{{</* keyword */>}} Super skill {{</* /keyword */>}}
{{</* keyword */>}} *Super* skill {{</* /keyword */>}}
```
{{< keyword >}} *Standalone* skill {{< /keyword >}}
{{< keyword >}} *Super* skill {{< /keyword >}}
**Example2 :**
@@ -452,7 +505,7 @@ When life gives you lemons, make lemonade.
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
{{< alert >}}
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/variables/page/) to learn more about which parameters are available to use.
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/methods/page/) to learn more about which parameters are available to use.
{{</ alert >}}
<!-- prettier-ignore-end -->
@@ -468,7 +521,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
**Example #2:**
```md
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}}
{{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
```
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
@@ -614,6 +667,10 @@ With other shortcodes
{{</* /gallery */>}}
{{</* /timelineItem */>}}
{{</* timelineItem icon="code" header="Another Awesome Header"*/>}}
{{</* github repo="nunocoracao/blowfish" */>}}
{{</* /timelineItem */>}}
{{</* /timeline */>}}
```
@@ -646,7 +703,9 @@ With other shortcodes
<img src="gallery/07.jpg" class="grid-w33" />
{{< /gallery >}}
{{</ timelineItem >}}
{{< timelineItem icon="code" header="Another Awesome Header">}}
{{< github repo="nunocoracao/blowfish" >}}
{{</ timelineItem >}}
{{</ timeline >}}
@@ -714,8 +773,9 @@ consectetur adipiscing elit.
breakLines=false
loop=true
*/>}}
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
"Frankly, my dear, I don't give a damn." Gone with the Wind (1939)
"I'm gonna make him an offer he can't refuse." The Godfather (1972)
"Toto, I've a feeling we're not in Kansas anymore." The Wizard of Oz (1939)
{{</* /typeit */>}}
```
@@ -738,17 +798,39 @@ consectetur adipiscing elit.
A shortcut to embed youtube videos using the [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) library. This library is a lightweight alternative to the standard youtube embeds, and it's designed to be faster and more efficient.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ----------------------------------- |
| `id` | [String] Youtube video id to embed. |
| `label` | [String] Label for the video |
| Parameter | Description |
| --------- | -------------------------------------------- |
| `id` | [String] Youtube video id to embed. |
| `label` | [String] Label for the video |
| `params` | [String] Extras parameters for video playing |
<!-- prettier-ignore-end -->
**Example 1:**
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" */>}}
```
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" >}}
**Example 2:**
You can use all of Youtube's [player parameters](https://developers.google.com/youtube/player_parameters#Parameters) for the `params` variable, as demonstrated below:
> This video will start after 130 seconds (2m10)
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130" */>}}
```
> This video will not have UI controls, will start playing at 130 seconds and will stop 10 seconds later.
To concatenate multiple options as shown below, you need to add the `&` character between them.
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" */>}}
```
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" >}}
More informations can be found on the [youtubeLite GitHub repo](https://github.com/paulirish/lite-youtube-embed/blob/master/readme.md#custom-player-parameters) and Youtube's [player parameters](https://developers.google.com/youtube/player_parameters#Parameters) page.
+94 -13
View File
@@ -1,6 +1,6 @@
---
title: "Shortcodes"
date: 2020-08-11
weight: 6
draft: false
description: "All the shortcodes available in Blowfish."
slug: "shortcodes"
@@ -188,6 +188,58 @@ You can see some additional Chart.js examples on the [charts samples]({{< ref "c
<br/><br/><br/>
## Code Importer
This shortcode is for importing code from external sources easily without copying and pasting.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ------------------------------------------------------- |
| `url` | **Required** URL to an externally hosted code file. |
| `type` | Code type used for syntax highlighting. |
| `startLine` | **Optional** The line number to start the import from. |
| `endLine` | **Optional** The line number to end the import at. |
<!-- prettier-ignore-end -->
**Example:**
```md
{{</* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" */>}}
```
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" >}}
```md
{{</* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18" */>}}
```
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18">}}
<br/><br/>
## Codeberg Card
`codeberg` allows you to quickly link a Codeberg repository via the Codeberg API, providing real-time updates on stats such as stars and forks.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ----------------------------------------------------- |
| `repo` | [String] codeberg repo in the format of `username/repo` |
<!-- prettier-ignore-end -->
**Example 1:**
```md
{{</* codeberg repo="forgejo/forgejo" */>}}
```
{{< codeberg repo="forgejo/forgejo" >}}
<br/><br/><br/>
## Figure
Blowfish includes a `figure` shortcode for adding images to content. The shortcode replaces the base Hugo functionality in order to provide additional performance benefits.
@@ -396,10 +448,10 @@ The input is written in Markdown so you can format it however you please.
**Example1 :**
```md
{{</* keyword */>}} Super skill {{</* /keyword */>}}
{{</* keyword */>}} *Super* skill {{</* /keyword */>}}
```
{{< keyword >}} *Standalone* skill {{< /keyword >}}
{{< keyword >}} *Super* skill {{< /keyword >}}
**Example2 :**
@@ -452,7 +504,7 @@ When life gives you lemons, make lemonade.
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
{{< alert >}}
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/variables/page/) to learn more about which parameters are available to use.
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/methods/page/) to learn more about which parameters are available to use.
{{</ alert >}}
<!-- prettier-ignore-end -->
@@ -468,7 +520,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
**Example #2:**
```md
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}}
{{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
```
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
@@ -614,6 +666,10 @@ With other shortcodes
{{</* /gallery */>}}
{{</* /timelineItem */>}}
{{</* timelineItem icon="code" header="Another Awesome Header"*/>}}
{{</* github repo="nunocoracao/blowfish" */>}}
{{</* /timelineItem */>}}
{{</* /timeline */>}}
```
@@ -646,7 +702,9 @@ With other shortcodes
<img src="gallery/07.jpg" class="grid-w33" />
{{< /gallery >}}
{{</ timelineItem >}}
{{< timelineItem icon="code" header="Another Awesome Header">}}
{{< github repo="nunocoracao/blowfish" >}}
{{</ timelineItem >}}
{{</ timeline >}}
@@ -714,8 +772,9 @@ consectetur adipiscing elit.
breakLines=false
loop=true
*/>}}
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
"Frankly, my dear, I don't give a damn." Gone with the Wind (1939)
"I'm gonna make him an offer he can't refuse." The Godfather (1972)
"Toto, I've a feeling we're not in Kansas anymore." The Wizard of Oz (1939)
{{</* /typeit */>}}
```
@@ -738,17 +797,39 @@ consectetur adipiscing elit.
A shortcut to embed youtube videos using the [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) library. This library is a lightweight alternative to the standard youtube embeds, and it's designed to be faster and more efficient.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ----------------------------------- |
| `id` | [String] Youtube video id to embed. |
| `label` | [String] Label for the video |
| Parameter | Description |
| --------- | -------------------------------------------- |
| `id` | [String] Youtube video id to embed. |
| `label` | [String] Label for the video |
| `params` | [String] Extras parameters for video playing |
<!-- prettier-ignore-end -->
**Example 1:**
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" */>}}
```
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" >}}
**Example 2:**
You can use all of Youtube's [player parameters](https://developers.google.com/youtube/player_parameters#Parameters) for the `params` variable, as demonstrated below:
> This video will start after 130 seconds (2m10)
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130" */>}}
```
> This video will not have UI controls, will start playing at 130 seconds and will stop 10 seconds later.
To concatenate multiple options as shown below, you need to add the `&` character between them.
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" */>}}
```
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" >}}
More informations can be found on the [youtubeLite GitHub repo](https://github.com/paulirish/lite-youtube-embed/blob/master/readme.md#custom-player-parameters) and Youtube's [player parameters](https://developers.google.com/youtube/player_parameters#Parameters) page.
+136 -14
View File
@@ -1,6 +1,6 @@
---
title: "Shortcodes"
date: 2020-08-11
weight: 6
draft: false
description: "All the shortcodes available in Blowfish."
slug: "shortcodes"
@@ -18,7 +18,7 @@ In addition to all the [default Hugo shortcodes](https://gohugo.io/content-manag
<!-- prettier-ignore-start -->
| Parameter | Description |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `icon` | **Optional.** the icon to display on the left side.<br>**Default:** `exclaimation triangle icon` (Check out the [icon shortcode](#icon) for more details on using icons.) |
| `icon` | **Optional.** the icon to display on the left side.<br>**Default:** `triangle-exclamation` (Check out the [icon shortcode](#icon) for more details on using icons.) |
| `iconColor` | **Optional.** the color for the icon in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
| `cardColor` | **Optional.** the color for the card background in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
| `textColor` | **Optional.** the color for the text in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
@@ -188,6 +188,59 @@ You can see some additional Chart.js examples on the [charts samples]({{< ref "c
<br/><br/><br/>
## Code Importer
This shortcode is for importing code from external sources easily without copying and pasting.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ------------------------------------------------------- |
| `url` | **Required** URL to an externally hosted code file. |
| `type` | Code type used for syntax highlighting. |
| `startLine` | **Optional** The line number to start the import from. |
| `endLine` | **Optional** The line number to end the import at. |
<!-- prettier-ignore-end -->
**Example:**
```md
{{</* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" */>}}
```
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" >}}
```md
{{</* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18" */>}}
```
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18">}}
<br/><br/>
## Codeberg Card
`codeberg` allows you to quickly link a Codeberg repository via the Codeberg API, providing real-time updates on stats such as stars and forks.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ----------------------------------------------------- |
| `repo` | [String] codeberg repo in the format of `username/repo` |
<!-- prettier-ignore-end -->
**Example 1:**
```md
{{</* codeberg repo="forgejo/forgejo" */>}}
```
{{< codeberg repo="forgejo/forgejo" >}}
<br/><br/><br/>
## Figure
Blowfish includes a `figure` shortcode for adding images to content. The shortcode replaces the base Hugo functionality in order to provide additional performance benefits.
@@ -233,6 +286,26 @@ Blowfish also supports automatic conversion of images included using standard Ma
<br/><br/><br/>
## Forgejo Card
`forgejo` allows you to quickly link a Forgejo repository via the forgejo API, providing real-time updates on stats such as stars and forks.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ----------------------------------------------------- |
| `repo` | [String] forgejo repo in the format of `username/repo`|
| `server` | [String] server URL like `https://v8.next.forgejo.org`|
<!-- prettier-ignore-end -->
**Example 1:**
```md
{{</* forgejo server="https://v8.next.forgejo.org" repo="forgejo/forgejo" */>}}
```
{{< forgejo server="https://v8.next.forgejo.org" repo="forgejo/forgejo" >}}
<br/><br/><br/>
## Gallery
`gallery` allows you to showcase multiple images at once, in a responsive manner with more varied and interesting layouts.
@@ -292,6 +365,26 @@ In order to add images to the gallery, use `img` tags for each image and add `cl
<br/><br/><br/>
## Gitea Card
`gitea` allows you to quickly link a Gitea repository via the gitea API, providing real-time updates on stats such as stars and forks.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ----------------------------------------------------- |
| `repo` | [String] gitea repo in the format of `username/repo` |
| `server` | [String] server URL like `https://git.fsfe.org` |
<!-- prettier-ignore-end -->
**Example 1:**
```md
{{</* gitea server="https://git.fsfe.org" repo="FSFE/fsfe-website" */>}}
```
{{< gitea server="https://git.fsfe.org" repo="FSFE/fsfe-website" >}}
<br/><br/><br/>
## GitHub Card
`github` allows you to quickly link a github repository, all while showing and updating in realtime stats about it, such as the number of stars and forks it has.
@@ -396,10 +489,10 @@ The input is written in Markdown so you can format it however you please.
**Example1 :**
```md
{{</* keyword */>}} Super skill {{</* /keyword */>}}
{{</* keyword */>}} *Super* skill {{</* /keyword */>}}
```
{{< keyword >}} *Standalone* skill {{< /keyword >}}
{{< keyword >}} *Super* skill {{< /keyword >}}
**Example2 :**
@@ -452,7 +545,7 @@ When life gives you lemons, make lemonade.
| `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` |
{{< alert >}}
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/variables/page/) to learn more about which parameters are available to use.
The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/methods/page/) to learn more about which parameters are available to use.
{{</ alert >}}
<!-- prettier-ignore-end -->
@@ -468,7 +561,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
**Example #2:**
```md
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}}
{{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
```
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
@@ -614,6 +707,10 @@ With other shortcodes
{{</* /gallery */>}}
{{</* /timelineItem */>}}
{{</* timelineItem icon="code" header="Another Awesome Header"*/>}}
{{</* github repo="nunocoracao/blowfish" */>}}
{{</* /timelineItem */>}}
{{</* /timeline */>}}
```
@@ -646,7 +743,9 @@ With other shortcodes
<img src="gallery/07.jpg" class="grid-w33" />
{{< /gallery >}}
{{</ timelineItem >}}
{{< timelineItem icon="code" header="Another Awesome Header">}}
{{< github repo="nunocoracao/blowfish" >}}
{{</ timelineItem >}}
{{</ timeline >}}
@@ -714,8 +813,9 @@ consectetur adipiscing elit.
breakLines=false
loop=true
*/>}}
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
"Frankly, my dear, I don't give a damn." Gone with the Wind (1939)
"I'm gonna make him an offer he can't refuse." The Godfather (1972)
"Toto, I've a feeling we're not in Kansas anymore." The Wizard of Oz (1939)
{{</* /typeit */>}}
```
@@ -738,17 +838,39 @@ consectetur adipiscing elit.
A shortcut to embed youtube videos using the [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) library. This library is a lightweight alternative to the standard youtube embeds, and it's designed to be faster and more efficient.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ----------------------------------- |
| `id` | [String] Youtube video id to embed. |
| `label` | [String] Label for the video |
| Parameter | Description |
| --------- | -------------------------------------------- |
| `id` | [String] Youtube video id to embed. |
| `label` | [String] Label for the video |
| `params` | [String] Extras parameters for video playing |
<!-- prettier-ignore-end -->
**Example 1:**
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" */>}}
```
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" >}}
**Example 2:**
You can use all of Youtube's [player parameters](https://developers.google.com/youtube/player_parameters#Parameters) for the `params` variable, as demonstrated below:
> This video will start after 130 seconds (2m10)
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130" */>}}
```
> This video will not have UI controls, will start playing at 130 seconds and will stop 10 seconds later.
To concatenate multiple options as shown below, you need to add the `&` character between them.
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" */>}}
```
{{< youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" params="start=130&end=10&controls=0" >}}
More informations can be found on the [youtubeLite GitHub repo](https://github.com/paulirish/lite-youtube-embed/blob/master/readme.md#custom-player-parameters) and Youtube's [player parameters](https://developers.google.com/youtube/player_parameters#Parameters) page.
@@ -1,6 +1,6 @@
---
title: "简码"
date: 2020-08-11
weight: 6
draft: false
description: "所有 Blowfish 中可用的简码"
slug: "shortcodes"
@@ -16,12 +16,12 @@ series_order: 8
`alert` 可以将其中内容输出为文章中的风格化消息框。它对于吸引读者注意您不想让读者错过的重要信息很有用。
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `icon` | **可选** 显示在左侧的图标。<br>**默认:** `exclaimation triangle icon` (查看[图标简码](#icon),了解有关使用图标的更多详细信息。) |
| `iconColor` | **可选** 基本 CSS 样式中图标的颜色。<br>可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)<br>默认情况下由当前配色方案决定。 |
| `cardColor` | **可选** 基本 CSS 样式中卡片背景的颜色。<br>可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)<br>默认情况下由当前配色方案决定。 |
| `textColor` | **可选** 基本 CSS 样式中文本的颜色。<br>可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)<br>默认情况下由当前配色方案决定。 |
| 参数 | 功能 |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `icon` | **可选** 显示在左侧的图标。<br>**默认:** `exclaimation triangle icon` (查看[图标简码](#icon),了解有关使用图标的更多详细信息。) |
| `iconColor` | **可选** 基本 CSS 样式中图标的颜色。<br>可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)<br>默认情况下由当前配色方案决定。 |
| `cardColor` | **可选** 基本 CSS 样式中卡片背景的颜色。<br>可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)<br>默认情况下由当前配色方案决定。 |
| `textColor` | **可选** 基本 CSS 样式中文本的颜色。<br>可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)<br>默认情况下由当前配色方案决定。 |
<!-- prettier-ignore-end -->
输入内容是用 Markdown 语言编写的,因此您可以根据需要设置其格式。
@@ -69,18 +69,18 @@ This is an error!
`Article` 将把一篇文章嵌入到一个 markdown 文件中。 参数中的 `link`应该是要嵌入的文件的 `.RelPermalink`。请注意,如果简码引用其父级文件,则它不会显示任何内容。 *注意:如果您在 Blowfish(即 /blowfish/)等子文件夹中运行网站,请在链接中包含该路径。*
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| --------- | -------------------------------------------------------- |
| `link` | **必填** 要嵌入文章的 `.RelPermalink` |
| 参数 | 功能 |
| ------ | ------------------------------------- |
| `link` | **必填** 要嵌入文章的 `.RelPermalink` |
<!-- prettier-ignore-end -->
**例如:**
```md
{{</* article link="/docs/welcome/" */>}}
{{</* article link="/zh-cn/docs/welcome/" */>}}
```
{{< article link="/docs/welcome/" >}}
{{< article link="/zh-cn/docs/welcome/" >}}
<br/><br/><br/>
@@ -125,11 +125,11 @@ Call to action
`carousel` 用于生成可交互且具有视觉吸引力的方式展示多个图像的画廊。这允许用户滑动浏览多个图像,同时仅占用单个图像的垂直空间。 所有图像均使用父组件的完整宽度并使用预定义的宽高比 `16:9``21:9``32:9` 之一显示。
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| ------------- | ----------------------------------------------------------------------------------------------------------------- |
| `images` | **必填** 用于匹配图像名称的正则表达式或 URL。 |
| 参数 | 功能 |
| ------------- | --------------------------------------------------------------------- |
| `images` | **必填** 用于匹配图像名称的正则表达式或 URL。 |
| `aspectRatio` | **可选** 画廊的纵横比。`16-9``21-9``32-9` 。默认设置为`16-9` 。 |
| `interval` | **可选** 自动滚动的时间间隔,以毫秒为单位指定。默认为`2000`2 秒)。 |
| `interval` | **可选** 自动滚动的时间间隔,以毫秒为单位指定。默认为`2000`2 秒)。 |
<!-- prettier-ignore-end -->
**例1:** 16:9 宽高比和 URL 图像列表
@@ -188,6 +188,60 @@ data: {
<br/><br/><br/>
## Code Importer
此短代码用于轻松从外部源导入代码,无需复制和粘贴
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ---------------------------------- |
| `url` | **必需的** 外部托管代码文件的 URL. |
| `type` | 用于语法突出显示的代码类型. |
| `startLine` | **可选** 从代码文件中导入的起始行. |
| `endLine` | **可选** 从代码文件中导入的结束行. |
<!-- prettier-ignore-end -->
**Example:**
```md
{{</* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" */>}}
```
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" >}}
```md
{{</* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18" */>}}
```
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18">}}
<br/><br/>
## Codeberg Card
`codeberg` 允许您通过 Codeberg API 快速链接 Codeberg 存储库,提供星号和分叉等统计信息的实时更新.
<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ----------------------------------------------------- |
| `repo` | [String] Codeberg 存储库的格式为 `username/repo` |
<!-- prettier-ignore-end -->
**Example 1:**
```md
{{</* codeberg repo="forgejo/forgejo" */>}}
```
{{< codeberg repo="forgejo/forgejo" >}}
<br/><br/><br/>
## Figure
Blowfish 包含一个 `figure` 简码,用于将图像添加到内容中。该简码取代了基本的 Hugo 功能,且性能更好。
@@ -197,16 +251,16 @@ Blowfish 包含一个 `figure` 简码,用于将图像添加到内容中。该
`figure` 简码接受六个参数:
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 参数 | 功能 |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `src` | **必填** 图像的本地路径/文件名或 URL。当提供路径和文件名时,主题将尝试使用以下查找顺序来查找图像:首先,作为与页面绑定的[页面资源](https://gohugo.io/content-management/page-resources/);然后是 `assets/` 目录中的文件;最后是,`static/`目录中的文件。 |
| `alt` | 图像的[替代文本描述](https://moz.com/learn/seo/alt-text)。 |
| `caption` | Markdown 格式的图像标题,将显示在图像下方。 |
| `class` | 应用于图像的其他 CSS 类。 |
| `href` | 图像应链接到的 URL。 |
| `target` | `href` URL 的目标属性。 |
| `nozoom` | `nozoom=true` 会禁用图像`缩放`功能。与 `href` 结合使用十分有用。 |
| `default` | 用于恢复默认 Hugo `figure` 行为的特殊参数。只需提供`default=true`,然后使用正常的 [Hugo 简码语法](https://gohugo.io/content-management/shortcodes/#figure)。 |
| `alt` | 图像的[替代文本描述](https://moz.com/learn/seo/alt-text)。 |
| `caption` | Markdown 格式的图像标题,将显示在图像下方。 |
| `class` | 应用于图像的其他 CSS 类。 |
| `href` | 图像应链接到的 URL。 |
| `target` | `href` URL 的目标属性。 |
| `nozoom` | `nozoom=true` 会禁用图像`缩放`功能。与 `href` 结合使用十分有用。 |
| `default` | 用于恢复默认 Hugo `figure` 行为的特殊参数。只需提供`default=true`,然后使用正常的 [Hugo 简码语法](https://gohugo.io/content-management/shortcodes/#figure)。 |
<!-- prettier-ignore-end -->
Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用以下格式,主题将自动处理:
@@ -297,9 +351,9 @@ Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用
`github` 允许您快速链接到 github Repo,同时显示和更新有关它的实时统计信息,例如它的 star 和 fork 数。
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| --------- | ----------------------------------------------------- |
| `repo` | [String] 格式为 `username/repo` 的 github repo |
| 参数 | 功能 |
| ------ | ---------------------------------------------- |
| `repo` | [String] 格式为 `username/repo` 的 github repo |
<!-- prettier-ignore-end -->
**例1:**
@@ -320,9 +374,9 @@ Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用
最后,只要 `api/v4/projects/` 可用,就可以提供自定义 GitLab 实例 URL,从而使此简码能够显示大多数自托管/企业组织。
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| ----------- | ----------------------------------------------------------------------- |
| `projectID` | [String] gitlab 数字项目ID |
| 参数 | 功能 |
| ----------- | ----------------------------------------------------------- |
| `projectID` | [String] gitlab 数字项目ID |
| `baseURL` | [String] 可选 gitlab 实例 URL,默认为 `https://gitlab.com/` |
<!-- prettier-ignore-end -->
@@ -386,9 +440,9 @@ Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| --------- | --------------------------------------- |
| `icon` | **可选** 关键字中使用的图标 |
| 参数 | 功能 |
| ------ | --------------------------- |
| `icon` | **可选** 关键字中使用的图标 |
<!-- prettier-ignore-end -->
输入内容是用 Markdown 编写的,因此您可以根据需要设置其格式。
@@ -443,16 +497,16 @@ When life gives you lemons, make lemonade.
`List` 将显示最近文章的列表。此简码需要一个限制值来约束列表。此外,它还支持输入 `where``value` ,以便按参数过滤文章。请注意,此简码不会显示其父页面,但会计入限制值。
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit` | **必填** 要显示的最近文章数量。 |
| `title` | **可选** 列表标题,默认为 `Recent` |
| `cardView` | **可选** 列表启用卡片视图,默认为 `false` |
| `where` | 用于筛选文章的变量,例如 `Type` |
| 参数 | 功能 |
| ---------- | ------------------------------------------------------------------------------------------------------ |
| `limit` | **必填** 要显示的最近文章数量。 |
| `title` | **可选** 列表标题,默认为 `Recent` |
| `cardView` | **可选** 列表启用卡片视图,默认为 `false` |
| `where` | 用于筛选文章的变量,例如 `Type` |
| `value` | 需要与 `where` 中定义的参数匹配的值,以进行文章查询,例如对于 `where` == `Type`,可以找到文章 `sample` |
{{< alert >}}
`where``value` 值用于简码中进行以下格式的查询 `where .Site.RegularPages $where $value` 。检查 [Hugo 文档](https://gohugo.io/variables/page/) 以了解有关可用参数的更多信息。
`where``value` 值用于简码中进行以下格式的查询 `where .Site.RegularPages $where $value` 。检查 [Hugo 文档](https://gohugo.io/methods/page/) 以了解有关可用参数的更多信息。
{{</ alert >}}
<!-- prettier-ignore-end -->
@@ -468,7 +522,7 @@ When life gives you lemons, make lemonade.
**例 2:**
```md
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}}
{{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
```
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
@@ -504,9 +558,9 @@ When life gives you lemons, make lemonade.
此简码允许您从外部源导入 Markdown 文件。这对于包含来自其他仓库或网站的内容非常有用,而无需复制和粘贴内容。
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| --------- | ------------------------------------------------------- |
| `url` | **必填** 外部托管 Markdown 文件的 URL。 |
| 参数 | 功能 |
| ----- | --------------------------------------- |
| `url` | **必填** 外部托管 Markdown 文件的 URL。 |
<!-- prettier-ignore-end -->
@@ -572,12 +626,12 @@ B-->C[Profit]
`timeline` 创建了一个可视化时间线,用于展示专业经验、项目成就等。 `timeline` 简码依赖于 `timelineItem` 子简码来定义主时间线中的每个项目。每个项目可以具有以下属性。
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| ----------- | -------------------------------------------- |
| 参数 | 功能 |
| ----------- | ------------------------ |
| `icon` | 要在时间线中使用的图标。 |
| `header` | 每个条目的标题 |
| `badge` | 放置在右上角徽章内的文本 |
| `subheader` | 每个条目的副标题 |
| `header` | 每个条目的标题 |
| `badge` | 放置在右上角徽章内的文本 |
| `subheader` | 每个条目的副标题 |
<!-- prettier-ignore-end -->
@@ -613,6 +667,10 @@ With other shortcodes
{{</* /gallery */>}}
{{</* /timelineItem */>}}
{{</* timelineItem icon="code" header="Another Awesome Header"*/>}}
{{</* github repo="nunocoracao/blowfish" */>}}
{{</* /timelineItem */>}}
{{</* /timeline */>}}
```
@@ -644,6 +702,9 @@ With other shortcodes
<img src="gallery/06.jpg" class="grid-w33" />
<img src="gallery/07.jpg" class="grid-w33" />
{{< /gallery >}}
{{< timelineItem icon="code" header="Another Awesome Header">}}
{{< github repo="nunocoracao/blowfish" >}}
{{</ timelineItem >}}
{{</ timelineItem >}}
{{</ timeline >}}
@@ -658,17 +719,17 @@ With other shortcodes
Blowfish 使用简码实现 TypeIt 功能的子集。在 `typeit` 简码中编写文本,并使用以下参数来配置您想要的行为。
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tag` | [String] 将用于呈现字符串的 `html` 标签。 |
| `classList` | [String] 应用于 `html` 元素的 `css` 类列表。 |
| `initialString` | [String] 将显示为先写入并将被替换的初始字符串。 |
| `speed` | [number] 每步之间的打字速度,以毫秒为单位。 |
| `lifeLike` | [boolean] 使打字速度不规律,就像真人在打字一样。 |
| `startDelay` | [number] 插件在初始化后到开始输入的延迟时间。 |
| `breakLines` | [boolean] 将多个字符串换行输出 (true),或者将它们删除并替换 (false)。 |
| 参数 | 功能 |
| ------------------ | ------------------------------------------------------------------------- |
| `tag` | [String] 将用于呈现字符串的 `html` 标签。 |
| `classList` | [String] 应用于 `html` 元素的 `css` 类列表。 |
| `initialString` | [String] 将显示为先写入并将被替换的初始字符串。 |
| `speed` | [number] 每步之间的打字速度,以毫秒为单位。 |
| `lifeLike` | [boolean] 使打字速度不规律,就像真人在打字一样。 |
| `startDelay` | [number] 插件在初始化后到开始输入的延迟时间。 |
| `breakLines` | [boolean] 将多个字符串换行输出 (true),或者将它们删除并替换 (false)。 |
| `waitUntilVisible` | [boolean] 决定脚本在网站加载时启动还是在目标元素可见时启动。默认为 `true` |
| `loop` | [boolean] 字符串动画是否会循环 |
| `loop` | [boolean] 字符串动画是否会循环 |
<!-- prettier-ignore-end -->
@@ -737,10 +798,10 @@ consectetur adipiscing elit.
使用 [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) 库嵌入 YouTube 视频的简码。该库是 YouTube 嵌入播放器的轻量级替代品,其设计速度更快、更高效。
<!-- prettier-ignore-start -->
| 参数 | 功能 |
| --------- | ----------------------------------- |
| `id` | [String] 要嵌入的 YouTube 视频 ID。 |
| `label` | [String] 视频的标签 |
| 参数 | 功能 |
| ------- | ----------------------------------- |
| `id` | [String] 要嵌入的 YouTube 视频 ID。 |
| `label` | [String] 视频的标签 |
<!-- prettier-ignore-end -->
**例1:**
@@ -1,6 +1,6 @@
---
title: "Thumbnails"
date: 2020-08-10
weight: 10
draft: false
description: "Turn on thumbnails for your articles."
slug: "thumbnails"
@@ -1,6 +1,6 @@
---
title: "Thumbnails"
date: 2020-08-10
weight: 10
draft: false
description: "Turn on thumbnails for your articles."
slug: "thumbnails"
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Thumbnails"
date: 2020-08-10
weight: 10
draft: false
description: "Turn on thumbnails for your articles."
slug: "thumbnails"
@@ -1,6 +1,6 @@
---
title: "缩略图"
date: 2020-08-10
weight: 10
draft: false
description: "为你的文章配置缩略图。"
slug: "thumbnails"
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Benvenuti a Blowfish"
date: 2022-01-19
weight: 1
draft: false
description: "Scopri le novità della versione 2.0 di Blowfish."
tags: ["novità", "documenti"]
+1 -1
View File
@@ -1,6 +1,6 @@
---
title: "Welcome to Blowfish"
date: 2022-01-19
weight: 1
draft: false
description: "Discover what's new in Blowfish version 2.0."
tags: ["new", "docs"]
+3 -3
View File
@@ -1,6 +1,6 @@
---
title: "Welcome to Blowfish"
date: 2022-01-19
weight: 1
draft: false
description: "Discover what's new in Blowfish version 2.0."
tags: ["new", "docs"]
@@ -26,7 +26,7 @@ A highly requested feature, Blowfish is now multilingual! If you publish your co
<div class="text-2xl text-center" style="font-size: 2.8rem">:gb: :de: :fr: :es: :cn: :brazil: :tr: :bangladesh:</div>
Thanks to submissions from the community, Blowfish has already been translated into [twenty-six languages](https://github.com/nunocoracao/blowfish/tree/main/i18n) with more to be added over time. By the way, [pull requests](https://github.com/nunocoracao/blowfish/pulls) for new languages are always welcome!
Thanks to submissions from the community, Blowfish has already been translated into [twenty-nine languages](https://github.com/nunocoracao/blowfish/tree/main/i18n) with more to be added over time. By the way, [pull requests](https://github.com/nunocoracao/blowfish/pulls) for new languages are always welcome!
## RTL language support
@@ -76,4 +76,4 @@ The new image resizing features also provide full control over `alt` and `title`
## A whole lot more
There's countless other features to explore. From being able to display taxonomies on articles and list pages, to using the new `headline` author parameter to customise your homepage. There's also improved JSON-LD structured data which further optimises SEO performance.
There's countless other features to explore. From being able to display taxonomies on articles and list pages, to using the new `headline` author parameter to customise your homepage. There's also improved JSON-LD structured data which further optimises SEO performance.
@@ -1,6 +1,6 @@
---
title: "欢迎来到 Blowfish"
date: 2022-01-19
weight: 1
draft: false
description: "探索 Blowfish 2.0版本的新功能。"
tags: ["新手", "文档"]
@@ -1,9 +1,9 @@
---
title: "Build your homepage using Blowfish and Hugo"
summary: "Just one year ago, I created Blowfish, a Hugo theme crafted to build my unique vision for my personal homepage. I also decided to make it an open-source project. Fast-forward to today, and Blowfish has transformed into a thriving open-source project with over 600 stars on GitHub and a user base of hundreds. In this tutorial, Ill show you how to get started and have your website running in a couple of minutes."
description: "Just one year ago, I created Blowfish, a Hugo theme crafted to build my unique vision for my personal homepage. I also decided to make it an open-source project. Fast-forward to today, and Blowfish has transformed into a thriving open-source project with over 600 stars on GitHub and a user base of hundreds. In this tutorial, Ill show you how to get started and have your website running in a couple of minutes."
categories: ["Open-Source", "Blowfish"]
tags: ["tutorial", "blowfish", "hugo"]
title: "使用 Blowfish Hugo 构建你的主页"
summary: "一年前我创建了 Blowfish,这是一个为了打造我的个人主页而精心设计的 Hugo 主题。我决定将其作为一个开源项目。直到今天,Blowfish 已经变成了一个蓬勃发展的开源项目,在 GitHub 上拥有超过900个 star 和数百名用户。在本教程中,我将向你展示如何搭建并在几分钟内让你的网站运行起来。"
description: "一年前我创建了 Blowfish,这是一个为了打造我的个人主页而精心设计的 Hugo 主题。我决定将其作为一个开源项目。直到今天,Blowfish 已经变成了一个蓬勃发展的开源项目,在 GitHub 上拥有超过900个 star 和数百名用户。在本教程中,我向像你展示如何搭建并在几分钟内让你的网站运行起来。"
categories: ["开源", "Blowfish"]
tags: ["指南", "blowfish", "hugo"]
externalUrl: "https://nunocoracao.com/posts/202310-blowfish-tutorial/"
date: 2023-10-04
draft: false
@@ -12,59 +12,58 @@ authors:
- nunocoracao
---
Just one year ago, I created[Blowfish](https://blowfish.page/), a [Hugo](https://gohugo.io/) theme crafted to build my unique vision for my personal homepage. I also decided to make it an open-source project. Fast-forward to today, and Blowfish has transformed into a thriving open-source project with over 600 stars on GitHub and a user base of hundreds. In this tutorial, Ill show you how to get started and have your website running in a couple of minutes.
一年前我创建了 [Blowfish](https://blowfish.page/),这是一个为了打造我的个人主页而精心设计的 [Hugo](https://gohugo.io/) 主题。我决定将其作为一个开源项目。直到今天,Blowfish 已经变成了一个蓬勃发展的开源项目,在 GitHub 上拥有超过900个 star 和数百名用户。在本教程中,我将向你展示如何搭建并在几分钟内让你的网站运行起来。
{{< github repo="nunocoracao/blowfish" >}}
## TL;DR
The goal of this guide is to walk a newcomer to Hugo on how to install, manage, and publish your own website. The final version of the code is available in this [repo](https://github.com/nunocoracao/blowfish-tutorial/tree/main) - for those that would like to jump to the end.
本指南的目标是指导新用户如何使用 Hugo 快速安装、管理和发布自己的网站。最终的版本可以看这个[代码库](https://github.com/nunocoracao/blowfish-tutorial/tree/main)——如果你想直接跳到结尾的话可以直接看这里。
![Tutorial example](img/01.png)
![指南示例](img/01.png)
The visual style is just one of the many possibilities available in Blowfish. Users are encouraged to check the [documentation page](https://blowfish.page/) and learn how to customize the theme to their needs. Additionally, there are already [great examples](https://blowfish.page/users/) of the theme from other users available for inspiration. Blowfish also offers several extra features in the form of `shortcodes` available out of the box in the theme - check them out [here](https://blowfish.page/docs/shortcodes/) and get inspired.
视觉风格只是 Blowfish 提供的众多特性之一。想要了解更多,我们鼓励你浏览[文档](https://blowfish.page/),学习如何根据自己的需求自定义主题。另外,已经有许多其他用户使用该主题并提供了十分优秀的[示例](https://blowfish.page/users/),来为你提供灵感。Blowfish 还提供了一些额外的基于 `短代码` 的功能——你可以在[这里](https://blowfish.page/docs/shortcodes/)查看它们以获取更多灵感。
## Setup your environment
## 设置你的环境
Lets begin by installing all the tools you need. This guide will cover the steps for Mac so these instructions might not apply to your hardware and OS. If you are on Windows or Linux, please consult the guides on how to [install Hugo](https://gohugo.io/installation/), and [GitHubs CLI](https://cli.github.com/) for your OS.
让我们从安装工具开始。本指南涵盖了在 Mac 操作系统下的步骤,这些命令可能不适用于你的硬件和操作系统。如果你使用的是 Windows Linux,请参考文档:[安装 Hugo](https://gohugo.io/installation/) [GitHub CLI](https://cli.github.com/)
Anyway, if you are using MacOS lets install `brew` - a package manager for mac - as that will help installing and managing the other tools.
无论如何,如果你使用的是 MacOS,那么首先需要安装 `brew` ——一个专为 MacOS 的包管理器,这将有助于安装和管理其他工具。
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
Once `brew` is installed lets install Git, Hugo and GitHubs CLI.
安装完成 `brew` 后,让我们安装 Git, Hugo GitHub CLI
```bash
brew install git
brew install hugo
brew install gh
```
Create a folder for your code and open a terminal session into it (I chose _blowfish-tutorial_ in the commands below, feel free to call the folder whatever you want).
为你的网站代码创建一个文件夹,并在终端中打开(我在下面创建了 _blowfish-tutorial_ 文件夹,当然你可以将其重命名为任何名称)。
```bash
mkdir blowfish-tutorial
cd blowfish-tutorial
```
Once inside the folder, the next step is to initialize your local `git` repo.
进入文件夹后的下一步,就是初始化你本地的 `git` 仓库。
```bash
git init -b main
```
Now, lets create and sync the local repo to a GitHub repo so that your code is stored remotely.
现在,让我们创建并同步本地仓库到 GitHub 仓库,这样你的代码就可以在远程存储。
```bash
gh auth login
gh repo create
git push --set-upstream origin main
```
Check the image below for the options I selected for this guide, again feel free to change names and description to your use-case.
查看下面的图片,这是我的远程仓库的地址。同样地,你也可以随意更改以适应你自己的 GitHub 仓库。
![gh repo create example](img/ghcreate.png)
![gh repo 创建示例](img/ghcreate.png)
Finally, create a **.gitignore** file which allows you to exclude certain files from your repo automatically. I would start with something like the example below.
最后,创建一个 **.gitignore** 文件,它会自动排除某些文件,以防止这些文件传到远程仓库。下面的例子是我在 **.gitignore** 文件中添加的文件和文件夹。
```bash
#others
@@ -82,6 +81,7 @@ node_modules
public
```
最后一步是保存所有更改,并推送到你的远程仓库中。
The last step is to save all the changes to the repo.
```bash
git add .
@@ -90,30 +90,30 @@ git push
```
## Create site and configure it
## 创建并配置站点
With all the tools ready, creating and configuring your site will be easy. Still within the folder you created in the last section, lets create an empty Hugo website (_with no theme_).
所有的准备工作就绪后,创建和配置你的站点将会很容易。继续在上一部分你创建的文件夹内,让我们首先创建一个空的 Hugo 网站(_不关联任何主题_)。
```bash
hugo new site --force .
```
Once the scaffolding finishes, try the command below to run your page. Open a browser on _[https://localhost:1313](https://localhost:1313)_ to see your site…
执行完成后,尝试用下面的命令来运行你的网站。打开浏览器并访问 _[https://localhost:1313](https://localhost:1313)_ 即可查看你的网站。
```bash
hugo server
```
Ups… Page not found right?
This was expected, even though you created a website, Hugo doesnt give any default experience aka your site doesnt have any page to show.
emmmm… 页面未找到404了,是吧?
这是预期内的,你创建了一个空白网站,Hugo 不会添加任何默认的页面——换句话说,你的网站还没有任何页面可以显示。
Next step, let's install Blowfish using `git submodules` which will make it easier to manage and upgrade to new versions in the future.
下一步,让我门使用 `git submodules` 来安装 Blowfish。通过 `git submodules` 安装可以让以后管理和升级 Blowfish 主题更加方便。
```bash
git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish
```
Next, create the following folder structure at the root of your code directory - `config/_default/`. Now you will need to download [these files](https://minhaskamal.github.io/DownGit/#/home?url=https:%2F%2Fgithub.com%2Fnunocoracao%2Fblowfish%2Ftree%2Fmain%2Fconfig%2F%5C_default) and place them in _\_default_ folder you just created. The final structure should look something like this.
接下来,在你的代码根目录下创建 `config/_default/` 文件夹。现在你需要下载[这些文件](https://minhaskamal.github.io/DownGit/#/home?url=https:%2F%2Fgithub.com%2Fnunocoracao%2Fblowfish%2Ftree%2Fmain%2Fconfig%2F%5C_default),并把它们放在刚刚创建的 _\_default_ 文件夹内。最终的文件结构看起来应该是这样的。
```md
config/_default/
@@ -125,29 +125,28 @@ config/_default/
`
```
Open the **config.toml** and uncomment the line **theme = "blowfish”** and you are ready to go. Try the running the site again and check the result at _[https://localhost:1313](https://localhost:1313)_
打开 **config.toml** 并把 **theme = "blowfish”** 这一样的注释取消掉,目前为止你已经准备好了。再次尝试运行网站,并打开浏览器在_[https://localhost:1313](https://localhost:1313)_查看效果。
```bash
hugo server
```
You should see something like the image below. Not much yet as we didnt add any content, but the main skeleton for Blowfish is already in place - just requires configuration.
你应该能看到下面这样。目前我们还没有添加任何内容,所以还没有页面,但是 Blowfish 主题已经准备就绪,下面只需要配置。
![blowfish empty site](img/blowfishempty.png)
![blowfish 空站点](img/blowfishempty.png)
Now lets configure the theme.
现在我们来配置主题。
{{< alert d>}}
**FYI** This guide will not cover in detail what each parameter available in Blowfish does for everything available and how to use it, check [Blowfish documentation](https://blowfish.page/docs/configuration/#theme-parameters) for every option in every file.
**仅供参考** 本指南不会详细介绍 Blowfish 中的所有特性和参数——如果想要了解所有的功能特性和参数,以及如何使用它们,请参考[Blowfish 文档](https://blowfish.page/docs/configuration/#theme-parameters)
{{< /alert >}}
### menus.en.toml
This file defines your menu structure, for the top banner and the footer. For this guide, lets create two menu sections: one for _Posts_ and one for _Tags_.
- **Posts** - will display the full list of entries
- **Tags** - automatically generated based on tags placed on each article
这个文件定义了你的顶部(banner)和底部(footer)的菜单结构。对于本指南,我们只使用菜单的这两部分:_Posts_ 和 _Tags_
- **Posts** - 用于展示网站中的所有内容条目的完整列表
- **Tags** - 自动生成每篇文章的标签
To achieve this, make sure the following entries exist in the **menus.en.toml** file. Once the changes are done, you should see the menus appearing by re-running **hugo server**.
为了实现这一点,请确保 **menus.en.toml** 文件中设置了以下参数。完成修改后,重新运行**hugo server**,你将会看到顶部菜单。
```toml
[[main]]
@@ -164,33 +163,35 @@ To achieve this, make sure the following entries exist in the **menus.en.toml**
### languages.en.toml
This file will configure your main details as the author of the website. Change the section below to reflect your details.
这个文件配置了网站作者的详细信息。修改下面的内容来定义你自己的信息。
```bash
[author]
name = "Your name here"
name = "名字在这"
image = "profile.jpg"
headline = "I'm only human"
bio = "A little bit about you" # appears in author card for each article
headline = "我是个好人"
bio = "关于我的二三事" # 出现在每篇文章的作者卡片中
```
The images for the website should be placed in the _assets_ folder. For this step, please add a profile picture to that folder named _profile.jpg_ or change the configuration above to the filename you chose. If you dont have a profile image available, you can use the one below for the tutorial.
网站的图片需要防止在 _assets_ 文件夹内。针对这一步,请将一张你的个人图片添加到这个文件夹,并命名为 _profile.jpg_
你可以修改这个文件名,确保文件名和上面个人信息中 `image` 的参数值对应就行。如果你没有个人图片可用,你可以使用下面的图片继续教程。
![profile](img/profile.jpg "assets/profile.jpg")
The last step is configuring your links social media, GitHub, etc. The file includes all the supported options, but they are commented. You are welcome to uncomment everything and delete the ones you would rather not use. Replace the right links on the ones you decided to keep. You can also change the order.
最后一步是配置你的链接——社交媒体、GitHub 等等。该文件包含了所有支持的链接选项,不过他们被注释掉了。你可以将你希望展示的个人链接的配置项接触注释,也可以替换他们的展示顺序。
### params.toml
This is the main configuration file for Blowfish. Most of the visual options or customization available can be configured using it, and it covers several areas of the theme. For this tutorial, I decided to use a **background** layout - [check other layouts for Blowfishs landing page](https://blowfish.page/) - with the **Neon** color scheme - you can pick a different color scheme if you want to - check [this list](https://blowfish.page/docs/getting-started/#colour-schemes) or [create your own](https://blowfish.page/docs/advanced-customisation/#colour-schemes).
这个文件是 Blowfish 的配置文件。大部分的视觉选项或自定义的选项可以通过它进行配置,它涵盖了 Blowfish 主题的多个功能特性。
对于本指南,我决定使用 **background** 布局,你也可以[查看Blowfish主题其他的主页布局](https://blowfish.page/);同时使用了 **Neon** 颜色方案,你可以查看[完整的颜色方案列表](https://blowfish.page/docs/getting-started/#colour-schemes)或者[创建自己的颜色方案](https://blowfish.page/docs/advanced-customisation/#colour-schemes)。
Add an **image.jpg** to the assets folder which will be the background for the site. You can also download the examples I am using in this tutorial.
**image.jpg** 文件添加到 assets 文件夹,它将会作为网站的背景。你可以挑选自己喜欢的,当然也可以用本指南中使用的这张图。
![background](img/background.jpg "assets/image.jpg")
Now lets jump into the _params.toml_ and start configuring the file. I will focus only on the values that need to be changed, dont delete the rest of the file without reading the docs. Lets begin by making sure that we have the right color scheme, that image optimization is on, and configure the default background image.
现在让我们打开 _params.toml_ 并开始配置。在这里我只会关注需要修改的值,不要再没看文档的情况下,删除此文件的其余部分。
首先让我们确保上面提到的正确的颜色方案,开启图片优化,并设置默认背景图片。
```bash
colorScheme = "neon"
@@ -198,7 +199,7 @@ disableImageOptimization = false
defaultBackgroundImage = "image.jpg" # used as default for background images
```
Next, let's configure our homepage. Were going with the _background_ layout, configuring the homepage image and recent items. Furthermore, we are using the **card view** for items in the recent category. Finally, lets configure the header to be fixed.
接下来,让我们配置首页。我们选择了 _background_ 布局,配置首页图片和最近文章。此外,可以使用 **card view** 卡片展示的方式来展现最新文章。最后让我们配置头部固定。
```bash
[homepage]
@@ -216,7 +217,7 @@ Next, let's configure our homepage. Were going with the _background_ layout,
layout = "fixed"
```
Now configure how the article and list pages will look. Here are the configurations for those.
现在配置文章和列表页面的展示。下面是他们的配置。
```bash
[article]
@@ -233,33 +234,35 @@ Now configure how the article and list pages will look. Here are the configurati
cardView = true
```
如果你再次运行**hugo server**,你会看到类似下面这张图的效果。
If you run **hugo server** again, you should see something like the image below.
![blowfish no articles](img/blowfishnoarticles.png)
![blowfish 没有文章](img/blowfishnoarticles.png)
## Adding content to your site
## 在你的网站中添加内容
Create a folder to place your posts in `/content/posts`. This was also the directory configured in your menu to list all the articles. Within that folder, lets create a new directory and give it the name **myfirstpost**. Within it create an **index.md** file your article and place a featured.jpg or .png for in the same directory as the thumbnail for the article. Use the example below to get started. The first lines in the file are the Front Matter, which tell Hugo what the look and experience of the article will be different themes support different params for this. Check the [docs](https://blowfish.page/docs/front-matter/) for more info.
创建一个文件夹`/content/posts`,在这个文件夹下添加你的帖子或文章。这也是你在菜单所配置的所有文章的根目录。在这个文件夹内,让我们创建一个新目录并命名为 **myfirstpost**。在这个目录中创建一个**index.md**文件作为你的文章,同样也在这个目录中添加**featured.jpg**或**featured.png**作为文章的缩略图。
参考下面这个示例。文件中的前几行是扉页参数(Front Matter),它定义了 Hugo 如何展示文章,更多的参数可以参考[这里](https://blowfish.page/docs/front-matter/)。
```md
---
title: "My first post"
title: "我的第一篇帖子"
date: 2023-08-14
draft: false
summary: "This is my first post on my site"
summary: "这是网站的第一篇你帖子"
tags: ["space"]
---
## A sub-title
## 一个副标题
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi nibh nisl, vulputate eu lacus vitae, maximus molestie libero. Vestibulum laoreet, odio et sollicitudin sollicitudin, quam ligula tempus urna, sed sagittis eros eros ac felis. In tristique tortor vitae lacinia commodo. Mauris venenatis ultrices purus nec fermentum. Nunc sit amet aliquet metus. Morbi nisl felis, gravida ac consequat vitae, blandit eu libero. Curabitur porta est in dui elementum porttitor. Maecenas fermentum, tortor ac feugiat fringilla, orci sem sagittis massa, a congue risus ipsum vel massa. Aliquam sit amet nunc vulputate, facilisis neque in, faucibus nisl.
```
You can create additional articles to see what your site will look like once there is content in it. Your site should look like the images below. The main page shows the recent articles, each article is connected through others automatically via related section, you have tag aggregation, and full-text search.
你可以创建其他文章,来查看和验证站点的效果。你的网站应该像下面的图片一样。
主页显示最近的文章,每篇文章通过相关部分自动关联其他文章,有标签聚合和全文搜索。
{{< gallery >}}
<img src="img/blowfishrecent.png" class="grid-w50" />
@@ -269,31 +272,31 @@ You can create additional articles to see what your site will look like once the
{{< /gallery >}}
## Ship it
## 发布它
The only thing missing is to ship your site. I will be using [Firebase](https://firebase.google.com/) for hosting - its a free alternative and provides more advanced features if you are creating something more complex. Go to firebase and create a new project. Once that is done, lets switch to the CLI as it will make it easier to configure everything.
现在只剩下发布你的网站了。我将会使用 [Firebase](https://firebase.google.com/) 作为托管服务——这是一个免费的替代方案,如果你创建了更复杂的东西,它提供了高级功能。前往 [Firebase](https://firebase.google.com/) 创建一个新项目,然后我们切换到 CLI 终端,这将是配置 [Firebase](https://firebase.google.com/) 更加简单。
Lets install firebases CLI - if not on Mac check [install instructions on Firebase](https://firebase.google.com/docs/cli).
让我们安装 [Firebase](https://firebase.google.com/) CLI 工具 —— 如果你不是 MacOS,请查看 [Firebase安装指南](https://firebase.google.com/docs/cli)
```bash
brew install firebase
```
Now log in and init firebase hosting for the project.
现在登录并为你的项目初始化firebase托管服务。
```bash
firebase login
firebase init
```
Select hosting and proceed.
选择托管并继续。
![firebase init](img/firebasecli.png)
![firebase 初始化](img/firebasecli.png)
Follow the image below for the options I recommend. Make sure to set up the workflow files for GitHub actions. These will guarantee that your code will be deployed once there is a change to the repo.
按照下面的图片进行,这是我推荐的方式。确保设置了 GitHub actions 工作流文件。这将保证你的 GitHub 仓库一旦有变化,就会立刻同步部署。
![firebase options](img/firebaseoptions.png)
![firebase 选项](img/firebaseoptions.png)
However, those files will not work out-of-box, as Hugo requires extra steps for the build to work. Please copy and paste the code blocks below to the respective files within the **.github** folder, but keep the original **projectId** in the files generated by firebase.
然而,这些文件不会立刻开始运行,因为 Hugo 需要额外的步骤来提前构建。将下面的代码复制并粘贴到 **.github** 文件夹,同时保留文件中 firebase 生成的**projectId**。
### firebase-hosting-merge.yml
```yaml
@@ -378,8 +381,7 @@ jobs:
projectId: blowfish-tutorial
```
The last step is committing your code to GitHub and let the workflows you created take care of deploying your site. Since we configured GitHub actions, this will trigger a job that will configure and deploy your site automatically.
最后一步是将你的代码提交到 GitHub,提交成功后 GitHub actions 工作流将会自动触发,并构建和部署你的网站。
```bash
git add .
@@ -387,17 +389,20 @@ git commit -m "add github actions workflows"
git push
```
If the actions tab for your repo, you should see something like this.
你的 GitHub 仓库中的 actions 模块,将会显示类似下图的内容。
![gh actions](img/githubactions.png)
当所有步骤完成之后,你的 Firebase 控制台将会显示类似下图的内容,包括一个可以查看网站的链接。我在[https://blowfish-tutorial.web.app/](https://blowfish-tutorial.web.app/)中运行了这个教程。
Once all the steps finish, your Firebase console should show something like the image below - including the links to see your app I got a version of this tutorial running on [https://blowfish-tutorial.web.app/](https://blowfish-tutorial.web.app/).
![firebase console](img/firebaseconsole.png)
## Conclusion and Next Steps
## 结论和下一步
现在你有了主页的第一个版本。你可以在本地进行更改,只要你提交代码,将会自动展示在你的网站中。
那么接下来要做什么呢?我给你留了一下链接,相信会对你有所帮你,其它这些链接会让你获得灵感并了解更多 Blowfish 和 Hugo 的内容。
Now you have your first version of your homepage. You can make changes locally and once you commit your code they will automatically be reflected online. What shall you do next? Ill leave you with some useful links to get you inspired and learn more about Blowfish and Hugo.
- https://blowfish.page/docs/
+5 -5
View File
@@ -1,6 +1,6 @@
---
title: "Recipes"
description: "Recipes, guides, and tutorials for Blowfish"
title: "使用指南"
description: "Blowfish 的使用指南和教程"
cascade:
showDate: false
@@ -9,11 +9,11 @@ cascade:
---
{{< lead >}}
Recipes, guides, and tutorials for Blowfish
Blowfish 的使用指南和教程
{{< /lead >}}
**Blowfish user?** To add your guide to this list, [check the template](/guides/template/).
**您是 Blowfish 的用户吗?** 要将您自己编写的指南添加到此列表,请查看[参考模板](/guides/template/)
This section contains guides for a variety of scenarios on how to configure your theme. If you're new, check out the [Installation]({{< ref "docs/installation" >}}) guide to begin or visit the [Samples]({{< ref "samples" >}}) section to see what Blowfish can do.
本部分包含有关如何配置主题的各种指南。如果您是新用户,请查看 [安装]({{< ref "docs/installation" >}}) 指南或查看 [示例]({{< ref "samples" >}}) 部分来了解 Blowfish 能做出什么效果的网页。
---
@@ -1,36 +1,37 @@
---
title: "Recipe Template"
title: "使用指南模板"
date: 1987-12-22
draft: false
description: "Template for creating a recipe for Blowfish theme"
tags: ["template"]
description: "用于创建 Blowfish 主题使用指南的模板"
tags: ["模板"]
---
Thank you for wanting to contribute to Blowfish's community.
感谢您愿意为 Blowfish 社区做出贡献。
## How to start?
This is a template article that will explain how to create a new article for Blowfish's guide section.
## 如何开始?
这是一篇模板文章,将解释如何为 Blowfish 的指南部分创建新文章。
## Clone Blowfish
Clone this repo with the following command:
## Clone Blowfish 仓库
使用以下命令 clone 此仓库:
```bash
git clone https://github.com/nunocoracao/blowfish.git
```
## Setup your files
Copy and paste the entire folder where this `.md` file is.
## 配置您的文档
复制并粘贴您要创建的 `.md` 文档所在的整个文件夹。
使用 `YYYYMM-<英文标题>` 的格式(例如:`200601-tutorial`)命名文档,不允许有空格。
Name it using the following convention `YYYYMM-title`, no white spaces are allowed.
## 编写您的指南
编写您的指南 :)
## Write your guide
Write your guide :)
Use the `img` folder to place your images and use them:
`img` 文件夹中储存图像并按下述格式引用它们:
``` md
![]()
```
![Example](img/example.jpg "Image caption")
## Open a PR
Open a PR and thanks in advance for your contribution.
## 提交 PR
提交您的 PR ,Blowfish 团队在这里提前感谢您对我们这个项目的贡献。
-18
View File
@@ -1,18 +0,0 @@
---
title: "Posts"
date: 2022-06-13T20:55:37+01:00
draft: false
showDate : false
showDateUpdated : false
showHeadingAnchors : false
showPagination : false
showReadingTime : false
showTableOfContents : true
showTaxonomies : false
showWordCount : false
showSummary : false
sharingLinks : false
---
-18
View File
@@ -1,18 +0,0 @@
---
title: "投稿"
date: 2022-06-13T20:55:37+01:00
draft: false
showDate : false
showDateUpdated : false
showHeadingAnchors : false
showPagination : false
showReadingTime : false
showTableOfContents : true
showTaxonomies : false
showWordCount : false
showSummary : false
sharingLinks : false
---
-18
View File
@@ -1,18 +0,0 @@
---
title: "Posts"
date: 2022-06-13T20:55:37+01:00
draft: false
showDate : false
showDateUpdated : false
showHeadingAnchors : false
showPagination : false
showReadingTime : false
showTableOfContents : true
showTaxonomies : false
showWordCount : false
showSummary : false
sharingLinks : false
---
-18
View File
@@ -1,18 +0,0 @@
---
title: "文章"
date: 2022-06-13T20:55:37+01:00
draft: false
showDate : false
showDateUpdated : false
showHeadingAnchors : false
showPagination : false
showReadingTime : false
showTableOfContents : true
showTaxonomies : false
showWordCount : false
showSummary : false
sharingLinks : false
---
+6 -8
View File
@@ -1,19 +1,17 @@
---
title: "Samples"
description: "See what's possible with Blowfish."
title: "Campioni"
description: "Guarda cosa è possibile fare con Blowfish."
cascade:
showEdit: false
showSummary: false
hideFeatureImage: true
---
---
{{< lead >}}
Blowfish brings your content to life. :heart_eyes:
Blowfish dà vita ai tuoi contenuti. :heart_eyes:
{{< /lead >}}
This section contains some demo pages that show how Blowfish renders different types of content. You can also see an example [taxonomy listing]({{< ref "tags" >}}) page.
Questa sezione contiene alcune pagine demo che mostrano come Blowfish esegue il rendering di diversi tipi di contenuto. Puoi anche vedere una pagina di esempio [elenco tassonomia]({{< ref "tags" >}}).
_**Sidenote:** This page is just a standard Blowfish article listing and Hugo has been configured to generate a `samples` content type and display article summaries._
---
_**Nota a margine:** Questa pagina è solo un elenco standard di articoli Blowfish e Hugo è stato configurato per generare un tipo di contenuto "campioni" e visualizzare riepiloghi degli articoli._
+5 -5
View File
@@ -1,6 +1,6 @@
---
title: "Samples"
description: "See what's possible with Blowfish."
title: "サンプル"
description: "Blowfish で何ができるのか閲覧する。"
cascade:
showEdit: false
@@ -9,11 +9,11 @@ cascade:
---
{{< lead >}}
Blowfish brings your content to life. :heart_eyes:
Blowfish はあなたのコンテンツに命を宿します。:heart_eyes:
{{< /lead >}}
This section contains some demo pages that show how Blowfish renders different types of content. You can also see an example [taxonomy listing]({{< ref "tags" >}}) page.
このセクションは、 Blowfish で様々な種類のコンテンツをどのように表示するのかを紹介するデモページを含みます。例としては[分類一覧]({{< ref "tags" >}})ページも参考になります。
_**Sidenote:** This page is just a standard Blowfish article listing and Hugo has been configured to generate a `samples` content type and display article summaries._
_**サイドノート:** このページは一般的な Blowfish のリストで、 Hugo が生成した `samples` コンテンツタイプと記事の要約を表示する様に設定しています。_
---
+1 -1
View File
@@ -12,7 +12,7 @@ cascade:
Blowfish 让你的内容栩栩如生。 :heart_eyes:
{{< /lead >}}
本节包含一些示页面,展示了Blowfish如何呈现不同类型的内容。你还可以看到一个[分类列表]({{< ref "tags" >}})页面的示例。
本节包含一些示页面,展示了Blowfish如何呈现不同类型的内容。你还可以参考[标签]({{< ref "tags" >}})页面的示例。
_**旁注:** 这个页面只是一个标准的Blowfish文章列表,并且已经配置了Hugo来生成一个 `samples` 内容类型并显示文章摘要。_
+15 -15
View File
@@ -1,28 +1,28 @@
---
title: "Charts"
title: "図表"
date: 2019-03-06
description: "Guide to Chart.js usage in Blowfish"
summary: "Blowfish includes Chart.js for powerful charts and data visualisations."
description: "Blowfish での Chart.js の利用方法のガイド"
summary: "Blowfish は強力な図表とデータの視覚化のために Chart.js を内蔵しています。"
tags: ["chart", "sample", "graph", "shortcodes"]
showDate: false
type: 'sample'
---
Blowfish includes support for Chart.js using the `chart` shortcode. Simply wrap the chart markup within the shortcode. Blowfish automatically themes charts to match the configured `colorScheme` parameter, however the colours can be customised using normal Chart.js syntax.
Blowfish Chart.js `chart` ショートコードを内蔵し、利用をサポートしています。ショートコードでグラフのマークアップを囲むだけです。 Blowfish は `colorScheme` パラメータで自動的にグラフのテーマが適応されますが、通常の Chart.js 構文を利用して色をカスタマイズすることも可能です。
Refer to the [chart shortcode]({{< ref "docs/shortcodes#chart" >}}) docs for more details.
[グラフのショートコード]({{< ref "docs/shortcodes#chart" >}})資料で更に詳細を参照出来ます。
The examples below are a small selection taken from the [official Chart.js docs](https://www.chartjs.org/docs/latest/samples). You can also [view the page source](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/charts/index.md) on GitHub to see the markup.
以下は [Chart.js 公式資料](https://www.chartjs.org/docs/latest/samples)から抜粋した例です。 GitHub でマークアップを[ページソースで見る](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/charts/index.md)ことができます。
## Bar chart
## 棒グラフ
<!-- prettier-ignore-start -->
{{< chart >}}
type: 'bar',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月'],
datasets: [{
label: 'My First Dataset',
label: '初めてのデータセット',
data: [65, 59, 80, 81, 56, 55, 40],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
@@ -48,15 +48,15 @@ data: {
{{< /chart >}}
<!-- prettier-ignore-end -->
## Line chart
## 折れ線グラフ
<!-- prettier-ignore-start -->
{{< chart >}}
type: 'line',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
labels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月'],
datasets: [{
label: 'My First Dataset',
label: '初めてのデータセット',
data: [65, 59, 80, 81, 56, 55, 40],
tension: 0.2
}]
@@ -64,15 +64,15 @@ data: {
{{< /chart >}}
<!-- prettier-ignore-end -->
## Doughnut chart
## 円グラフ
<!-- prettier-ignore-start -->
{{< chart >}}
type: 'doughnut',
data: {
labels: ['Red', 'Blue', 'Yellow'],
labels: ['赤色', '青色', '黄色'],
datasets: [{
label: 'My First Dataset',
label: '初めてのデータセット',
data: [300, 50, 100],
backgroundColor: [
'rgba(255, 99, 132, 0.7)',
@@ -1,28 +1,28 @@
---
title: "Charts"
title: "图表"
date: 2019-03-06
description: "Guide to Chart.js usage in Blowfish"
summary: "Blowfish includes Chart.js for powerful charts and data visualisations."
tags: ["chart", "sample", "graph", "shortcodes"]
description: "在Blowfish 中使用 Chart.js 指南"
summary: "Blowfish 包含 Chart.js,可实现强大的图表和数据可视化。"
tags: ["表格", "示例", "图片", "简码"]
showDate: false
type: 'sample'
---
Blowfish includes support for Chart.js using the `chart` shortcode. Simply wrap the chart markup within the shortcode. Blowfish automatically themes charts to match the configured `colorScheme` parameter, however the colours can be customised using normal Chart.js syntax.
Blowfish 使用 `chart` 简码来调用 Chart.js。Blowfish 会自动为图表设置主题以匹配配置的 `colorScheme` 参数,但是可以使用 Chart.js 语法来自定义图表颜色。
Refer to the [chart shortcode]({{< ref "docs/shortcodes#chart" >}}) docs for more details.
有关更多详细信息,请参阅 [图表简码]({{< ref "docs/shortcodes#chart" >}}) 文档。
The examples below are a small selection taken from the [official Chart.js docs](https://www.chartjs.org/docs/latest/samples). You can also [view the page source](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/charts/index.md) on GitHub to see the markup.
下面的示例是从 [Chart.js 官方文档](https://www.chartjs.org/docs/latest/samples) 中选取的一小部分。您还可以在 GitHub 上[查看页面源代码](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/charts/index.md) 查看书写方式。
## Bar chart
## 柱形图
<!-- prettier-ignore-start -->
{{< chart >}}
type: 'bar',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
labels: ['一月', '二月', '三月', '四月', '五月', '六月', '七月'],
datasets: [{
label: 'My First Dataset',
label: '我的第一组数据',
data: [65, 59, 80, 81, 56, 55, 40],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
@@ -48,15 +48,15 @@ data: {
{{< /chart >}}
<!-- prettier-ignore-end -->
## Line chart
## 折线图
<!-- prettier-ignore-start -->
{{< chart >}}
type: 'line',
data: {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
labels: ['一月', '二月', '三月', '四月', '五月', '六月', '七月'],
datasets: [{
label: 'My First Dataset',
label: '我的第一组数据',
data: [65, 59, 80, 81, 56, 55, 40],
tension: 0.2
}]
@@ -64,15 +64,15 @@ data: {
{{< /chart >}}
<!-- prettier-ignore-end -->
## Doughnut chart
## 扇形图
<!-- prettier-ignore-start -->
{{< chart >}}
type: 'doughnut',
data: {
labels: ['Red', 'Blue', 'Yellow'],
labels: ['', '蓝', '黄'],
datasets: [{
label: 'My First Dataset',
label: '我的第一组数据',
data: [300, 50, 100],
backgroundColor: [
'rgba(255, 99, 132, 0.7)',
@@ -1,30 +1,30 @@
---
title: "Diagrams and Flowcharts"
title: "ダイアグラムとフローチャート"
date: 2019-03-06
description: "Guide to Mermaid usage in Blowfish"
summary: "It's easy to add diagrams and flowcharts to articles using Mermaid."
description: "Blowfish での Mermaid の利用方法についてのガイド"
summary: "Mermaid を利用して簡単に図やフローチャートを記事に追加する方法。"
tags: ["mermaid", "sample", "diagram", "shortcodes"]
type: 'sample'
---
Mermaid diagrams are supported in Blowfish using the `mermaid` shortcode. Simply wrap the diagram markup within the shortcode. Blowfish automatically themes Mermaid diagrams to match the configured `colorScheme` parameter.
Mermaid 図は `mermaid` ショートコードを使うことで Blowfish でサポートされています。ダイヤグラムのマークアップをショートコードを囲むだけです。 Blowfish は設定された `colorScheme` パラメータに合うように自動T系に Mermaid ダイヤグラムをテーマ化します。
Refer to the [mermaid shortcode]({{< ref "docs/shortcodes#mermaid" >}}) docs for more details.
[mermaid ショートコード]({{< ref "docs/shortcodes#mermaid" >}})資料にてより詳細を参照できます。
The examples below are a small selection taken from the [official Mermaid docs](https://mermaid-js.github.io/mermaid/). You can also [view the page source](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/diagrams-flowcharts/index.md) on GitHub to see the markup.
以下の例は [Mermaid 公式資料](https://mermaid-js.github.io/mermaid/)から抜粋した一分です。GitHub の[ページソース](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/diagrams-flowcharts/index.md)でマークアップを確認することができます。
## Flowchart
## フローチャート
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
B --> G[/Another/]
C ==>|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[Car]
subgraph Section
A[クリスマス] -->|収入| B(買い物にいく)
B --> C{考える}
B --> G[//]
C ==>|1| D[ノートパソコン]
C -->|2| E[iPhone]
C -->|3| F[]
subgraph セクション
C
D
E
@@ -34,29 +34,29 @@ end
{{< /mermaid >}}
</div>
## Sequence diagram
## 順序図
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
sequenceDiagram
autonumber
par Action 1
Alice->>John: Hello John, how are you?
and Action 2
Alice->>Bob: Hello Bob, how are you?
par 行動 1
アリス->>ジョン: こんにちはジョン、お元気ですか?
and 行動 2
アリス->>ボブ: こんにちはボブ、お元気ですか?
end
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
Note right of John: John is perceptive
John-->>-Alice: I feel great!
loop Every minute
John-->Alice: Great!
アリス->>+ジョン: こんにちはジョン、お元気ですか?
アリス->>+ジョン: ジョン、聞こえていますか?
ジョン-->>-アリス: こんにちはアリス、聞こえています!
Note right of ジョン: ジョンは察しがよい
ジョン-->>-アリス: とても気分がいいです!
loop 毎分
ジョン-->アリス: すばらしい!
end
{{< /mermaid >}}
</div>
## Class diagram
## クラス図
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
@@ -84,7 +84,7 @@ class Zebra{
{{< /mermaid >}}
</div>
## Entity relationship diagram
## 主従関係図
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
@@ -1,19 +1,19 @@
---
title: "Diagrams and Flowcharts"
title: "流程图和思维导图"
date: 2019-03-06
description: "Guide to Mermaid usage in Blowfish"
summary: "It's easy to add diagrams and flowcharts to articles using Mermaid."
tags: ["mermaid", "sample", "diagram", "shortcodes"]
description: "Blowfish 中 Mermaid 的使用指南"
summary: "使用 Mermaid 可以轻松地将图表和流程图添加到文章中。"
tags: ["mermaid", "示例", "流程图", "简码"]
type: 'sample'
---
Mermaid diagrams are supported in Blowfish using the `mermaid` shortcode. Simply wrap the diagram markup within the shortcode. Blowfish automatically themes Mermaid diagrams to match the configured `colorScheme` parameter.
Blowfish 使用 `mermaid` 简码可以调用。Blowfish 会根据配置的 `colorScheme` 参数自动调用 Mermaid 生成流程图或者思维导图。
Refer to the [mermaid shortcode]({{< ref "docs/shortcodes#mermaid" >}}) docs for more details.
有关更多详细信息,请参阅 [Mermaid 简码]({{< ref "docs/shortcodes#mermaid" >}}) 文档。
The examples below are a small selection taken from the [official Mermaid docs](https://mermaid-js.github.io/mermaid/). You can also [view the page source](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/diagrams-flowcharts/index.md) on GitHub to see the markup.
下面的示例是从[官方 Mermaid 文档](https://mermaid-js.github.io/mermaid/) 中选取的一小部分。您还可以在 GitHub 上[查看页面源代码](https://raw.githubusercontent.com/nunocoracao/blowfish/main/exampleSite/content/samples/diagrams-flowcharts/index.md) 查看书写方法。
## Flowchart
## 流程图
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
@@ -34,7 +34,7 @@ end
{{< /mermaid >}}
</div>
## Sequence diagram
## 时序图
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
@@ -56,7 +56,7 @@ end
{{< /mermaid >}}
</div>
## Class diagram
## 类图
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
@@ -84,7 +84,7 @@ class Zebra{
{{< /mermaid >}}
</div>
## Entity relationship diagram
## 实体关系图
<div style="background-color:white; padding: 20px">
{{< mermaid >}}
@@ -1,20 +1,20 @@
---
title: "Emoji :parachute:"
title: "絵文字 :parachute:"
date: 2019-03-05
description: "Guide to Emoji usage in Blowfish"
description: "Blowfihs での絵文字の利用方法についてのガイド"
summary: "📖🏞️🧗🏽🐉🧙🏽‍♂️🧚🏽👸"
tags: ["emoji", "sample"]
type: 'sample'
---
Emoji is supported throughout Blowfish by default. Emoji can be used in titles, menu items and article content.
絵文字は Blowfish を通してデフォルトでサポートされています。絵文字はタイトル、メニューアイテム、そして記事のコンテンツで利用可能です。
{{< alert >}}
**Note:** The rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack.
**ノート:** これらの図形のレンダリングはブラウザとプラットフォームに依存します。絵文字をスタイルするには、サードパーティ製の絵文字フォントを利用するか、フォントスタックを利用します。
{{< /alert >}}
Emoji replacements are automatic throughout Blowfish, so you can use shorthand codes in your content and front matter and they will be converted to their corresponding symbols at build time.
絵文字の置換は Blowfish 全体を通して自動的に行われるため、コンテンツや表で省略符号を利用しても、ビルド時に対応する記号に変換されます。
**Example:** `see_no_evil` :see_no_evil:, `hear_no_evil` :hear_no_evil:, `speak_no_evil` :speak_no_evil:.
**:** `see_no_evil` :see_no_evil:, `hear_no_evil` :hear_no_evil:, `speak_no_evil` :speak_no_evil:
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
[絵文字チートシート](http://www.emoji-cheat-sheet.com/)は絵文字ショートハンドコードのための便利な参照ページです。
@@ -1,20 +1,20 @@
---
title: "Emoji :parachute:"
title: "Emoji 表情符号 :parachute:"
date: 2019-03-05
description: "Guide to Emoji usage in Blowfish"
description: "Blowfish 中的表情符号使用指南"
summary: "📖🏞️🧗🏽🐉🧙🏽‍♂️🧚🏽👸"
tags: ["emoji", "sample"]
tags: ["emoji", "示例"]
type: 'sample'
---
Emoji is supported throughout Blowfish by default. Emoji can be used in titles, menu items and article content.
Blowfish 支持 Emoji 表情符号。Emoji 表情符号可用于标题、菜单项和文章内容。
{{< alert >}}
**Note:** The rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack.
**注意:** Emoji 的显示效果取决于您的浏览器和操作系统。要设置统一的表情符号样式,您可以使用第三方 Emoji 表情符号字体。
{{< /alert >}}
Emoji replacements are automatic throughout Blowfish, so you can use shorthand codes in your content and front matter and they will be converted to their corresponding symbols at build time.
Blowfish 会自动的进行表情符号渲染,因此您可以在内容和 frontmatter 中使用 Emoji 表情代码,它们将在构建时转换为相应的 Emoji。
**Example:** `see_no_evil` :see_no_evil:, `hear_no_evil` :hear_no_evil:, `speak_no_evil` :speak_no_evil:.
**例如:** `see_no_evil` :see_no_evil:, `hear_no_evil` :hear_no_evil:, `speak_no_evil` :speak_no_evil:.
The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
[Emoji 清单](http://www.emoji-cheat-sheet.com/) 可以很方便的查找 Emoji 对应的表情代码。
+4 -4
View File
@@ -1,8 +1,8 @@
---
title: "An External Article"
title: "外部の記事"
date: 2019-01-24
externalUrl: "https://nunocoracao.com/projects/"
summary: "The `externalUrl` front matter parameter can link to any URL."
summary: "`externalUrl` 表示は任意の URL にリンクすることができます。"
showReadingTime: true
_build:
render: "false"
@@ -10,6 +10,6 @@ _build:
type: 'sample'
---
This page uses the `externalUrl` front matter parameter to link to an article outside of this Hugo website.
このページは、 `externalUrl` 表示パラメータを利用して、この Hugo ウェブサイト外の記事とリンクしています。
It's great for things like linking to posts on Medium or to research papers you may have hosted on third party websites.
Medium の投稿へのリンクや、サードパーティのウェブサイトでホストしている研究論文へのリンクなどに最適です。
+4 -4
View File
@@ -1,8 +1,8 @@
---
title: "An External Article"
title: "外部文章"
date: 2019-01-24
externalUrl: "https://nunocoracao.com/projects/"
summary: "The `externalUrl` front matter parameter can link to any URL."
summary: "`externalUrl` front matter 参数可以链接到任何外部 URL."
showReadingTime: true
_build:
render: "false"
@@ -10,6 +10,6 @@ _build:
type: 'sample'
---
This page uses the `externalUrl` front matter parameter to link to an article outside of this Hugo website.
此页面使用 `externalUrl` front matter 参数链接到 Hugo 网站之外的文章。
It's great for things like linking to posts on Medium or to research papers you may have hosted on third party websites.
它非常适合链接到 Medium 上的帖子或在第三方网站上托管的文章。
+50 -50
View File
@@ -1,114 +1,114 @@
---
title: "Icons"
title: "アイコン"
date: 2020-08-14
lastmod: 2022-03-09
draft: false
description: "Icon support in Blowfish."
description: "Blowfish でサポートしているアイコン。"
slug: "icons"
tags: ["icons", "sample", "shortcodes"]
type: 'sample'
---
Blowfish has built-in support for a number of [FontAwesome 6](https://fontawesome.com/icons) icons. These can be included in your website through either the [icon partial]({{< ref "docs/partials#icon" >}}) or [icon shortcode]({{< ref "docs/shortcodes#icon" >}}).
Blowfish はいくつもの [FontAwesome 6](https://fontawesome.com/icons) のアイコンを組み込み、サポートしています。これらは[アイコンパーシャル]({{< ref "docs/partials#icon" >}})または[アイコンショートコード]({{< ref "docs/shortcodes#icon" >}})のどちらかを利用してウェブサイトに含めることが出来ます。
Additionally, custom icons are also fully supported. Simply provide your own SVG icon assets by placing them in the `assets/icons/` directory in the root of your project. Any icons in the icons directory will then be available to use throughout the theme. In order achieve automatic color filling every SVG path needs fill="currentColor" XML attribute.
加えて、カスタムアイコンも完全にサポートされています。プロジェクトのルートにある `assets/icons/` ディレクトリーに SVG アイコンアセットを置くだけです。アイコンディレクトリ内のアイコンはテーマ全体で利用可能になります。自動的に色を塗りつぶすために、全ての SVG パスは fill="currentColor" XML 属性が必要です。
The full list of built-in icons and their corresponding names can referenced below.
組み込んでいるアイコンと対応する名称の全リストは以下を参照してください。
| Icon name | Preview |
| アイコン名 | プレビュー |
| -------------------- | --------------------------------- |
| amazon | {{< icon amazon >}} |
| apple | {{< icon apple >}} |
| bars | {{< icon bars >}} |
| bell | {{< icon bell >}} |
| バー | {{< icon bars >}} |
| ベル | {{< icon bell >}} |
| blogger | {{< icon blogger >}} |
| bluesky | {{< icon bluesky >}} |
| bomb | {{< icon bomb >}} |
| bug | {{< icon bug >}} |
| check | {{< icon check >}} |
| circle-info | {{< icon circle-info >}} |
| code | {{< icon code>}} |
| ボム | {{< icon bomb >}} |
| バグ | {{< icon bug >}} |
| チェック | {{< icon check >}} |
| 情報 (円) | {{< icon circle-info >}} |
| コード | {{< icon code>}} |
| codepen | {{< icon codepen >}} |
| comment | {{< icon comment >}} |
| コメント | {{< icon comment >}} |
| dev | {{< icon dev >}} |
| discourse | {{< icon discourse >}} |
| docker | {{< icon docker >}} |
| download | {{< icon download >}} |
| ダウンロード | {{< icon download >}} |
| dribbble | {{< icon dribbble >}} |
| edit | {{< icon edit >}} |
| email | {{< icon email >}} |
| envelope | {{< icon envelope >}} |
| expand | {{< icon expand >}} |
| eye | {{< icon eye >}} |
| 編集 | {{< icon edit >}} |
| メール | {{< icon email >}} |
| 封筒 | {{< icon envelope >}} |
| 拡大 | {{< icon expand >}} |
| | {{< icon eye >}} |
| facebook | {{< icon facebook >}} |
| fire | {{< icon fire >}} |
| | {{< icon fire >}} |
| flickr | {{< icon flickr >}} |
| fork | {{< icon fork >}} |
| foursquare | {{< icon foursquare >}} |
| ghost | {{< icon ghost >}} |
| 幽霊 | {{< icon ghost >}} |
| github | {{< icon github >}} |
| gitlab | {{< icon gitlab >}} |
| globe | {{< icon globe >}} |
| 地球 | {{< icon globe >}} |
| goodreads | {{< icon goodreads >}} |
| google | {{< icon google >}} |
| graduation-cap | {{< icon graduation-cap >}} |
| 卒業帽 | {{< icon graduation-cap >}} |
| hackernews | {{< icon hackernews >}} |
| hashnode | {{< icon hashnode >}} |
| heart-empty | {{< icon heart-empty >}} |
| heart | {{< icon heart >}} |
| image | {{< icon image >}} |
| ハート (空) | {{< icon heart-empty >}} |
| ハート | {{< icon heart >}} |
| 画像 | {{< icon image >}} |
| instagram | {{< icon instagram >}} |
| keybase | {{< icon keybase >}} |
| kickstarter | {{< icon kickstarter >}} |
| ko-fi | {{< icon ko-fi >}} |
| language | {{< icon language >}} |
| 言語 | {{< icon language >}} |
| lastfm | {{< icon lastfm >}} |
| lightbulb | {{< icon lightbulb >}} |
| link | {{< icon link >}} |
| ひらめき | {{< icon lightbulb >}} |
| リンク | {{< icon link >}} |
| linkedin | {{< icon linkedin >}} |
| list | {{< icon list >}} |
| location-dot | {{< icon location-dot >}} |
| lock | {{< icon lock >}} |
| リスト | {{< icon list >}} |
| 地図のピン | {{< icon location-dot >}} |
| ロック | {{< icon lock >}} |
| mastodon | {{< icon mastodon >}} |
| medium | {{< icon medium >}} |
| microsoft | {{< icon microsoft >}} |
| moon | {{< icon moon >}} |
| mug-hot | {{< icon mug-hot >}} |
| music | {{< icon music >}} |
| | {{< icon moon >}} |
| ホットマグカップ | {{< icon mug-hot >}} |
| 音楽 | {{< icon music >}} |
| orcid | {{< icon orcid >}} |
| patreon | {{< icon patreon >}} |
| paypal | {{< icon paypal >}} |
| pencil | {{< icon pencil >}} |
| pgpkey | {{< icon pgpkey >}} |
| phone | {{< icon phone >}} |
| 鉛筆 | {{< icon pencil >}} |
| pgp キー | {{< icon pgpkey >}} |
| 電話 | {{< icon phone >}} |
| pinterest | {{< icon pinterest >}} |
| poo | {{< icon poo >}} |
| うんち | {{< icon poo >}} |
| reddit | {{< icon reddit >}} |
| researchgate | {{< icon researchgate >}} |
| rss | {{< icon rss >}} |
| rss-square | {{< icon rss-square >}} |
| scale-balanced | {{< icon scale-balanced >}} |
| search | {{< icon search >}} |
| shield | {{< icon shield >}} |
| skull-crossbones | {{< icon skull-crossbones >}} |
| rss (四角) | {{< icon rss-square >}} |
| 天秤 | {{< icon scale-balanced >}} |
| 検索 | {{< icon search >}} |
| | {{< icon shield >}} |
| ドクロ | {{< icon skull-crossbones >}} |
| slack | {{< icon slack >}} |
| snapchat | {{< icon snapchat >}} |
| soundcloud | {{< icon soundcloud >}} |
| stack-overflow | {{< icon stack-overflow >}} |
| star | {{< icon star >}} |
| | {{< icon star >}} |
| steam | {{< icon steam >}} |
| stripe | {{< icon stripe >}} |
| substack | {{< icon substack >}} |
| sun | {{< icon sun >}} |
| tag | {{< icon tag >}} |
| 太陽 | {{< icon sun >}} |
| タグ | {{< icon tag >}} |
| telegram | {{< icon telegram >}} |
| threads | {{< icon threads >}} |
| tiktok | {{< icon tiktok >}} |
| triangle-exclamation | {{< icon triangle-exclamation >}} |
| 警告 (三角) | {{< icon triangle-exclamation >}} |
| tumblr | {{< icon tumblr >}} |
| twitch | {{< icon twitch >}} |
| twitter | {{< icon twitter >}} |
| wand-magic-sparkles | {{< icon wand-magic-sparkles >}} |
| 輝く魔法の杖 | {{< icon wand-magic-sparkles >}} |
| whatsapp | {{< icon whatsapp >}} |
| x-twitter | {{< icon x-twitter >}} |
| xing | {{< icon xing >}} |
@@ -95,6 +95,7 @@ The full list of built-in icons and their corresponding names can referenced bel
| slack | {{< icon slack >}} |
| snapchat | {{< icon snapchat >}} |
| soundcloud | {{< icon soundcloud >}} |
| spotify | {{< icon spotify >}} |
| stack-overflow | {{< icon stack-overflow >}} |
| star | {{< icon star >}} |
| steam | {{< icon steam >}} |
@@ -115,3 +116,4 @@ The full list of built-in icons and their corresponding names can referenced bel
| xing | {{< icon xing >}} |
| xmark | {{< icon xmark >}} |
| youtube | {{< icon youtube >}} |
| codeberg | {{< icon codeberg >}} |
@@ -5,7 +5,7 @@ lastmod: 2022-03-09
draft: false
description: "Blowfish 支持的图标。"
slug: "icons"
tags: ["图标", "示例", "短代码"]
tags: ["图标", "示例", "码"]
type: 'sample'
---
@@ -1,18 +1,18 @@
---
title: "Markdown"
date: 2019-03-11
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
description: "基本的な Markdown 構文と HTML 要素のフォーマットを紹介するサンプル記事です。"
tags: ["markdown", "css", "html", "sample"]
type: 'sample'
---
This article offers a sample of basic Markdown formatting that can be used in Blowfish, also it shows how some basic HTML elements are decorated.
この記事は Blowfish を利用した基本的な Markdown フォーマットのサンプルを提供し、また基本的な HTML 要素がどのように装飾できるのかを示しています。
<!--more-->
## Headings
## 見出し
The following HTML `<h1>``<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
こちらは HTML `<h1>``<h6>` 要素に相当する6種類の見出しを使用できます。 `<h1>` が最大の見出しで、 `<h6>` に近づくほど小さくなっていきます。
# H1
@@ -26,121 +26,121 @@ The following HTML `<h1>`—`<h6>` elements represent six levels of section head
###### H6
## Paragraph
## 段落
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
## Blockquotes
## ブロック引用
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
ブロック引用要素は、他の情報元から引用された内容を表します。 `footer` または `cite` 要素を使った引用や、注釈や省略形などの変更を伴うことも可能です。
### Blockquote without attribution
### 出典なしのブロック引用
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use _Markdown syntax_ within a blockquote.
> **ノート** ブロック構文では、 _Markdown 構文_ を利用可能です。
### Blockquote with attribution
### 出典ありのブロック引用
> Don't communicate by sharing memory, share memory by communicating.<br>
> — <cite>Rob Pike[^1]</cite>
[^1]: The above quote is excerpted from Rob Pike's [talk `about` nothing](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
[^1]: 上記の引用は、2015年11月18日に開催された Gopherfest での Rob Pikes の [`講演`](https://www.youtube.com/watch?v=PAAkCSZUG1c) からの抜粋です。
## Tables
## テーブル
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
テーブルは Markdown の仕様には含まれていません。しかし Hugp はテーブルをすぐに利用できるようサポートしています。
| Name | Age |
| ----- | --- |
| Bob | 27 |
| Alice | 23 |
| 名前 | 年齢 |
| ----- | ---- |
| Bob | 27 |
| Alice | 23 |
### Inline Markdown within tables
### テーブルないのインライン Markdown
| Italics | Bold | Code |
| --------- | -------- | ------ |
| _italics_ | **bold** | `code` |
| 斜体 | 太字 | コード |
| ------ | -------- | -------- |
| _斜体_ | **太字** | `コード` |
## Code Blocks
## コードブロック
### Code block with backticks
### バックチックによるコードブロック
```html
<!DOCTYPE html>
<html lang="en">
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>Example HTML5 Document</title>
<title>HTML5 資料の例</title>
</head>
<body>
<p>Test</p>
<p>テスト</p>
</body>
</html>
```
### Code block indented with four spaces
### 4スペースのインデントによるコードブロック
<!DOCTYPE html>
<html lang="en">
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
<title>HTML5 資料の例</title>
</head>
<body>
<p>Test</p>
<p>テスト</p>
</body>
</html>
### Code block with Hugo's internal highlight shortcode
### Hugo 内のショートコード・ハイライトを利用したコードブロック
{{< highlight html "linenos=table,hl_lines=4 7-9" >}}
<!DOCTYPE html>
<html lang="en">
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
<title>HTML5 資料の例</title>
</head>
<body>
<p>Test</p>
<p>テスト</p>
</body>
</html>
{{< /highlight >}}
## List Types
## リスト形式
### Ordered List
### 順序のあるリスト
1. First item
2. Second item
3. Third item
1. 1つ目のアイテム
2. 2つ目のアイテム
3. 3つ目のアイテム
### Unordered List
### 順序がないリスト
- List item
- Another item
- And another item
- リストアイテム
- 他のアイテム
- 他のアイテム
### Nested list
### 入れ子型リスト
- Fruit
- Apple
- Orange
- Banana
- Dairy
- Milk
- Cheese
- 果実
- りんご
- オレンジ
- バナナ
- 乳製品
- 牛乳
- チーズ
## Other Elements — abbr, sub, sup, kbd, mark
## その他の要素 — abbr, sub, sup, kbd, mark
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
<abbr title="Graphics Interchange Format">GIF</abbr> はビットマップ画像フォーマットです。
H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd> to end the session.
<kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd>を押すことでセッションを終了出来ます。
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
多くの<mark>サラマンダー</mark>は夜行性で、昆虫やミミズ、その他の生物を狩ります。
@@ -1,18 +1,18 @@
---
title: "Markdown"
date: 2019-03-11
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
tags: ["markdown", "css", "html", "sample"]
description: "在 Markdown 文章中添加 HTML 元素的基本语法和格式。"
tags: ["markdown", "css", "html", "示例"]
type: 'sample'
---
This article offers a sample of basic Markdown formatting that can be used in Blowfish, also it shows how some basic HTML elements are decorated.
本文提供了可在 Blowfish 中使用的基本 Markdown 格式示例,还展示了如何加入一些基本 HTML 元素。
<!--more-->
## Headings
## 标题
The following HTML `<h1>``<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
以下 HTML 元素 `<h1>``<h6>` 表示六个级别的标题。 `<h1>` 是最高的标题级别,而 `<h6>` 是最低的。
# H1
@@ -26,46 +26,46 @@ The following HTML `<h1>`—`<h6>` elements represent six levels of section head
###### H6
## Paragraph
## 段落
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
## Blockquotes
## 块引用
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
块引用表示从其他来源引用的内容,可以用于位于 `footer` `cite` 元素内的引文,并且可以表示一些补充说明(例如注释和缩写)。
### Blockquote without attribution
### 没有参考链接的块引用
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use _Markdown syntax_ within a blockquote.
### Blockquote with attribution
### 有参考链接的块引用
> Don't communicate by sharing memory, share memory by communicating.<br>
> — <cite>Rob Pike[^1]</cite>
[^1]: The above quote is excerpted from Rob Pike's [talk `about` nothing](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
[^1]: 上述引文摘自 Rob Pike 在 2015 年 11 月 18 日 Gopherfest 期间的[谈论“什么都没有”](https://www.youtube.com/watch?v=PAAkCSZUG1c)
## Tables
## 表格
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
表格不是核心 Markdown 规范的一部分,但 Hugo 支持渲染。
| Name | Age |
| ----- | --- |
| Bob | 27 |
| Alice | 23 |
### Inline Markdown within tables
### 表格内内联 Markdown
| Italics | Bold | Code |
| --------- | -------- | ------ |
| _italics_ | **bold** | `code` |
## Code Blocks
## 代码块
### Code block with backticks
### 带反引号的代码块
```html
<!DOCTYPE html>
@@ -80,7 +80,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
</html>
```
### Code block indented with four spaces
### 缩进四个空格的代码块
<!DOCTYPE html>
<html lang="en">
@@ -93,7 +93,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
</body>
</html>
### Code block with Hugo's internal highlight shortcode
### 带有 Hugo 内部高亮简码的代码块
{{< highlight html "linenos=table,hl_lines=4 7-9" >}}
@@ -109,21 +109,21 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
</html>
{{< /highlight >}}
## List Types
## 列表
### Ordered List
### 有序列表
1. First item
2. Second item
3. Third item
### Unordered List
### 无序列表
- List item
- Another item
- And another item
### Nested list
### 嵌套列表
- Fruit
- Apple
@@ -133,7 +133,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
- Milk
- Cheese
## Other Elements — abbr, sub, sup, kbd, mark
## 其他元素 — abbrsubsupkbdmark
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.

Some files were not shown because too many files have changed in this diff Show More