diff --git a/README.md b/README.md index 282806fcf..f2ea087e6 100644 --- a/README.md +++ b/README.md @@ -145,3 +145,16 @@ Total in 2396 ms #### Get the already built static content You will find the previously generated content in the `public` directory. + + +## Create Docs PDF + +``` +hugo +``` + +``` +cat ./public/all-docs/index.html | wkhtmltopdf --outline-depth 2 --enable-internal-links - ./static/pdf/all-docs.pdf + +cat ./public/zh/all-docs/index.html | wkhtmltopdf --outline-depth 2 --enable-internal-links - ./static/pdf/all-docs-zh.pdf +``` \ No newline at end of file diff --git a/config/_default/config.toml b/config/_default/config.toml index d99090c50..174934129 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -1,4 +1,4 @@ -baseURL = "https://kubesphere-v3.netlify.app" +baseURL = "https://kubesphere.io" enableRobotsTXT = true diff --git a/content/en/all-docs/_index.md b/content/en/all-docs/_index.md new file mode 100644 index 000000000..e69de29bb diff --git a/content/zh/all-docs/_index.md b/content/zh/all-docs/_index.md new file mode 100644 index 000000000..e69de29bb diff --git a/i18n/en.yaml b/i18n/en.yaml index 6868a89c4..c4dc39a71 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -60,6 +60,8 @@ translation: Last updated - id: What’s on this Page translation: What’s on this Page +- id: Content + translation: Content - id: Previous translation: Previous - id: Next diff --git a/i18n/zh.yaml b/i18n/zh.yaml index 273531b45..cbbeda6b9 100644 --- a/i18n/zh.yaml +++ b/i18n/zh.yaml @@ -60,6 +60,8 @@ translation: 最新更新 - id: What’s on this Page translation: 页面内容 +- id: Content + translation: 目录 - id: Previous translation: 上一篇 - id: Next @@ -129,4 +131,4 @@ - id: Install on Kubernetes translation: 在 Kubernetes 安装 - id: Install on Linux - translation: 在 Linux 安装 \ No newline at end of file + translation: 在 Linux 安装 diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html new file mode 100644 index 000000000..91d49c375 --- /dev/null +++ b/layouts/_default/_markup/render-image.html @@ -0,0 +1,7 @@ +
+ {{ if strings.HasPrefix .Destination "http" }}
+
+ {{ else }}
+
+ {{ end }}
+
{{ .context.Description }}
- {{ $count := add .count 1 }} - {{ if .context.IsSection }} - {{ range (union (where .context.Pages ".context.Params._build.render" "!=" false) .context.Sections).ByWeight }} - {{ template "content" (dict "context" . "count" $count) }} - {{ end }} - {{ else}} - {{ end }} - {{ end }}{{ .Description }}
{{ end }}