add translations

This commit is contained in:
smileguide 2024-04-04 13:30:26 +08:00
parent 92c13bdc85
commit 6193bdc5e3
4 changed files with 33 additions and 33 deletions

View file

@ -43,7 +43,7 @@
weight = 40
[[main]]
name = "客户样例"
name = "用户列表"
pageRef = "users"
weight = 90

View file

@ -11,7 +11,7 @@ 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 -->
| 名称 | 默认值 | 描述 |

View file

@ -9,13 +9,13 @@ 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 Analytics 和 Google Analytics 的内置支持。Fathom 是 Google Analytics 的付费替代品,尊重用户隐私。
### 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 Analytics 支持,只需在 `config/_default/params.toml` 文件中提供您的 Fathom 站点代码。如果您还使用 Fathom 的自定义域功能,并希望从您的域中提供脚本,还可以额外提供 `domain` 配置值。如果不提供 `domain` 值,脚本将直接从 Fathom DNS 加载。
```toml
# config/_default/params.toml
@ -27,9 +27,9 @@ To enable Fathom Analytics support, simply provide your Fathom site code in the
### Google Analytics
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.
Google Analytics 支持通过 Hugo 内部 partial 提供。只需在 `config/_default/config.toml` 文件中提供 `googleAnalytics` 密钥,脚本就会自动添加。
Both version 3 (analytics.js) and version 4 (gtag.js) are supported, based on the configuration value provided:
根据提供的配置值,版本 3analytics.js和版本 4gtag.js均可支持
```toml
# config/_default/config.toml
@ -40,23 +40,23 @@ googleAnalytics = "UA-PROPERTY_ID"
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.
如果您希望在网站上使用不同的分析提供商,也可以覆盖分析部分并提供自己的脚本。只需在项目中创建`layouts/partials/extend-head.html`文件,它就会自动将其包含在网站的`<head>`中。
## Comments
## 评论
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.
为了在文章中添加评论Blowfish 可在每篇文章页面底部引入评论 partial。只需提供一个 `layouts/partials/comments.html`即可,其中要包含显示所选评论所需的代码。
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.
您可以使用 Hugo 内置的 Disqus 模板,也可以提供自己的自定义代码。更多信息请参阅 [Hugo 文档](https://gohugo.io/content-management/comments/)。
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.
一旦提供了 partial就可以使用 "showComments "参数对评论在不同页面的显示与否进行更精细的控制。该值可以在 "params.toml"[配置文件]{{< ref "configuration#theme-parameters" >}})中进行主题级别的设置,也可以在[front matter]{{< ref "front-matter" >}})中按每篇文章设置。该参数的默认值为 "false",因此必须在其中一个位置将其设置为 "true",才能显示评论。
## Favicons
## Favicons 图标
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).
Blowfish 提供了一套默认的纯色图标供用户使用,但用户也可以提供自己的图标资源来覆盖这些图标。获取最新 favicon 资源的最简单方法是使用第三方提供商生成,如 [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.
图标资源应直接放在网站的 `static/` 文件夹中,并按以下列表命名。如果使用 [favicon.io](https://favicon.io),这些文件名将自动为您生成,但您也可以根据需要提供自己的资源。
```shell
static/
@ -69,11 +69,11 @@ 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.
或者,您也可以完全覆盖默认的 favicon 行为,提供自己的 favicon HTML 标签和资源。只需在项目中提供一个 `layouts/partials/favicons.html` 文件,该文件就会被加入网站的 `<head>` 中,取代默认资源。
## Icon
## Icon 图标
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.
与 [图标简码]{{< ref "shortcodes#icon" >}})类似,您也可以通过使用 Blowfish 的 `icon.html` partial在自己的模板和 partial 中加入图标。该部分包含一个参数,即要包含的图标名称。
**Example:**
@ -81,22 +81,22 @@ Similar to the [icon shortcode]({{< ref "shortcodes#icon" >}}), you can include
{{ 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.
图标使用 Hugo pipelines 填充因此非常灵活。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 partial by using the SVG filename without the `.svg` extension.
可以通过在项目的 `assets/icons/` 目录中提供自己的图标资源来添加自定义图标。然后,可以通过使用 SVG 文件名(不含`.svg`扩展名)在局部中引用图标。
Icons can also be used in article content by calling the [icon shortcode]({{< ref "shortcodes#icon" >}}).
图标还可通过调用[图标简码]{{< ref "shortcode#icon" >}})在文章内容中使用。
## Extensions
## 扩展
Blowfish also provides for a number of extension partials that allow for expanding upon base functionality.
Blowfish 还提供了许多扩展 partial可以扩展基本功能。
### Article link
### 文章链接
If you wish to insert additional code after article links, create a `layouts/partials/extend-article-link.html` file. This is especially powerful when combined with the [`badge`]({{< ref "shortcodes#badge" >}}) shortcode which can be used to highlight metadata for certain articles.
如果您希望在文章链接后插入附加代码,请创建一个 `layouts/partials/extend-article-link.html` 文件。如果与[`badge`]({{< ref "shortcodes#badge" >}})简码结合使用,该功能将尤为强大,可用于突出显示某些文章的元数据。
### Head and Footer
### 页眉和页脚
The theme allows for inserting additional code directly into the `<head>` and `<footer>` sections of the template. These can be useful for providing scripts or other logic that isn't part of the theme.
本主题允许在模板的`<head>`和`<footer>`部分直接插入附加代码。这些代码可用于提供不属于主题的脚本或其他逻辑。
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.
只需创建`layouts/partials/extend-head.html`或`layouts/partials/extend-footer.html`,这些部分就会自动包含在网站构建中。这两个 partial 将作为最后一项注入到 `<head>``<footer>` 中,因此它们可用于覆盖主题默认值。

View file

@ -1,8 +1,8 @@
---
title: "友链"
title: "用户列表"
date: 2020-08-14
draft: false
description: "一些正在使用 Blowfish 的真实案例"
description: "一些使用 Blowfish 主题的样例"
slug: "users"
tags: ["友链", "示例"]
showDate: false
@ -14,11 +14,11 @@ cardViewScreenWidth: true
---
使用 Blowfish 构建的客户案例。点击[这里](/users/users.json)查看完整列表。
这里有使用 Blowfish 构建的网站实例。点击[这里](/users/users.json)以 JSON 形式查看完整列表。
{{< alert >}}
**您是 Blowfish 用户 ** 请在这个列表中添加您的站点, [提交 PR](https://github.com/nunocoracao/blowfish/blob/main/exampleSite/content/users/users.json).
**您是 Blowfish 用户?** [提交 PR](https://github.com/nunocoracao/blowfish/blob/main/exampleSite/content/users/users.json)来把你的网站加入此列表。
{{</ alert >}}