mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-20 18:41:53 +02:00
add translation for new shortcode
This commit is contained in:
parent
f65cc799c8
commit
5a5a856832
5 changed files with 222 additions and 102 deletions
|
@ -1233,19 +1233,19 @@ select {
|
|||
margin-bottom:0.75em
|
||||
}
|
||||
|
||||
.prose :where(.prose > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
||||
.prose :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
||||
margin-top:1.25em
|
||||
}
|
||||
|
||||
.prose :where(.prose > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
||||
.prose :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
||||
margin-bottom:1.25em
|
||||
}
|
||||
|
||||
.prose :where(.prose > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
||||
.prose :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
||||
margin-top:1.25em
|
||||
}
|
||||
|
||||
.prose :where(.prose > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
||||
.prose :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
||||
margin-bottom:1.25em
|
||||
}
|
||||
|
||||
|
|
|
@ -77,10 +77,10 @@ This is an error!
|
|||
**Example:**
|
||||
|
||||
```md
|
||||
{{</* article link="/it/docs/welcome/" */>}}
|
||||
{{</* article link="/docs/welcome/" */>}}
|
||||
```
|
||||
|
||||
{{< article link="/it/docs/welcome/" >}}
|
||||
{{< article link="/docs/welcome/" >}}
|
||||
|
||||
<br/><br/><br/>
|
||||
|
||||
|
@ -188,6 +188,31 @@ 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. |
|
||||
|
||||
|
||||
<!-- 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" >}}
|
||||
|
||||
|
||||
<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.
|
||||
|
@ -739,16 +764,38 @@ A shortcut to embed youtube videos using the [lite-youtube-embed](https://github
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 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.
|
||||
|
|
|
@ -77,10 +77,10 @@ This is an error!
|
|||
**Example:**
|
||||
|
||||
```md
|
||||
{{</* article link="/ja/docs/welcome/" */>}}
|
||||
{{</* article link="/docs/welcome/" */>}}
|
||||
```
|
||||
|
||||
{{< article link="/ja/docs/welcome/" >}}
|
||||
{{< article link="/docs/welcome/" >}}
|
||||
|
||||
<br/><br/><br/>
|
||||
|
||||
|
@ -188,6 +188,31 @@ 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. |
|
||||
|
||||
|
||||
<!-- 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" >}}
|
||||
|
||||
|
||||
<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.
|
||||
|
@ -739,16 +764,38 @@ A shortcut to embed youtube videos using the [lite-youtube-embed](https://github
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 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.
|
||||
|
|
|
@ -188,6 +188,31 @@ 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. |
|
||||
|
||||
|
||||
<!-- 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" >}}
|
||||
|
||||
|
||||
<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.
|
||||
|
@ -522,31 +547,6 @@ This shortcode allows you to import markdown files from external sources. This i
|
|||
{{< mdimporter url="https://raw.githubusercontent.com/nunocoracao/nunocoracao/master/README.md" >}}
|
||||
|
||||
|
||||
<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. |
|
||||
|
||||
|
||||
<!-- 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" >}}
|
||||
|
||||
|
||||
<br/><br/>
|
||||
|
||||
## Mermaid
|
||||
|
|
|
@ -17,7 +17,7 @@ series_order: 8
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ----------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `icon` | **可选** 显示在左侧的图标。<br>**默认:** `exclaimation triangle icon` (查看[图标简码](#icon),了解有关使用图标的更多详细信息。) |
|
||||
| `iconColor` | **可选** 基本 CSS 样式中图标的颜色。<br>可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)<br>默认情况下由当前配色方案决定。 |
|
||||
| `cardColor` | **可选** 基本 CSS 样式中卡片背景的颜色。<br>可以是十六进制值 (`#FFFFFF`) 或颜色名称 (`white`)<br>默认情况下由当前配色方案决定。 |
|
||||
|
@ -70,7 +70,7 @@ This is an error!
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| --------- | -------------------------------------------------------- |
|
||||
| ------ | ------------------------------------- |
|
||||
| `link` | **必填** 要嵌入文章的 `.RelPermalink` |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
|
@ -126,7 +126,7 @@ Call to action
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| ------------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
| ------------- | --------------------------------------------------------------------- |
|
||||
| `images` | **必填** 用于匹配图像名称的正则表达式或 URL。 |
|
||||
| `aspectRatio` | **可选** 画廊的纵横比。`16-9` 、`21-9` 或`32-9` 。默认设置为`16-9` 。 |
|
||||
| `interval` | **可选** 自动滚动的时间间隔,以毫秒为单位指定。默认为`2000`(2 秒)。 |
|
||||
|
@ -188,6 +188,32 @@ data: {
|
|||
|
||||
<br/><br/><br/>
|
||||
|
||||
## Code Importer
|
||||
|
||||
此短代码用于轻松从外部源导入代码,无需复制和粘贴
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Parameter | Description |
|
||||
| --------- | ---------------------------------- |
|
||||
| `url` | **必需的** 外部托管代码文件的 URL. |
|
||||
| `type` | 用于语法突出显示的代码类型. |
|
||||
|
||||
|
||||
<!-- 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" >}}
|
||||
|
||||
|
||||
<br/><br/>
|
||||
|
||||
## Figure
|
||||
|
||||
Blowfish 包含一个 `figure` 简码,用于将图像添加到内容中。该简码取代了基本的 Hugo 功能,且性能更好。
|
||||
|
@ -198,7 +224,7 @@ Blowfish 包含一个 `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 格式的图像标题,将显示在图像下方。 |
|
||||
|
@ -298,7 +324,7 @@ Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| --------- | ----------------------------------------------------- |
|
||||
| ------ | ---------------------------------------------- |
|
||||
| `repo` | [String] 格式为 `username/repo` 的 github repo |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
|
@ -321,7 +347,7 @@ Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| ----------- | ----------------------------------------------------------------------- |
|
||||
| ----------- | ----------------------------------------------------------- |
|
||||
| `projectID` | [String] gitlab 数字项目ID |
|
||||
| `baseURL` | [String] 可选 gitlab 实例 URL,默认为 `https://gitlab.com/` |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
@ -387,7 +413,7 @@ Blowfish 还支持使用标准 Markdown 语法自动转换图像。只需使用
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| --------- | --------------------------------------- |
|
||||
| ------ | --------------------------- |
|
||||
| `icon` | **可选** 关键字中使用的图标 |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
|
@ -444,7 +470,7 @@ When life gives you lemons, make lemonade.
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ---------- | ------------------------------------------------------------------------------------------------------ |
|
||||
| `limit` | **必填** 要显示的最近文章数量。 |
|
||||
| `title` | **可选** 列表标题,默认为 `Recent` |
|
||||
| `cardView` | **可选** 列表启用卡片视图,默认为 `false` |
|
||||
|
@ -505,7 +531,7 @@ When life gives you lemons, make lemonade.
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| --------- | ------------------------------------------------------- |
|
||||
| ----- | --------------------------------------- |
|
||||
| `url` | **必填** 外部托管 Markdown 文件的 URL。 |
|
||||
|
||||
|
||||
|
@ -573,7 +599,7 @@ B-->C[Profit]
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| ----------- | -------------------------------------------- |
|
||||
| ----------- | ------------------------ |
|
||||
| `icon` | 要在时间线中使用的图标。 |
|
||||
| `header` | 每个条目的标题 |
|
||||
| `badge` | 放置在右上角徽章内的文本 |
|
||||
|
@ -659,7 +685,7 @@ Blowfish 使用简码实现 TypeIt 功能的子集。在 `typeit` 简码中编
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| ------------------ | ------------------------------------------------------------------------- |
|
||||
| `tag` | [String] 将用于呈现字符串的 `html` 标签。 |
|
||||
| `classList` | [String] 应用于 `html` 元素的 `css` 类列表。 |
|
||||
| `initialString` | [String] 将显示为先写入并将被替换的初始字符串。 |
|
||||
|
@ -738,7 +764,7 @@ consectetur adipiscing elit.
|
|||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| --------- | ----------------------------------- |
|
||||
| ------- | ----------------------------------- |
|
||||
| `id` | [String] 要嵌入的 YouTube 视频 ID。 |
|
||||
| `label` | [String] 视频的标签 |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
|
Loading…
Add table
Reference in a new issue