You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,52 +13,94 @@ This repository contains the assets required to build the [Kubernetes website an
13
13
我们非常高兴您想要参与贡献!
14
14
15
15
<!--
16
-
## Running the website locally using Hugo
16
+
# Using this repository
17
17
18
-
See the [official Hugo documentation](https://gohugo.io/getting-started/installing/) for Hugo installation instructions. Make sure to install the Hugo extended version specified by the `HUGO_VERSION` environment variable in the [`netlify.toml`](netlify.toml#L10) file.
18
+
You can run the website locally using Hugo (Extended version), or you can run it in a container runtime. We strongly recommend using the container runtime, as it gives deployment consistency with the live website.
19
19
-->
20
-
## 在本地使用 Hugo 来运行网站
20
+
## 使用这个仓库
21
21
22
-
请参考 [Hugo 的官方文档](https://gohugo.io/getting-started/installing/)了解 Hugo 的安装指令。
**Note:** The Kubernetes website deploys the [Docsy Hugo theme](https://github.com/google/docsy#readme).
39
-
If you have not updated your website repository, the `website/themes/docsy` directory is empty.
40
-
The site cannot build without a local copy of the theme.
41
-
42
-
Update the website theme:
55
+
The Kubernetes website uses the [Docsy Hugo theme](https://github.com/google/docsy#readme). Even if you plan to run the website in a container, we strongly recommend pulling in the submodule and other development dependencies by running the following:
43
56
-->
44
-
**注意:** Kubernetes 网站要部署 [Docsy Hugo 主题](https://github.com/google/docsy#readme).
45
-
如果你还没有更新你本地的 website 仓库,目录 `website/themes/docsy`
46
-
会是空目录。
47
-
在本地没有主题副本的情况下,网站无法正常构造。
48
57
49
-
使用下面的命令更新网站主题:
58
+
Kubernetes 网站使用的是 [Docsy Hugo 主题](https://github.com/google/docsy#readme)。 即使你打算在容器中运行网站,我们也强烈建议你通过运行以下命令来引入子模块和其他开发依赖项:
50
59
51
-
```bash
60
+
```
61
+
# pull in the Docsy submodule
52
62
git submodule update --init --recursive --depth 1
53
63
```
54
64
55
65
<!--
66
+
## Running the website using a container
67
+
68
+
To build the site in a container, run the following to build the container image and run it:
69
+
70
+
-->
71
+
## 在容器中运行网站
72
+
73
+
要在容器中构建网站,请通过以下命令来构建容器镜像并运行:
74
+
75
+
```
76
+
make container-image
77
+
make container-serve
78
+
```
79
+
80
+
<!--
81
+
Open up your browser to http://localhost:1313 to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.
82
+
-->
83
+
启动浏览器,打开 http://localhost:1313 来查看网站。
84
+
当你对源文件作出修改时,Hugo 会更新网站并强制浏览器执行刷新操作。
85
+
86
+
<!--
87
+
## Running the website locally using Hugo
88
+
89
+
Make sure to install the Hugo extended version specified by the `HUGO_VERSION` environment variable in the [`netlify.toml`](netlify.toml#L10) file.
@@ -68,6 +110,63 @@ This will start the local Hugo server on port 1313. Open up your browser to http
68
110
启动浏览器,打开 http://localhost:1313 来查看网站。
69
111
当你对源文件作出修改时,Hugo 会更新网站并强制浏览器执行刷新操作。
70
112
113
+
<!--
114
+
## Troubleshooting
115
+
### error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
116
+
117
+
Hugo is shipped in two set of binaries for technical reasons. The current website runs based on the **Hugo Extended** version only. In the [release page](https://github.com/gohugoio/hugo/releases) look for archives with `extended` in the name. To confirm, run `hugo version` and look for the word `extended`.
118
+
119
+
-->
120
+
## 故障排除
121
+
122
+
### error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
@@ -95,7 +194,7 @@ You can click the **Fork** button in the upper-right area of the screen to creat
95
194
96
195
Once your pull request is created, a Kubernetes reviewer will take responsibility for providing clear, actionable feedback. As the owner of the pull request, **it is your responsibility to modify your pull request to address the feedback that has been provided to you by the Kubernetes reviewer.**
97
196
-->
98
-
##为文档做贡献
197
+
# 为文档做贡献
99
198
100
199
你也可以点击屏幕右上方区域的 **Fork** 按钮,在你自己的 GitHub
101
200
账号下创建本仓库的拷贝。此拷贝被称作 *fork*。
@@ -133,7 +232,7 @@ For more information about contributing to the Kubernetes documentation, see:
@@ -146,15 +245,15 @@ For more information about contributing to the Kubernetes documentation, see:
146
245
147
246
Participation in the Kubernetes community is governed by the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
0 commit comments