Skip to content

Commit 2b74076

Browse files
jverceAndygol
andcommitted
Add minimum setup for the Ukrainian translation
* Add `uk` entry to the languages config (disabled for now) * Add the Ukrainian translation of the homepage * Add `404 Not Found` page and redirect all `/uk/*` URLs to it * Make the build/serve commands output i18n warnings * Add configuration files for English and Ukrainian languages, including site parameters and navigation menus * Move global repository configuration URLs to config files * Add `latest_stable_version` parameter to the `config.yaml` file * Add NPM command to serve with debug logs Signed-off-by: Jay Vercellone <[email protected]> Co-authored-by: Andrii Holovin <[email protected]>
1 parent de58fb1 commit 2b74076

File tree

16 files changed

+457
-138
lines changed

16 files changed

+457
-138
lines changed

config/_default/config.yaml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
baseURL: https://etcd.io
3+
enableRobotsTxt: true
4+
5+
module:
6+
replacements: 'github.com/FortAwesome/Font-Awesome -> ., github.com/twbs/bootstrap -> .'
7+
imports:
8+
- path: docsy
9+
10+
themesDir: "node_modules" # docsy is installed via npm
11+
12+
# Will give values to .Lastmod etc.
13+
enableGitInfo: true
14+
15+
# Language settings
16+
contentDir: content/en
17+
defaultContentLanguage: en
18+
defaultContentLanguageInSubdir: false
19+
languageCode: en-us
20+
googleAnalytics: G-VF9H3EHMDK
21+
22+
# Useful when translating.
23+
enableMissingTranslationPlaceholders: true
24+
25+
disableKinds: [taxonomy, term]
26+
27+
# Highlighting config
28+
pygmentsCodeFences: true
29+
pygmentsUseClasses: false
30+
# Use the new Chroma Go highlighter in Hugo.
31+
#pygmentsOptions = "linenos=table"
32+
# See https://help.farbox.com/pygments.html
33+
pygmentsStyle: fruity # "tango"
34+
35+
# Image processing configuration.
36+
imaging:
37+
resampleFilter: CatmullRom
38+
quality: 75
39+
anchor: smart
40+
41+
markup:
42+
goldmark:
43+
renderer:
44+
unsafe: true
45+
extensions:
46+
typographer:
47+
enDash: '--'
48+
highlight:
49+
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
50+
style: tango
51+
# Uncomment if you want your chosen highlight style used for code blocks without a specified language
52+
# guessSyntax: true
53+
54+
# Everything below this are Site Params
55+
56+
params:
57+
58+
# Enable Algolia DocSearch
59+
algolia_docsearch: false
60+
61+
# Enable Lunr.js offline search
62+
offlineSearch: true
63+
64+
# Enable syntax highlighting and copy buttons on code blocks with Prism
65+
prism_syntax_highlighting: false
66+
67+
latest_stable_version: v3.5
68+
69+
# User interface configuration
70+
ui:
71+
sidebar_menu_compact: true
72+
sidebar_search_disable: true
73+
navbar_logo: true
74+
footer_about_enable: false
75+
navbar_translucent_over_cover_disable: true
76+
77+
# Adds a reading time to the top of each doc.
78+
# If you want this feature, but occasionally need to remove the Reading time from a single page,
79+
# add "hide_readingtime: true" to the page's front matter
80+
readingtime:
81+
enable: false
82+
83+
# [params.logos]
84+
hero: >-
85+
https://raw.githubusercontent.com/cncf/artwork/master/projects/etcd/horizontal/white/etcd-horizontal-white.png
86+
87+
# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
88+
github_repo: https://github.com/etcd-io/website
89+
github_branch: main
90+
91+
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
92+
github_project_repo: https://github.com/etcd-io/etcd
93+
94+
mediaTypes:
95+
text/netlify: {}
96+
97+
outputFormats:
98+
REDIRECTS:
99+
mediaType: text/netlify
100+
baseName: _redirects
101+
notAlternative: true
102+
103+
outputs:
104+
home: [HTML, REDIRECTS, RSS]
105+
Lines changed: 8 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,12 @@
1-
---
2-
baseURL: https://etcd.io
3-
enableRobotsTxt: true
4-
5-
module:
6-
replacements: 'github.com/FortAwesome/Font-Awesome -> ., github.com/twbs/bootstrap -> .'
7-
imports:
8-
- path: docsy
9-
10-
themesDir: "node_modules" # docsy is installed via npm
11-
12-
# Will give values to .Lastmod etc.
13-
enableGitInfo: true
14-
15-
# Language settings
1+
title: etcd
2+
languageName: English (en)
163
contentDir: content/en
17-
defaultContentLanguage: en
18-
defaultContentLanguageInSubdir: false
19-
languageCode: en-us
20-
googleAnalytics: G-VF9H3EHMDK
21-
22-
# Useful when translating.
23-
enableMissingTranslationPlaceholders: true
24-
25-
disableKinds: [taxonomy, term]
26-
27-
# Highlighting config
28-
pygmentsCodeFences: true
29-
pygmentsUseClasses: false
30-
# Use the new Chroma Go highlighter in Hugo.
31-
#pygmentsOptions = "linenos=table"
32-
# See https://help.farbox.com/pygments.html
33-
pygmentsStyle: fruity # "tango"
34-
35-
# Image processing configuration.
36-
imaging:
37-
resampleFilter: CatmullRom
38-
quality: 75
39-
anchor: smart
40-
41-
languages:
42-
en:
43-
title: etcd
44-
languageName: English
45-
contentDir: content/en
46-
weight: 1
47-
params:
48-
description: >-
49-
A distributed, reliable key-value store for the most critical data of a
50-
distributed system
51-
52-
markup:
53-
goldmark:
54-
renderer:
55-
unsafe: true
56-
extensions:
57-
typographer:
58-
enDash: '--'
59-
highlight:
60-
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
61-
style: tango
62-
# Uncomment if you want your chosen highlight style used for code blocks without a specified language
63-
# guessSyntax: true
64-
65-
# Everything below this are Site Params
66-
4+
weight: 1
675
params:
6+
description: >-
7+
A distributed, reliable key-value store for the most critical data of a
8+
distributed system
9+
6810
copyright:
6911
from_year: 2013
7012
authors: |
@@ -78,34 +20,14 @@ params:
7820
<a href="https://github.com/etcd-io/website/blob/main/LICENSE" target="_blank" rel="noopener">License</a>
7921
</div>
8022
</div>
81-
description: >-
82-
A distributed, reliable key-value store for the most critical data of a
83-
distributed system
84-
85-
# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
86-
github_repo: https://github.com/etcd-io/website
87-
github_branch: main
88-
89-
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
90-
github_project_repo: https://github.com/etcd-io/etcd
91-
92-
# Enable Algolia DocSearch
93-
algolia_docsearch: false
94-
95-
# Enable Lunr.js offline search
96-
offlineSearch: true
97-
98-
# Enable syntax highlighting and copy buttons on code blocks with Prism
99-
prism_syntax_highlighting: false
10023
10124
# Versions
10225

10326
# Menu title if your navbar has a versions selector to access old versions of your site.
10427
# This menu appears only if you have at least one [params.versions] set.
10528
version_menu: Versions
106-
latest_stable_version: v3.5
107-
version:
10829

30+
version:
10931
deprecation_warning: >-
11032
This version of etcd is no longer supported. For the latest version, please see the [latest stable version](/docs/latest/).
11133
versions:
@@ -132,12 +54,6 @@ params:
13254

13355
# User interface configuration
13456
ui:
135-
sidebar_menu_compact: true
136-
sidebar_search_disable: true
137-
navbar_logo: true
138-
footer_about_enable: false
139-
navbar_translucent_over_cover_disable: true
140-
14157
# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
14258
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
14359
# If you want this feature, but occasionally need to remove the "Feedback" section from a single page,
@@ -154,12 +70,6 @@ params:
15470
href="https://github.com/etcd-io/website/issues/new">tell us how we
15571
can improve</a>.
15672
157-
# Adds a reading time to the top of each doc.
158-
# If you want this feature, but occasionally need to remove the Reading time from a single page,
159-
# add "hide_readingtime: true" to the page's front matter
160-
readingtime:
161-
enable: false
162-
16373
# Footer Links
16474
links:
16575
# End user relevant links. These will show up on left side of footer and in the community page if you have one.
@@ -181,31 +91,3 @@ params:
18191
- name: Etcd.io on GitHub
18292
url: https://github.com/etcd-io/website
18393
icon: fab fa-github
184-
# [params.logos]
185-
hero: >-
186-
https://raw.githubusercontent.com/cncf/artwork/master/projects/etcd/horizontal/white/etcd-horizontal-white.png
187-
188-
mediaTypes:
189-
text/netlify: {}
190-
191-
outputFormats:
192-
REDIRECTS:
193-
mediaType: text/netlify
194-
baseName: _redirects
195-
notAlternative: true
196-
197-
outputs:
198-
home: [HTML, REDIRECTS, RSS]
199-
200-
# Site menu (partial -- also see pages with 'menu' in front matter)
201-
menu:
202-
main:
203-
- name: Docs
204-
url: /docs/latest/
205-
weight: -10
206-
- name: Blog
207-
pageref: /blog/
208-
- name: Install
209-
url: /docs/latest/install/
210-
- name: Play
211-
url: http://play.etcd.io/play

config/_default/language.uk.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
title: etcd
2+
languageName: Українська (uk)
3+
contentDir: content/uk
4+
weight: 2
5+
disabled: true
6+
params:
7+
description: >-
8+
Розподілене, надійне сховище ключ-значення для найважливіших даних розподіленої системи
9+
10+
copyright:
11+
from_year: 2013
12+
authors: |
13+
Автори etcd
14+
<div class="row text-center text-white small">
15+
<div class="col-12 text-center py-2 order-sm-2">
16+
<a href="https://www.linuxfoundation.org/terms" target="_blank" rel="noopener">Умови</a> |
17+
<a href="https://www.linuxfoundation.org/privacy" target="_blank" rel="noopener">Конфіденційність</a> |
18+
<a href="https://www.linuxfoundation.org/trademark-usage" target="_blank" rel="noopener">Товарні знаки</a> |
19+
<a href="https://github.com/etcd-io/website/blob/main/LICENSE" target="_blank" rel="noopener">Ліцензія</a>
20+
</div>
21+
</div>
22+
23+
version_menu: Версії
24+
25+
version:
26+
deprecation_warning: >-
27+
Ця версія etcd більше не підтримується. Останню версію див. у [остання
28+
стабільна версія](/docs/latest/).
29+
versions:
30+
- version: v3.5
31+
url: /uk/docs/v3.5/
32+
33+
ui:
34+
feedback:
35+
'yes': >-
36+
Раді чути! Будь ласка, <a
37+
href="https://github.com/etcd-io/website/issues/new">
38+
повідомте нам, як ми можемо зробити краще</a>.
39+
'no': >-
40+
Дуже шкода це чути. Будь ласка, <a
41+
href="https://github.com/etcd-io/website/issues/new">
42+
повідомте нам, як ми можемо зробити краще</a>.
43+
44+
# Footer Links
45+
links:
46+
# End user relevant links. These will show up on left side of footer and in the community page if you have one.
47+
user:
48+
- name: Google Group
49+
url: https://groups.google.com/g/etcd-dev
50+
icon: fab fa-google
51+
- name: Twitter
52+
url: https://twitter.com/etcdio
53+
icon: fab fa-twitter
54+
- name: Github Discussions
55+
url: https://github.com/etcd-io/etcd/discussions
56+
icon: fab fa-github
57+
# Developer relevant links. These will show up on right side of footer and in the community page if you have one.
58+
developer:
59+
- name: Etcd на GitHub
60+
url: https://github.com/etcd-io/etcd
61+
icon: fab fa-github-square
62+
- name: Сайт Etcd.io на GitHub
63+
url: https://github.com/etcd-io/website
64+
icon: fab fa-github
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Site menu (partial -- also see pages with 'menu' in front matter)
2+
main:
3+
- name: Docs
4+
url: /docs/latest/
5+
weight: -10
6+
- name: Blog
7+
pageref: /blog/
8+
- name: Install
9+
url: /docs/latest/install/
10+
- name: Play
11+
url: http://play.etcd.io/play
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Site menu (partial -- also see pages with 'menu' in front matter)
2+
main:
3+
- name: Документація
4+
url: /docs/latest/
5+
weight: -10
6+
- name: Блог
7+
pageref: /blog/
8+
- name: Встановлення
9+
url: /docs/latest/install/
10+
- name: Спробувати
11+
url: http://play.etcd.io/play

content/en/_index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
---
1515

1616
{{< blocks/cover image_anchor="top" height="min" color="primary" >}}
17-
<img src="etcd-horizontal-white.png" class="site-logo" />
17+
<img src="/etcd-horizontal-white.png" class="site-logo" />
1818
<h2 class="mt-4">
1919
A distributed, reliable key-value store for the most critical data of a distributed system
2020
</h2>

0 commit comments

Comments
 (0)