Merge pull request #35760 from windsonsea/stycon
[zh-cn] updated style/content-organization.mdpull/35768/head
commit
ad39de62f1
|
@ -16,13 +16,13 @@ This site uses Hugo. In Hugo, [content
|
|||
organization](https://gohugo.io/content-management/organization/) is a core
|
||||
concept.
|
||||
-->
|
||||
本网站使用了 Hugo。在 Hugo 中,[内容组织](https://gohugo.io/content-management/organization/) 是一个核心概念。
|
||||
本网站使用了 Hugo。在 Hugo 中,[内容组织](https://gohugo.io/content-management/organization/)是一个核心概念。
|
||||
|
||||
<!-- body -->
|
||||
|
||||
<!--
|
||||
**Hugo Tip:** Start Hugo with `hugo server -navigateToChanged` for content edit-sessions.
|
||||
-->
|
||||
|
||||
{{< note >}}
|
||||
**Hugo 提示:** 用 `hugo server --navigateToChanged` 命令启动 Hugo 以进行内容编辑会话。
|
||||
{{< /note >}}
|
||||
|
@ -36,7 +36,6 @@ The documentation side menu, the documentation page browser etc. are listed usin
|
|||
|
||||
Given that, if you want to move a page or a section up, set a weight in the page's front matter:
|
||||
-->
|
||||
|
||||
## 页面列表
|
||||
|
||||
### 页面顺序
|
||||
|
@ -55,7 +54,7 @@ weight: 10
|
|||
For page weights, it can be smart not to use 1, 2, 3 ..., but some other interval, say 10, 20, 30... This allows you to insert pages where you want later.
|
||||
-->
|
||||
{{< note >}}
|
||||
对于页面的权重,不建议使用连续的数值,比如1、2、3...,而应采用间隔的数值,比如10、20、30...
|
||||
对于页面的权重,不建议使用连续的数值,比如 1、2、3...,而应采用其他间隔的数值,比如 10、20、30...
|
||||
这样将来你可以将其他页面插入到想要的位置。
|
||||
{{< /note >}}
|
||||
|
||||
|
@ -66,7 +65,7 @@ The `Documentation` main menu is built from the sections below `docs/` with the
|
|||
-->
|
||||
### 文档主菜单
|
||||
|
||||
`文档` 主菜单是从 `docs/` 下面的章节构建的。
|
||||
`文档`主菜单是从 `docs/` 下面的章节构建的。
|
||||
这些章节在其章节内容文件 `_index.md` 的头部设置了 `main_menu` 标志:
|
||||
|
||||
```yaml
|
||||
|
@ -87,10 +86,9 @@ linkTitle: Title used in links
|
|||
<!--
|
||||
The above needs to be done per language. If you don't see your section in the menu, it is probably because it is not identified as a section by Hugo. Create a `_index.md` content file in the section folder.
|
||||
-->
|
||||
|
||||
{{< note >}}
|
||||
以上操作需要为每种语言分别完成。如果在菜单中没有看到你的章节,这可能是因为它没有被 Hugo 识别为一个章节。
|
||||
请在章节对应的目录下创建 `_index.md` 内容文件。
|
||||
你需要分别针对每种语言完成上述操作。如果在菜单中没有看到你的章节,这可能是因为它没有被 Hugo 识别为一个章节。
|
||||
请在该章节对应的目录下创建 `_index.md` 内容文件。
|
||||
{{< /note >}}
|
||||
|
||||
<!--
|
||||
|
@ -106,7 +104,7 @@ When you navigate to a section that has content, the specific section or page (e
|
|||
-->
|
||||
### 文档侧方菜单
|
||||
|
||||
文档侧方菜单是基于 `docs/` 下面的 _当前章节的内容树_ 构建的。
|
||||
文档侧方菜单是基于 `docs/` 下面的 **当前章节的内容树** 构建的。
|
||||
|
||||
菜单默认显示所有的章节和它们的页面。
|
||||
|
||||
|
@ -144,7 +142,7 @@ The site links in the top-right menu -- and also in the footer -- are built by p
|
|||
### 主菜单
|
||||
|
||||
右上菜单中的网站链接(也出现在页脚中)是通过页面查找构建的。
|
||||
这是为了确保页面实际存在。因此,如果 `case-studies` 章节在网站(或者其本地化版本)中不存在,
|
||||
这是为了确保页面实际存在。因此,如果`案例分析`章节在网站(或者其本地化版本)中不存在,
|
||||
则不会出现对应的链接。
|
||||
|
||||
<!--
|
||||
|
@ -156,15 +154,15 @@ One example is [Custom Hugo Shortcodes](/docs/contribute/style/hugo-shortcodes/)
|
|||
-->
|
||||
## 页面包
|
||||
|
||||
除了独立的内容页面(Markdown 文件),Hugo 还支持
|
||||
[页面包](https://gohugo.io/content-management/page-bundles/)。
|
||||
除了独立的内容页面(Markdown 文件),
|
||||
Hugo 还支持[页面包](https://gohugo.io/content-management/page-bundles/)。
|
||||
|
||||
一个例子是[定制的 Hugo 短代码(shortcodes)](/zh-cn/docs/contribute/style/hugo-shortcodes/)。
|
||||
它被认为是 `leaf bundle`(叶子包)。
|
||||
目录下的所有内容,包括 `index.md`,都是包的一部分。此外还包括页面间相对链接、可被处理的图像等:
|
||||
|
||||
```bash
|
||||
en/docs/home/contribute/includes
|
||||
zh-cn/docs/home/contribute/includes
|
||||
├── example1.md
|
||||
├── example2.md
|
||||
├── index.md
|
||||
|
@ -178,7 +176,7 @@ Another widely used example is the `includes` bundle. It sets `headless: true` i
|
|||
这类包在页面头部设置 `headless: true`,意味着它没有得到自己的 URL。它只用于其他页面。
|
||||
|
||||
```bash
|
||||
en/includes
|
||||
zh-cn/includes
|
||||
├── default-storage-class-prereqs.md
|
||||
├── index.md
|
||||
├── partner-script.js
|
||||
|
@ -198,8 +196,8 @@ Some important notes to the files in the bundles:
|
|||
有关包中文件的一些重要说明:
|
||||
|
||||
* 已翻译的包会从上面的语言继承所有缺失的、非内容文件。这一设计可以避免重复。
|
||||
* 包中的所有文件都是 Hugo 所指的 `Resources`,你可以为用不同语言为其提供元数据,
|
||||
例如参数和标题,即使它不支持头部设置(YAML 文件等)。
|
||||
* 包中的所有文件都是 Hugo 所指的 `Resources`,即使某个语言不支持头部设置(YAML 文件等),
|
||||
你也可以为每个语言提供诸如参数和标题等元数据。
|
||||
参见[页面资源元数据](https://gohugo.io/content-management/page-resources/#page-resources-metadata)。
|
||||
* 从 `Resource` 的 `.RelPermalink` 中获得的值是相对于当前页面的。
|
||||
参见 [Permalinks](https://gohugo.io/content-management/urls/#permalinks)。
|
||||
|
@ -207,12 +205,11 @@ Some important notes to the files in the bundles:
|
|||
<!--
|
||||
## Styles
|
||||
|
||||
The `SASS` source of the stylesheets for this site is stored below `src/sass` and can be built with `make sass` (note that Hugo will get `SASS` support soon, see https://github.com/gohugoio/hugo/issues/4243).
|
||||
The [SASS](https://sass-lang.com/) source of the stylesheets for this site is stored in `assets/sass` and is automatically built by Hugo.
|
||||
-->
|
||||
## 样式 {#styles}
|
||||
|
||||
网站的样式表的 `SASS` 源文件存储在 `src/sass` 下面,可以用 `make sass` 构建
|
||||
(Hugo 很快就提供 `SASS` 的支持,参见 https://github.com/gohugoio/hugo/issues/4243)。
|
||||
本网站的样式表的 [SASS](https://sass-lang.com/) 源文件存放在 `src/sass` 下面,并通过 Hugo 自动构建。
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
@ -221,7 +218,6 @@ The `SASS` source of the stylesheets for this site is stored below `src/sass` an
|
|||
* Learn about the [Style guide](/docs/contribute/style/style-guide)
|
||||
* Learn about the [Content guide](/docs/contribute/style/content-guide)
|
||||
-->
|
||||
|
||||
* 了解[定制 Hugo 短代码](/zh-cn/docs/contribute/style/hugo-shortcodes/)
|
||||
* 了解[样式指南](/zh-cn/docs/contribute/style/style-guide)
|
||||
* 了解[内容指南](/zh-cn/docs/contribute/style/content-guide)
|
||||
|
|
Loading…
Reference in New Issue