Add translations

- Add series
- Add shortcodes
- Some fix
This commit is contained in:
Aphcity 2024-03-20 20:52:58 +08:00
parent 4ef29d4697
commit 8bf4d13667
18 changed files with 185 additions and 184 deletions

View file

@ -12,6 +12,7 @@ defaultContentLanguage = "en"
enableRobotsTXT = true
paginate = 100
summaryLength = 30
hasCJKLanguage = true
buildDrafts = false
buildFuture = false

View file

@ -5,7 +5,7 @@ draft: false
description: "了解如何手动构建 Blowfish。"
slug: "advanced-customisation"
tags: ["高级", "CSS", "文档"]
series: ["文档集"]
series: ["部署教程"]
series_order: 13
---

View file

@ -5,7 +5,7 @@ draft: false
description: "介绍 Blowfish 中所有可用的的配置变量。"
slug: "configuration"
tags: ["配置", "文档"]
series: ["文档集"]
series: ["部署教程"]
series_order: 4
---

View file

@ -5,7 +5,7 @@ draft: false
description: "包含 Blowfish 中所有可用部分的示例、"
slug: "content-examples"
tags: ["内容", "示例"]
series: ["文档集"]
series: ["部署教程"]
series_order: 12
---

View file

@ -5,7 +5,7 @@ draft: false
description: "了解 Blowfish 如何继承 Firebase并动态显示阅读量和点赞量。"
slug: "firebase-views"
tags: ["firebase", "阅读量", "点赞量"]
series: ["文档集"]
series: ["部署教程"]
series_order: 15
---

View file

@ -1,11 +1,11 @@
---
title: "扉页参数"
title: "Front Matter"
date: 2020-08-10
draft: false
description: "文本主要介绍 Blowfish 中页面中可以添加的所有的前页/扉页参数。"
description: "文本主要介绍 Blowfish 中页面中可以添加的所有的 Front Matter 参数。"
slug: "front-matter"
tags: ["front matter", "配置", "文档"]
series: ["文档集"]
series: ["部署教程"]
series_order: 7
---

View file

@ -2,10 +2,10 @@
title: "入门指南"
date: 2020-08-15
draft: false
description: "All the front matter variables available in Blowfish."
description: "所有在你要使用 Blowfish 主题搭建网站之前的准备工作"
slug: "getting-started"
tags: ["安装", "文档"]
series: ["文档集合"]
series: ["部署教程"]
series_order: 3
---

View file

@ -5,7 +5,7 @@ draft: false
description: "在 Blowfish 主题中设置主页布局。"
slug: "homepage-layout"
tags: ["主页", "布局", "文档"]
series: ["文档集"]
series: ["部署教程"]
series_order: 5
---

View file

@ -1,11 +1,11 @@
---
title: "Hosting & Deployment"
title: "托管和部署"
date: 2020-08-07
draft: false
description: "Learn how to deploy a Blowfish site."
description: "了解如何部署 Blowfish 网页。"
slug: "hosting-deployment"
tags: ["docs", "hosting", "deployment", "github", "netlify", "render"]
series: ["Documentation"]
tags: ["文档", "托管", "部署", "github", "netlify", "渲染器"]
series: ["部署教程"]
series_order: 14
---

View file

@ -5,7 +5,7 @@ draft: false
description: "如何安装 Blowfish 主题。"
slug: "installation"
tags: ["安装", "文档"]
series: ["文档集合"]
series: ["部署教程"]
series_order: 2
---

View file

@ -5,7 +5,7 @@ draft: false
description: "为你的文章设置多个作者。"
slug: "multi-author"
tags: ["作者", "配置", "文档"]
series: ["文档集"]
series: ["部署教程"]
series_order: 10
showAuthor: true
authors:

View file

@ -2,10 +2,10 @@
title: "Partials"
date: 2020-08-10
draft: false
description: "All the partials available in Blowfish."
description: "所有 Blowfish 可以配置的 Partials"
slug: "partials"
tags: ["partials", "analytics", "privacy", "comments", "favicons", "icon", "docs"]
series: ["Documentation"]
tags: ["partials", "统计服务", "隐私", "评论", "网站图标", "图标", "文档"]
series: ["部署教程"]
series_order: 9
---

View file

@ -1,19 +1,19 @@
---
title: "Series"
title: "系列"
date: 2020-08-09
draft: false
description: "Learn how to group articles under a series."
description: "了解如何将文章分组到系列中。"
slug: "series"
tags: ["series", "docs"]
series: ["Documentation"]
tags: ["系列", "文档"]
series: ["部署教程"]
series_order: 11
seriesOpened: true
---
Blowfish provides a feature to group a set of articles together under a "series". Placing an article under a series will display the rest of the series articles in each single page and provide a quick way to navigate amongst them. You can see an example of this above.
Blowfish 提供了将一组文章分组到“系列”下的功能。将文章放在系列下将在每个页面中显示该系列文章的其余部分,并在它们之间提供快速导航。您可以在上面看到一个例子。
## Create Taxonomy
The first step to enable series is to create the `series` taxonomy. For doing this just add the `series` taxonomy to your taxonomy list in the `config.toml`.
## 创建分类
启用系列的第一步是创建 `series` 分类法。为此,只需将 `series` 分类法添加到 `config.toml` 中的分类法列表中即可。
```toml
[taxonomies]
@ -23,14 +23,15 @@ The first step to enable series is to create the `series` taxonomy. For doing th
series = "series"
```
## Mark Articles
## 标记文章
Then you just need to mark each article using the `series` parameter and the `series_order`. The `series` parameter will be the id and name of the series you are placing the article into (even though the variable is an array we recommend keeping each article to a single series.). And the `series_order` defines the order of that article within the series. In the example below the article is number `11` in the `Documentation` series.
然后你只需要添加 `series``series_order` 参数。 `series` 参数将是您要将文章放入的系列名称。 `series_order` 定义了文章在该系列中的顺序。在下面的示例中,文章是 `Documentation` 系列中的第 `11` 篇文章。
```md
series: ["Documentation"]
series_order: 11
```
## Series Behavior
Marking an article as part of a series will automatically display the series module as you see in this page for example. You can choose whether that module starts opened or not using the `article.seriesOpened` global variable in `params.toml` or the front-matter parameter `seriesOpened` to specify an override at the article level.
## 系列的表现形式
将文章标记为系列的一部分将自动显示系列模块,例如您在下方看到的这样。您可以使用 `params.toml` 中的 `article.seriesOpened` 全局变量或参数 `seriesOpened` 来选择该模块是否开始打开,以指定文章级别的覆盖。

View file

@ -1,44 +1,44 @@
---
title: "Shortcodes"
title: "简码"
date: 2020-08-11
draft: false
description: "All the shortcodes available in Blowfish."
description: "所有 Blowfish 中可用的简码"
slug: "shortcodes"
tags: ["shortcodes", "mermaid", "icon", "lead", "docs"]
series: ["Documentation"]
tags: ["简码", "mermaid", "图标", "lead", "docs"]
series: ["部署教程"]
series_order: 8
---
In addition to all the [default Hugo shortcodes](https://gohugo.io/content-management/shortcodes/), Blowfish adds a few extras for additional functionality.
除了所有[默认 Hugo 简码](https://gohugo.io/content-management/shortcodes/) 之外Blowfish 还添加了一些额外的功能。
## Alert
`alert` outputs its contents as a stylised message box within your article. It's useful for drawing attention to important information that you don't want the reader to miss.
`alert` 可以将其中内容输出为文章中的风格化消息框。它对于吸引读者注意您不想让读者错过的重要信息很有用。
<!-- 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.) |
| `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 . |
| `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 -->
The input is written in Markdown so you can format it however you please.
输入内容是用 Markdown 语言编写的,因此您可以根据需要设置其格式。
**Example 1:** No params
**例1:** 无参数
```md
{{</* alert */>}}
**Warning!** This action is destructive!
**警告!**此操作具有破坏性!
{{</* /alert */>}}
```
{{< alert >}}
**Warning!** This action is destructive!
**警告!**此操作具有破坏性!
{{< /alert >}}
**Example 2:** Unnamed param
**例2:** 未命名参数
```md
{{</* alert "twitter" */>}}
@ -50,7 +50,7 @@ Don't forget to [follow me](https://twitter.com/nunocoracao) on Twitter.
Don't forget to [follow me](https://twitter.com/nunocoracao) on Twitter.
{{< /alert >}}
**Example 3:** Named params
**例3:** 命名参数
```md
{{</* alert icon="fire" cardColor="#e63946" iconColor="#1d3557" textColor="#f1faee" */>}}
@ -66,15 +66,15 @@ This is an error!
## Article
`Article` will embed a single article into a markdown file. The `link` to the file should be the `.RelPermalink` of the file to be embedded. Note that the shortcode will not display anything if it's referencing it's parent. *Note: if you are running your website in a subfolder like Blowfish (i.e. /blowfish/) please include that path in the link.*
`Article` 将把一篇文章嵌入到一个 markdown 文件中。 参数中的 `link`应该是要嵌入的文件的 `.RelPermalink`。请注意,如果简码引用其父级文件,则它不会显示任何内容。 *注意:如果您在 Blowfish即 /blowfish/)等子文件夹中运行网站,请在链接中包含该路径。*
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| --------- | -------------------------------------------------------- |
| `link` | **Required.** the `.RelPermalink` to the target article. |
| `link` | **必填** 要嵌入文章的 `.RelPermalink` |
<!-- prettier-ignore-end -->
**Example:**
**例如:**
```md
{{</* article link="/docs/welcome/" */>}}
@ -86,9 +86,9 @@ This is an error!
## Badge
`badge` outputs a styled badge component which is useful for displaying metadata.
`badge` 输出一个美观的徽章组件,该组件对于显示元数据很有用。
**Example:**
**例如:**
```md
{{</* badge */>}}
@ -104,9 +104,9 @@ New article!
## Button
`button` outputs a styled button component which can be used to highlight a primary action. It has two optional variables `href` and `target` which can be used to specify the URL and target of the link.
`button` 输出一个样式化的按钮组件,可用于突出显示主要操作。它有两个可选参数 `href``target` ,可用于指定链接的 URL 或目标文档。
**Example:**
**例如:**
```md
{{</* button href="#button" target="_self" */>}}
@ -122,17 +122,17 @@ Call to action
## Carousel
`carousel` is used to showcase multiple images in an interactive and visually appealing way. This allows a user to slide through multiple images while only taking up the vertical space of a single one. All images are displayed using the full width of the parent component and using one of the predefined aspect ratios of `16:9`, `21:9` or `32:9`.
`carousel` 用于生成可交互且具有视觉吸引力的方式展示多个图像的画廊。这允许用户滑动浏览多个图像,同时仅占用单个图像的垂直空间。 所有图像均使用父组件的完整宽度并使用预定义的宽高比 `16:9``21:9``32:9` 之一显示。
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| ------------- | ----------------------------------------------------------------------------------------------------------------- |
| `images` | **Required.** A regex string to match image names or URLs. |
| `aspectRatio` | **Optional.** The aspect ratio for the carousel. Either `16-9`, `21-9` or `32-9`. It is set to `16-9` by default. |
| `interval` | **Optional.** The interval for the auto-scrooling, specified in milliseconds. Defaults to `2000` (2s) |
| `images` | **必填** 用于匹配图像名称的正则表达式或 URL。 |
| `aspectRatio` | **可选** 画廊的纵横比。`16-9` 、`21-9` 或`32-9` 。默认设置为`16-9` 。 |
| `interval` | **可选** 自动滚动的时间间隔,以毫秒为单位指定。默认为`2000`2 秒)。 |
<!-- prettier-ignore-end -->
**Example 1:** 16:9 aspect ratio and verbose list of images
**例1:** 16:9 宽高比和 URL 图像列表
```md
{{</* carousel images="{https://cdn.pixabay.com/photo/2016/12/11/12/02/mountains-1899264_960_720.jpg, gallery/03.jpg, gallery/01.jpg, gallery/02.jpg, gallery/04.jpg}" */>}}
@ -140,7 +140,7 @@ Call to action
{{< carousel images="{https://cdn.pixabay.com/photo/2016/12/11/12/02/mountains-1899264_960_720.jpg,gallery/03.jpg,gallery/01.jpg,gallery/02.jpg,gallery/04.jpg}" >}}
**Example 2:** 21:9 aspect ratio and regex-ed list of images
**例2:** 21:9 宽高比和正则表达式图像列表
```md
{{</* carousel images="gallery/*" aspectRatio="21-9" interval="2500" */>}}
@ -152,11 +152,11 @@ Call to action
## Chart
`chart` uses the Chart.js library to embed charts into articles using simple structured data. It supports a number of [different chart styles](https://www.chartjs.org/docs/latest/samples/) and everything can be configured from within the shortcode. Simply provide the chart parameters between the shortcode tags and Chart.js will do the rest.
`chart` 使用 Chart.js 库将图表嵌入到使用简单结构化数据的文章中。它支持多种[不同的图表样式](https://www.chartjs.org/docs/latest/samples/)并且所有内容都可以在简码中进行配置。只需在简码中提供图表参数Chart.js 将完成剩下的工作。
Refer to the [official Chart.js docs](https://www.chartjs.org/docs/latest/general/) for details on syntax and supported chart types.
有关语法和支持的图表类型的详细信息,请参阅 [Chart.js 官方文档](https://www.chartjs.org/docs/latest/general/)。
**Example:**
**例如:**
```js
{{</* chart */>}}
@ -184,38 +184,38 @@ data: {
{{< /chart >}}
<!-- prettier-ignore-end -->
You can see some additional Chart.js examples on the [charts samples]({{< ref "charts" >}}) page.
您可以在 [图表示例]({{< ref "charts" >}}) 页面上查看一些更多 Chart.js 示例。
<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.
Blowfish 包含一个 `figure` 简码,用于将图像添加到内容中。该简码取代了基本的 Hugo 功能,且性能更好。
When a provided image is a page resource, it will be optimised using Hugo Pipes and scaled in order to provide images appropriate to different device resolutions. If a static asset or URL to an external image is provided, it will be included as-is without any image processing by Hugo.
当提供的图像是页面资源时,将使用 Hugo Pipes 对其进行优化并缩放,以提供适合不同设备分辨率的图像。如果提供了静态资产或外部图像的 URL它将按原样包含在内而无需 Hugo 进行任何图像处理。
The `figure` shortcode accepts six parameters:
`figure` 简码接受六个参数:
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `src` | **Required.** The local path/filename or URL of the image. When providing a path and filename, the theme will attempt to locate the image using the following lookup order: Firstly, as a [page resource](https://gohugo.io/content-management/page-resources/) bundled with the page; then an asset in the `assets/` directory; then finally, a static image in the `static/` directory. |
| `alt` | [Alternative text description](https://moz.com/learn/seo/alt-text) for the image. |
| `caption` | Markdown for the image caption, which will be displayed below the image. |
| `class` | Additional CSS classes to apply to the image. |
| `href` | URL that the image should be linked to. |
| `target` | The target attribute for the `href` URL. |
| `nozoom` | `nozoom=true` disables the image "zoom" functionality. This is most useful in combination with a `href` link. |
| `default` | Special parameter to revert to default Hugo `figure` behaviour. Simply provide `default=true` and then use normal [Hugo shortcode syntax](https://gohugo.io/content-management/shortcodes/#figure). |
| `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)。 |
<!-- prettier-ignore-end -->
Blowfish also supports automatic conversion of images included using standard Markdown syntax. Simply use the following format and the theme will handle the rest:
Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用以下格式,主题将自动处理:
```md
![Alt text](image.jpg "Image caption")
```
**Example:**
**例如:**
```md
{{</* figure
@ -235,11 +235,11 @@ Blowfish also supports automatic conversion of images included using standard Ma
## Gallery
`gallery` allows you to showcase multiple images at once, in a responsive manner with more varied and interesting layouts.
`gallery` 允许您以响应式一次展示多个图像,并具有更加多样化和有趣的布局的图库。
In order to add images to the gallery, use `img` tags for each image and add `class="grid-wXX"` in order for the gallery to be able to identify the column width for each image. The widths available by default start at 10% and go all the way to 100% in 5% increments. For example, to set the width to 65%, set the class to `grid-w65`. Additionally, widths for 33% and 66% are also available in order to build galleries with 3 cols. You can also leverage tailwind's responsive indicators to have a reponsive grid.
为了将图像添加到图库中,请为每个图像使用`img`标签并添加`class ="grid-wXX"`,以便图库能够识别每个图像的列宽。默认情况下可用的宽度从 10% 开始,以 5% 的增量一直达到 100%。例如,要将宽度设置为 65%,请将类设置为`grid-w65`。此外,还可以使用 33% 和 66% 的宽度来构建 3 列的画廊。您还可以利用 Tailwind 的响应指示器来构建响应网格。
**Example 1: normal gallery**
**例1: 普通图库**
```md
{{</* gallery */>}}
@ -266,7 +266,7 @@ In order to add images to the gallery, use `img` tags for each image and add `cl
<br/><br/><br/>
**Example 2: responsive gallery**
**例2: 响应式图库**
```md
{{</* gallery */>}}
@ -292,17 +292,17 @@ In order to add images to the gallery, use `img` tags for each image and add `cl
<br/><br/><br/>
## GitHub Card
## GitHub 卡片
`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.
`github` 允许您快速链接到 github Repo同时显示和更新有关它的实时统计信息例如它的 star 和 fork 数。
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| --------- | ----------------------------------------------------- |
| `repo` | [String] github repo in the format of `username/repo` |
| `repo` | [String] 格式为 `username/repo` 的 github repo |
<!-- prettier-ignore-end -->
**Example 1:**
**1:**
```md
{{</* github repo="nunocoracao/blowfish" */>}}
@ -312,21 +312,21 @@ In order to add images to the gallery, use `img` tags for each image and add `cl
<br/><br/><br/>
## GitLab Card
## GitLab 卡片
`gitlab` allows you to quickly link a GitLab Project (GitLab's jargon for repo).
It displays realtime stats about it, such as the number of stars and forks it has.
Unlike `github` it can't display the main programming language of a project.
Finally, custom GitLab instance URL can be provided, as long as the `api/v4/projects/` endpoint is available, making this shortcode compatible with most self-hosted / enterprise deployments.
`gitlab` 允许您快速链接 GitLab 项目GitLab 的 Repo
显示有关的实时统计数据,例如它拥有的 star 和 fork 的数量。
`github` 不同,它无法显示项目的主要编程语言。
最后,只要 `api/v4/projects/` 可用,就可以提供自定义 GitLab 实例 URL从而使此简码能够显示大多数自托管/企业组织。
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| ----------- | ----------------------------------------------------------------------- |
| `projectID` | [String] gitlab numeric ProjectID |
| `baseURL` | [String] optional gitlab instance URL, default is `https://gitlab.com/` |
| `projectID` | [String] gitlab 数字项目ID |
| `baseURL` | [String] 可选 gitlab 实例 URL默认为 `https://gitlab.com/` |
<!-- prettier-ignore-end -->
**Example 1:**
**1:**
```md
{{</* gitlab projectID="278964" */>}}
@ -336,11 +336,11 @@ Finally, custom GitLab instance URL can be provided, as long as the `api/v4/proj
<br/><br/><br/>
## Icon
## 图标
`icon` outputs an SVG icon and takes the icon name as its only parameter. The icon is scaled to match the current text size.
`icon` 输出一个 SVG 图标并以图标名称作为其唯一参数。图标会自动缩放以匹配当前文本大小。
**Example:**
**例如:**
```md
{{</* icon "github" */>}}
@ -348,23 +348,23 @@ Finally, custom GitLab instance URL can be provided, as long as the `api/v4/proj
**Output:** {{< icon "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.
图标使用 Hugo Pipeline 填充,这使得它们非常灵活。 Blowfish 包含许多用于社交、链接和其他内置图标。参考 [图标示例]({{< ref "samples/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 shortcode by using the SVG filename without the `.svg` extension.
可以通过在项目的 `assets/icons/` 目录中提供您自己的图标来添加自定义图标。然后可以使用不带 `.svg` 扩展名的 SVG 文件名在简码中引用该图标。
Icons can also be used in partials by calling the [icon partial]({{< ref "partials#icon" >}}).
还可以通过调用 [iconpartial]({{< ref "partials#icon" >}}) 在 partials 中使用图标。
<br/><br/><br/>
## KaTeX
The `katex` shortcode can be used to add mathematical expressions to article content using the KaTeX package. Refer to the online reference of [supported TeX functions](https://katex.org/docs/supported.html) for the available syntax.
`katex` 简码可用于使用 KaTeX 包向文章内容添加数学表达式。有关可用语法,请参阅[支持的 TeX 函数](https://katex.org/docs/supported.html) 的在线参考。
To include mathematical expressions in an article, simply place the shortcode anywhere with the content. It only needs to be included once per article and KaTeX will automatically render any markup on that page. Both inline and block notation are supported.
要在文章中加入数学表达式只需将简码放在任意位置即可。每篇文章只需加入一次KaTeX 将自动呈现该页面上的任何标记。支持内联和块表示法。
Inline notation can be generated by wrapping the expression in `\\(` and `\\)` delimiters. Alternatively, block notation can be generated using `$$` delimiters.
可以通过将表达式包装在 `\\(``\\)` 分隔符中来生成内联表示法。或者,可以使用 `$$` 分隔符生成块符号。
**Example:**
**例如:**
```md
{{</* katex */>}}
@ -374,26 +374,26 @@ Inline notation can be generated by wrapping the expression in `\\(` and `\\)` d
{{< katex >}}
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\)
Check out the [mathematical notation samples]({{< ref "mathematical-notation" >}}) page for more examples.
查看 [数学符号示例]({{< ref "mathematical-notation" >}}) 页面以获取更多示例。
<br/><br/><br/>
## Keyword
## 重点突出
The `keyword` component can be used to visually highlight certain important words or phrases, e.g. professional skills etc. The `keywordList` shortcode can be used to group together multiple `keyword` items. Each item can have the following properties.
`keyword` 组件可用于在视觉上突出显示某些重要的单词或短语,例如专业技能等。 `keywordList` 简码可用于将多个 `keyword` 组合在一起。每个组件可以具有以下参数。
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| --------- | --------------------------------------- |
| `icon` | Optional icon to be used in the keyword |
| `icon` | **可选** 关键字中使用的图标 |
<!-- prettier-ignore-end -->
The input is written in Markdown so you can format it however you please.
输入内容是用 Markdown 编写的,因此您可以根据需要设置其格式。
**Example1 :**
**1 :**
```md
{{</* keyword */>}} Super skill {{</* /keyword */>}}
@ -401,7 +401,7 @@ The input is written in Markdown so you can format it however you please.
{{< keyword >}} *Standalone* skill {{< /keyword >}}
**Example2 :**
**2 :**
```md
{{</* keywordList */>}}
@ -422,9 +422,9 @@ The input is written in Markdown so you can format it however you please.
## Lead
`lead` is used to bring emphasis to the start of an article. It can be used to style an introduction, or to call out an important piece of information. Simply wrap any Markdown content in the `lead` shortcode.
`lead` 用于强调文章的开头。它可以用来设计介绍的样式,或者指出一条重要的信息。只需将任何 Markdown 内容包装在 `lead` 简码中即可。
**Example:**
**例如:**
```md
{{</* lead */>}}
@ -438,26 +438,26 @@ When life gives you lemons, make lemonade.
<br/><br/><br/>
## List
## 列表
`List` will display a list of recent articles. This shortcode requires a limit value to constraint the list. Additionally, it supports a `where` and a `value` in order to filter articles by their parameters. Note that this shortcode will not display its parent page but it will count for the limit value.
`List` 将显示最近文章的列表。此简码需要一个限制值来约束列表。此外,它还支持输入 `where``value` ,以便按参数过滤文章。请注意,此简码不会显示其父页面,但会计入限制值。
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit` | **Required.** the number of recent articles to display. |
| `title` | Optional title for the list, default is `Recent` |
| `cardView` | Optional card view enabled for the list, default is `false` |
| `where` | The variable to be used for the query of articles e.g. `Type` |
| `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` |
| `limit` | **必填** 要显示的最近文章数量。 |
| `title` | **可选** 列表标题,默认为 `Recent` |
| `cardView` | **可选** 列表启用卡片视图,默认为 `false` |
| `where` | 用于筛选文章的变量,例如 `Type` |
| `value` | 需要与 `where` 中定义的参数匹配的值,以进行文章查询,例如对于 `where` == `Type`,可以找到文章 `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.
`where``value` 值用于简码中进行以下格式的查询 `where .Site.RegularPages $where $value` 。检查 [Hugo 文档](https://gohugo.io/variables/page/) 以了解有关可用参数的更多信息。
{{</ alert >}}
<!-- prettier-ignore-end -->
**Example #1:**
**例 1:**
```md
{{</* list limit=2 */>}}
@ -465,7 +465,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
{{< list limit=2 >}}
**Example #2:**
**例 2:**
```md
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}}
@ -475,11 +475,11 @@ The `where` and `value` values are used in the following query `where .Site.Regu
<br/><br/><br/>
## LTR/RTL
## 文字书写方向
`ltr` and `rtl` allows you to mix your contents. Many RTL language users want to include parts of the content in LTR. Using this shortcode will let you do so, and by leveraging `%` as the outer-most dilemeter in the shortcode [Hugo shortcodes](https://gohugo.io/content-management/shortcodes/#shortcodes-with-markdown), any markdown inside will be rendered normally.
`ltr` `rtl` 允许您混排内容。许多从左往右书写语言的用户希望在文章中包含部分从右往左的书写内容。使用此简码可以让您做到这一点,并利用 `%` 作为简码中最外层的标识符 [Hugo Shortcodes](https://gohugo.io/content-management/shortcodes/#shortcodes-with-markdown),其中任何 markdown 内容都会正常渲染。
**Example:**
**例如:**
```md
- This is an markdown list.
@ -499,20 +499,20 @@ The `where` and `value` values are used in the following query `where .Site.Regu
<br/><br/><br/>
## Markdown Importer
## Markdown 导入
This shortcode allows you to import markdown files from external sources. This is useful for including content from other repositories or websites without having to copy and paste the content.
此简码允许您从外部源导入 Markdown 文件。这对于包含来自其他仓库或网站的内容非常有用,而无需复制和粘贴内容。
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| --------- | ------------------------------------------------------- |
| `url` | **Required** URL to an externally hosted markdown file. |
| `url` | **必填** 外部托管 Markdown 文件的 URL。 |
<!-- prettier-ignore-end -->
**Example:**
**例如:**
```md
{{</* mdimporter url="https://raw.githubusercontent.com/nunocoracao/nunocoracao/master/README.md" */>}}
@ -526,13 +526,13 @@ This shortcode allows you to import markdown files from external sources. This i
## Mermaid
`mermaid` allows you to draw detailed diagrams and visualisations using text. It uses Mermaid under the hood and supports a wide variety of diagrams, charts and other output formats.
`mermaid` 允许您使用文本绘制可视化的图表。底层使用 Mermaid并支持各种图表、图表和其他输出格式。
Simply write your Mermaid syntax within the `mermaid` shortcode and let the plugin do the rest.
只需在 `mermaid` 简码中编写您的 Mermaid 语法,然后让插件完成其余的工作。
Refer to the [official Mermaid docs](https://mermaid-js.github.io/) for details on syntax and supported diagram types.
有关语法和支持的图表类型的详细信息,请参阅[官方 Mermaid 文档](https://mermaid-js.github.io/)。
**Example:**
**例如:**
```md
{{</* mermaid */>}}
@ -548,41 +548,40 @@ A[Lemons]-->B[Lemonade];
B-->C[Profit]
{{< /mermaid >}}
You can see some additional Mermaid examples on the [diagrams and flowcharts samples]({{< ref "diagrams-flowcharts" >}}) page.
您可以在[图表和流程图示例]({{< ref "diagrams-flowcharts" >}}) 页面上看到一些其他 Mermaid 示例。
<br/><br/><br/>
## Swatches
## 色板
`swatches` outputs a set of up to three different colors to showcase color elements like a color palette. This shortcode takes the `HEX` codes of each color and creates the visual elements for each.
`swatches` 输出一组最多三种不同的颜色来展示颜色元素的调色板。该简码采用每种颜色的 `HEX` 码并为每种颜色创建预览。
**Example**
****
```md
{{</* swatches "#64748b" "#3b82f6" "#06b6d4" */>}}
```
**Output**
**输出**
{{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
<br/><br/><br/>
## Timeline
The `timeline` creates a visual timeline that can be used in different use-cases, e.g. professional experience, a project's achievements, etc. The `timeline` shortcode relies on the `timelineItem` sub-shortcode to define each item within the main timeline. Each item can have the following properties.
## 时间线
`timeline` 创建了一个可视化时间线,用于展示专业经验、项目成就等。 `timeline` 简码依赖于 `timelineItem` 子简码来定义主时间线中的每个项目。每个项目可以具有以下属性。
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| ----------- | -------------------------------------------- |
| `icon` | the icon to be used in the timeline visuals. |
| `header` | header for each entry |
| `badge` | text to place within the top right badge |
| `subheader` | entry's subheader |
| `icon` | 要在时间线中使用的图标。 |
| `header` | 每个条目的标题 |
| `badge` | 放置在右上角徽章内的文本 |
| `subheader` | 每个条目的副标题 |
<!-- prettier-ignore-end -->
**Example:**
**例如:**
```md
{{</* timeline */>}}
@ -654,26 +653,26 @@ With other shortcodes
## TypeIt
[TypeIt](https://www.typeitjs.com) is the most versatile JavaScript tool for creating typewriter effects on the planet. With a straightforward configuration, it allows you to type single or multiple strings that break lines, delete & replace each other, and it even handles strings that contain complex HTML.
[TypeIt](https://www.typeitjs.com) 是用于创建打字机效果的最通用的 JavaScript 工具。通过简单的配置,它允许您键入单个或多个断行、删除和相互替换的字符串,甚至可以处理包含复杂 HTML 的字符串。
Blowfish implements a sub-set of TypeIt features using a `shortcode`. Write your text within the `typeit` shortcode and use the following parameters to configure the behavior you want.
Blowfish 使用简码实现 TypeIt 功能的子集。在 `typeit` 简码中编写文本,并使用以下参数来配置您想要的行为。
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tag` | [String] `html` tag that will be used to render the strings. |
| `classList` | [String] List of `css` classes to apply to the `html` element. |
| `initialString` | [String] Initial string that will appear written and will be replaced. |
| `speed` | [number] Typing speed, measured in milliseconds between each step. |
| `lifeLike` | [boolean] Makes the typing pace irregular, as if a real person is doing it. |
| `startDelay` | [number] The amount of time before the plugin begins typing after being initialized. |
| `breakLines` | [boolean] Whether multiple strings are printed on top of each other (true), or if they're deleted and replaced by each other (false). |
| `waitUntilVisible` | [boolean] Determines if the instance will begin when loaded or only when the target element becomes visible in the viewport. The default is `true` |
| `loop` | [boolean] Whether your strings will continuously loop after completing |
| `tag` | [String] 将用于呈现字符串的 `html` 标签。 |
| `classList` | [String] 应用于 `html` 元素的 `css` 类列表。 |
| `initialString` | [String] 将显示为先写入并将被替换的初始字符串。 |
| `speed` | [number] 每步之间的打字速度,以毫秒为单位。 |
| `lifeLike` | [boolean] 使打字速度不规律,就像真人在打字一样。 |
| `startDelay` | [number] 插件在初始化后到开始输入的延迟时间。 |
| `breakLines` | [boolean] 将多个字符串换行输出 (true),或者将它们删除并替换 (false)。 |
| `waitUntilVisible` | [boolean] 决定脚本在网站加载时启动还是在目标元素可见时启动。默认为 `true` |
| `loop` | [boolean] 字符串动画是否会循环 |
<!-- prettier-ignore-end -->
**Example 1:**
**1:**
```md
{{</* typeit */>}}
@ -685,7 +684,7 @@ Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
{{< /typeit >}}
**Example 2:**
**2:**
```md
{{</* typeit
@ -705,7 +704,7 @@ Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
{{< /typeit >}}
**Example 3:**
**3:**
```md
{{</* typeit
@ -733,18 +732,18 @@ consectetur adipiscing elit.
<br/><br/><br/>
## Youtube Lite
## Youtube 嵌入播放器
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.
使用 [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) 库嵌入 YouTube 视频的简码。该库是 YouTube 嵌入播放器的轻量级替代品,其设计速度更快、更高效。
<!-- prettier-ignore-start -->
| Parameter | Description |
| 参数 | 功能 |
| --------- | ----------------------------------- |
| `id` | [String] Youtube video id to embed. |
| `label` | [String] Label for the video |
| `id` | [String] 要嵌入的 YouTube 视频 ID。 |
| `label` | [String] 视频的标签 |
<!-- prettier-ignore-end -->
**Example 1:**
**1:**
```md
{{</* youtubeLite id="SgXhGb-7QbU" label="Blowfish-tools demo" */>}}

View file

@ -5,7 +5,7 @@ draft: false
description: "为你的文章配置缩略图。"
slug: "thumbnails"
tags: ["缩略图", "配置", "文档"]
series: ["文档集"]
series: ["部署教程"]
series_order: 6
---

View file

@ -4,7 +4,7 @@ date: 2022-01-19
draft: false
description: "探索 Blowfish 2.0版本的新功能。"
tags: ["新手", "文档"]
series: ["文档集合"]
series: ["部署教程"]
series_order: 1
---

View file

@ -1,6 +1,6 @@
---
title: "Samples"
description: "See what's possible with Blowfish."
title: "示例"
description: "来看看通过 Blowfish 能做到什么"
cascade:
showEdit: false
@ -15,6 +15,6 @@ Blowfish 让你的内容栩栩如生。 :heart_eyes:
本节包含一些演示页面展示了Blowfish如何呈现不同类型的内容。你还可以看到一个[分类列表]({{< ref "tags" >}})页面的示例。
_**旁注:** 这个页面只是一个标准的Blowfish文章列表并且已经配置了Hugo来生成一个`samples`内容类型并显示文章摘要。_
_**旁注:** 这个页面只是一个标准的Blowfish文章列表并且已经配置了Hugo来生成一个 `samples` 内容类型并显示文章摘要。_
---

View file

@ -1,10 +1,10 @@
---
title: "Users"
title: "友链"
date: 2020-08-14
draft: false
description: "Some real-life Blowfish examples."
description: "一些正在使用 Blowfish 的真实案例"
slug: "users"
tags: ["users", "sample"]
tags: ["友链", "示例"]
showDate: false
showAuthor: false
showReadingTime: false