Skip to content

Commit a11cb0d

Browse files
authored
feat: support i18n (#4)
* support i18n * update link * update link
1 parent 1975504 commit a11cb0d

File tree

3 files changed

+16
-39
lines changed

3 files changed

+16
-39
lines changed

i18n/zh.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[get-started]
2-
other = "快速开始"
2+
other = "快速开始"
3+

layouts/index.bak.html

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,22 @@ <h1 class="mt-0">{{ .Title }}</h1>
1313
{{ end }}
1414

1515
{{ define "sidebar-prefooter" }}
16-
{{ if eq $.Site.Language "en" }}
17-
<section class="section section-sm">
18-
<div class="container">
19-
<div class="row justify-content-center text-center">
20-
<div class="col-lg-5">
21-
<h2 class="h4">Security aware</h2>
22-
<p>Get A+ scores on <a href="https://observatory.mozilla.org/analyze/openingo.org">Mozilla Observatory</a> out of the box. Easily change the default Security Headers to suit your needs.</p>
23-
</div>
24-
<div class="col-lg-5">
25-
<h2 class="h4">Fast by default ⚡️</h2>
26-
<p>Get 100 scores on <a href="https://googlechrome.github.io/lighthouse/viewer/?gist=92eaa982d7dbf92f94fe8ecc03987c9a">Google Lighthouse</a> by default. Doks removes unused css, prefetches links, and lazy loads images.</p>
27-
</div>
28-
<div class="col-lg-5">
29-
<h2 class="h4">SEO-ready</h2>
30-
<p>Use sensible defaults for structured data, open graph, and Twitter cards. Or easily change the SEO settings to your liking.</p>
31-
</div>
16+
<section class="section section-sm">
17+
<div class="container">
18+
<!-- one line -->
19+
<div class="row justify-content-center text-center">
20+
<!-- one item -->
21+
<div class="col-lg-5">
22+
<h2 class="h4">godkits🔥</h2>
23+
<p>go development toolkits, god development toolkits🔥</p>
3224
</div>
33-
<div class="row justify-content-center text-center">
34-
<div class="col-lg-5">
35-
<h2 class="h4">Full text search</h2>
36-
<p>Search your Doks site with FlexSearch. Easily customize index settings and search options to your liking.</p>
37-
</div>
38-
<div class="col-lg-5">
39-
<h2 class="h4">Page layouts</h2>
40-
<p>Build pages with a landing page, blog, or documentation layout. Add custom sections and components to suit your needs.</p>
41-
</div>
42-
<div class="col-lg-5">
43-
<h2 class="h4">Dark mode</h2>
44-
<p>Switch to a low-light UI with the click of a button. Change colors with variables to match your branding.</p>
45-
</div>
25+
<div class="col-lg-5">
26+
<h2 class="h4">spring-boot-x🔥</h2>
27+
<p>spring-boot extensions</p>
4628
</div>
4729
</div>
48-
</section>
49-
{{ end }}
30+
</div>
31+
</section>
5032
{{ end }}
5133

5234
{{ define "sidebar-footer" }}

layouts/index.html

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,13 @@ <h1 class="mt-0">{{ .Title }}</h1>
66
</div>
77
<div class="col-lg-9 col-xl-8 text-center">
88
<p class="lead">{{ .Params.lead | safeHTML }}</p>
9-
<a class="btn btn-primary btn-lg px-4 mb-2" href="/docs/introduction/" role="button">Get Started</a>
9+
<a class="btn btn-primary btn-lg px-4 mb-2" href="{{ .Site.Params.languageContextPath }}/docs/introduction/" role="button" title="{{ i18n "get-started" }}">{{ i18n "get-started" }}</a>
1010
</div>
1111
</div>
1212
</section>
1313
{{ end }}
1414

1515
{{ define "sidebar-prefooter" }}
16-
{{ if eq $.Site.Language "en" }}
17-
<section class="section section-sm">
18-
<div class="container">
19-
</div>
20-
</section>
21-
{{ end }}
2216
{{ end }}
2317

2418
{{ define "sidebar-footer" }}

0 commit comments

Comments
 (0)