Skip to content

Commit ad39de6

Browse files
authored
Merge pull request #35760 from windsonsea/stycon
[zh-cn] updated style/content-organization.md
2 parents c8f71a9 + b8d328b commit ad39de6

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

content/zh-cn/docs/contribute/style/content-organization.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ This site uses Hugo. In Hugo, [content
1616
organization](https://gohugo.io/content-management/organization/) is a core
1717
concept.
1818
-->
19-
本网站使用了 Hugo。在 Hugo 中,[内容组织](https://gohugo.io/content-management/organization/) 是一个核心概念。
19+
本网站使用了 Hugo。在 Hugo 中,[内容组织](https://gohugo.io/content-management/organization/)是一个核心概念。
2020

2121
<!-- body -->
22+
2223
<!--
2324
**Hugo Tip:** Start Hugo with `hugo server -navigateToChanged` for content edit-sessions.
2425
-->
25-
2626
{{< note >}}
2727
**Hugo 提示:**`hugo server --navigateToChanged` 命令启动 Hugo 以进行内容编辑会话。
2828
{{< /note >}}
@@ -36,7 +36,6 @@ The documentation side menu, the documentation page browser etc. are listed usin
3636
3737
Given that, if you want to move a page or a section up, set a weight in the page's front matter:
3838
-->
39-
4039
## 页面列表
4140

4241
### 页面顺序
@@ -55,7 +54,7 @@ weight: 10
5554
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.
5655
-->
5756
{{< note >}}
58-
对于页面的权重,不建议使用连续的数值,比如1、2、3...,而应采用间隔的数值,比如10、20、30...
57+
对于页面的权重,不建议使用连续的数值,比如 1、2、3...,而应采用其他间隔的数值,比如 10、20、30...
5958
这样将来你可以将其他页面插入到想要的位置。
6059
{{< /note >}}
6160
@@ -66,7 +65,7 @@ The `Documentation` main menu is built from the sections below `docs/` with the
6665
-->
6766
### 文档主菜单
6867

69-
`文档` 主菜单是从 `docs/` 下面的章节构建的。
68+
`文档`主菜单是从 `docs/` 下面的章节构建的。
7069
这些章节在其章节内容文件 `_index.md` 的头部设置了 `main_menu` 标志:
7170

7271
```yaml
@@ -87,10 +86,9 @@ linkTitle: Title used in links
8786
<!--
8887
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.
8988
-->
90-
9189
{{< note >}}
92-
以上操作需要为每种语言分别完成。如果在菜单中没有看到你的章节,这可能是因为它没有被 Hugo 识别为一个章节。
93-
请在章节对应的目录下创建 `_index.md` 内容文件。
90+
你需要分别针对每种语言完成上述操作。如果在菜单中没有看到你的章节,这可能是因为它没有被 Hugo 识别为一个章节。
91+
请在该章节对应的目录下创建 `_index.md` 内容文件。
9492
{{< /note >}}
9593

9694
<!--
@@ -106,7 +104,7 @@ When you navigate to a section that has content, the specific section or page (e
106104
-->
107105
### 文档侧方菜单
108106

109-
文档侧方菜单是基于 `docs/` 下面的 _当前章节的内容树_ 构建的。
107+
文档侧方菜单是基于 `docs/` 下面的 **当前章节的内容树** 构建的。
110108

111109
菜单默认显示所有的章节和它们的页面。
112110

@@ -144,7 +142,7 @@ The site links in the top-right menu -- and also in the footer -- are built by p
144142
### 主菜单
145143

146144
右上菜单中的网站链接(也出现在页脚中)是通过页面查找构建的。
147-
这是为了确保页面实际存在。因此,如果 `case-studies` 章节在网站(或者其本地化版本)中不存在,
145+
这是为了确保页面实际存在。因此,如果`案例分析`章节在网站(或者其本地化版本)中不存在,
148146
则不会出现对应的链接。
149147

150148
<!--
@@ -156,15 +154,15 @@ One example is [Custom Hugo Shortcodes](/docs/contribute/style/hugo-shortcodes/)
156154
-->
157155
## 页面包
158156

159-
除了独立的内容页面(Markdown 文件),Hugo 还支持
160-
[页面包](https://gohugo.io/content-management/page-bundles/)。
157+
除了独立的内容页面(Markdown 文件),
158+
Hugo 还支持[页面包](https://gohugo.io/content-management/page-bundles/)。
161159

162160
一个例子是[定制的 Hugo 短代码(shortcodes)](/zh-cn/docs/contribute/style/hugo-shortcodes/)。
163161
它被认为是 `leaf bundle`(叶子包)。
164162
目录下的所有内容,包括 `index.md`,都是包的一部分。此外还包括页面间相对链接、可被处理的图像等:
165163

166164
```bash
167-
en/docs/home/contribute/includes
165+
zh-cn/docs/home/contribute/includes
168166
├── example1.md
169167
├── example2.md
170168
├── index.md
@@ -178,7 +176,7 @@ Another widely used example is the `includes` bundle. It sets `headless: true` i
178176
这类包在页面头部设置 `headless: true`,意味着它没有得到自己的 URL。它只用于其他页面。
179177

180178
```bash
181-
en/includes
179+
zh-cn/includes
182180
├── default-storage-class-prereqs.md
183181
├── index.md
184182
├── partner-script.js
@@ -198,21 +196,20 @@ Some important notes to the files in the bundles:
198196
有关包中文件的一些重要说明:
199197

200198
* 已翻译的包会从上面的语言继承所有缺失的、非内容文件。这一设计可以避免重复。
201-
* 包中的所有文件都是 Hugo 所指的 `Resources`,你可以为用不同语言为其提供元数据
202-
例如参数和标题,即使它不支持头部设置(YAML 文件等)
199+
* 包中的所有文件都是 Hugo 所指的 `Resources`,即使某个语言不支持头部设置(YAML 文件等)
200+
你也可以为每个语言提供诸如参数和标题等元数据
203201
参见[页面资源元数据](https://gohugo.io/content-management/page-resources/#page-resources-metadata)。
204202
* 从 `Resource` 的 `.RelPermalink` 中获得的值是相对于当前页面的。
205203
参见 [Permalinks](https://gohugo.io/content-management/urls/#permalinks)。
206204

207205
<!--
208206
## Styles
209207

210-
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).
208+
The [SASS](https://sass-lang.com/) source of the stylesheets for this site is stored in `assets/sass` and is automatically built by Hugo.
211209
-->
212210
## 样式 {#styles}
213211

214-
网站的样式表的 `SASS` 源文件存储在 `src/sass` 下面,可以用 `make sass` 构建
215-
(Hugo 很快就提供 `SASS` 的支持,参见 https://github.com/gohugoio/hugo/issues/4243)。
212+
本网站的样式表的 [SASS](https://sass-lang.com/) 源文件存放在 `src/sass` 下面,并通过 Hugo 自动构建。
216213

217214
## {{% heading "whatsnext" %}}
218215

@@ -221,7 +218,6 @@ The `SASS` source of the stylesheets for this site is stored below `src/sass` an
221218
* Learn about the [Style guide](/docs/contribute/style/style-guide)
222219
* Learn about the [Content guide](/docs/contribute/style/content-guide)
223220
-->
224-
225221
* 了解[定制 Hugo 短代码](/zh-cn/docs/contribute/style/hugo-shortcodes/)
226222
* 了解[样式指南](/zh-cn/docs/contribute/style/style-guide)
227223
* 了解[内容指南](/zh-cn/docs/contribute/style/content-guide)

0 commit comments

Comments
 (0)