diff --git a/config/_default/config.yaml b/config/_default/config.yaml
new file mode 100644
index 000000000..6d813a696
--- /dev/null
+++ b/config/_default/config.yaml
@@ -0,0 +1,105 @@
+---
+baseURL: https://etcd.io
+enableRobotsTxt: true
+
+module:
+ replacements: 'github.com/FortAwesome/Font-Awesome -> ., github.com/twbs/bootstrap -> .'
+ imports:
+ - path: docsy
+
+themesDir: "node_modules" # docsy is installed via npm
+
+# Will give values to .Lastmod etc.
+enableGitInfo: true
+
+# Language settings
+contentDir: content/en
+defaultContentLanguage: en
+defaultContentLanguageInSubdir: false
+languageCode: en-us
+googleAnalytics: G-VF9H3EHMDK
+
+# Useful when translating.
+enableMissingTranslationPlaceholders: true
+
+disableKinds: [taxonomy, term]
+
+# Highlighting config
+pygmentsCodeFences: true
+pygmentsUseClasses: false
+# Use the new Chroma Go highlighter in Hugo.
+#pygmentsOptions = "linenos=table"
+# See https://help.farbox.com/pygments.html
+pygmentsStyle: fruity # "tango"
+
+# Image processing configuration.
+imaging:
+ resampleFilter: CatmullRom
+ quality: 75
+ anchor: smart
+
+markup:
+ goldmark:
+ renderer:
+ unsafe: true
+ extensions:
+ typographer:
+ enDash: '--'
+ highlight:
+ # See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
+ style: tango
+ # Uncomment if you want your chosen highlight style used for code blocks without a specified language
+ # guessSyntax: true
+
+# Everything below this are Site Params
+
+params:
+
+ # Enable Algolia DocSearch
+ algolia_docsearch: false
+
+ # Enable Lunr.js offline search
+ offlineSearch: true
+
+ # Enable syntax highlighting and copy buttons on code blocks with Prism
+ prism_syntax_highlighting: false
+
+ latest_stable_version: v3.5
+
+ # User interface configuration
+ ui:
+ sidebar_menu_compact: true
+ sidebar_search_disable: true
+ navbar_logo: true
+ footer_about_enable: false
+ navbar_translucent_over_cover_disable: true
+
+ # Adds a reading time to the top of each doc.
+ # If you want this feature, but occasionally need to remove the Reading time from a single page,
+ # add "hide_readingtime: true" to the page's front matter
+ readingtime:
+ enable: false
+
+ # [params.logos]
+ hero: >-
+ https://raw.githubusercontent.com/cncf/artwork/master/projects/etcd/horizontal/white/etcd-horizontal-white.png
+
+ # Repository configuration (URLs for in-page links to opening issues and suggesting changes)
+ github_repo: https://github.com/etcd-io/website
+ github_branch: main
+
+ # An optional link to a related project repo. For example, the sibling repository where your product code lives.
+ github_project_repo: https://github.com/etcd-io/etcd
+
+mediaTypes:
+ text/netlify: {}
+
+outputFormats:
+ REDIRECTS:
+ mediaType: text/netlify
+ baseName: _redirects
+ notAlternative: true
+
+outputs:
+ home: [HTML, REDIRECTS, RSS]
+
diff --git a/config.yaml b/config/_default/language.en.yaml
similarity index 50%
rename from config.yaml
rename to config/_default/language.en.yaml
index 550840046..06edca2bb 100644
--- a/config.yaml
+++ b/config/_default/language.en.yaml
@@ -1,70 +1,12 @@
----
-baseURL: https://etcd.io
-enableRobotsTxt: true
-
-module:
- replacements: 'github.com/FortAwesome/Font-Awesome -> ., github.com/twbs/bootstrap -> .'
- imports:
- - path: docsy
-
-themesDir: "node_modules" # docsy is installed via npm
-
-# Will give values to .Lastmod etc.
-enableGitInfo: true
-
-# Language settings
+title: etcd
+languageName: English (en)
contentDir: content/en
-defaultContentLanguage: en
-defaultContentLanguageInSubdir: false
-languageCode: en-us
-googleAnalytics: G-VF9H3EHMDK
-
-# Useful when translating.
-enableMissingTranslationPlaceholders: true
-
-disableKinds: [taxonomy, term]
-
-# Highlighting config
-pygmentsCodeFences: true
-pygmentsUseClasses: false
-# Use the new Chroma Go highlighter in Hugo.
-#pygmentsOptions = "linenos=table"
-# See https://help.farbox.com/pygments.html
-pygmentsStyle: fruity # "tango"
-
-# Image processing configuration.
-imaging:
- resampleFilter: CatmullRom
- quality: 75
- anchor: smart
-
-languages:
- en:
- title: etcd
- languageName: English
- contentDir: content/en
- weight: 1
- params:
- description: >-
- A distributed, reliable key-value store for the most critical data of a
- distributed system
-
-markup:
- goldmark:
- renderer:
- unsafe: true
- extensions:
- typographer:
- enDash: '--'
- highlight:
- # See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
- style: tango
- # Uncomment if you want your chosen highlight style used for code blocks without a specified language
- # guessSyntax: true
-
-# Everything below this are Site Params
-
+weight: 1
params:
+ description: >-
+ A distributed, reliable key-value store for the most critical data of a
+ distributed system
+
copyright:
from_year: 2013
authors: |
@@ -78,34 +20,14 @@ params:
License
- description: >-
- A distributed, reliable key-value store for the most critical data of a
- distributed system
-
- # Repository configuration (URLs for in-page links to opening issues and suggesting changes)
- github_repo: https://github.com/etcd-io/website
- github_branch: main
-
- # An optional link to a related project repo. For example, the sibling repository where your product code lives.
- github_project_repo: https://github.com/etcd-io/etcd
-
- # Enable Algolia DocSearch
- algolia_docsearch: false
-
- # Enable Lunr.js offline search
- offlineSearch: true
-
- # Enable syntax highlighting and copy buttons on code blocks with Prism
- prism_syntax_highlighting: false
# Versions
# Menu title if your navbar has a versions selector to access old versions of your site.
# This menu appears only if you have at least one [params.versions] set.
version_menu: Versions
- latest_stable_version: v3.5
- version:
+ version:
deprecation_warning: >-
This version of etcd is no longer supported. For the latest version, please see the [latest stable version](/docs/latest/).
versions:
@@ -132,12 +54,6 @@ params:
# User interface configuration
ui:
- sidebar_menu_compact: true
- sidebar_search_disable: true
- navbar_logo: true
- footer_about_enable: false
- navbar_translucent_over_cover_disable: true
-
# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
# If you want this feature, but occasionally need to remove the "Feedback" section from a single page,
@@ -154,12 +70,6 @@ params:
href="https://github.com/etcd-io/website/issues/new">tell us how we
can improve.
- # Adds a reading time to the top of each doc.
- # If you want this feature, but occasionally need to remove the Reading time from a single page,
- # add "hide_readingtime: true" to the page's front matter
- readingtime:
- enable: false
-
# Footer Links
links:
# 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:
- name: Etcd.io on GitHub
url: https://github.com/etcd-io/website
icon: fab fa-github
- # [params.logos]
- hero: >-
- https://raw.githubusercontent.com/cncf/artwork/master/projects/etcd/horizontal/white/etcd-horizontal-white.png
-
-mediaTypes:
- text/netlify: {}
-
-outputFormats:
- REDIRECTS:
- mediaType: text/netlify
- baseName: _redirects
- notAlternative: true
-
-outputs:
- home: [HTML, REDIRECTS, RSS]
-
-# Site menu (partial -- also see pages with 'menu' in front matter)
-menu:
- main:
- - name: Docs
- url: /docs/latest/
- weight: -10
- - name: Blog
- pageref: /blog/
- - name: Install
- url: /docs/latest/install/
- - name: Play
- url: http://play.etcd.io/play
diff --git a/config/_default/language.uk.yaml b/config/_default/language.uk.yaml
new file mode 100644
index 000000000..2232a2d84
--- /dev/null
+++ b/config/_default/language.uk.yaml
@@ -0,0 +1,64 @@
+title: etcd
+languageName: Українська (uk)
+contentDir: content/uk
+weight: 2
+disabled: true
+params:
+ description: >-
+ Розподілене, надійне сховище ключ-значення для найважливіших даних розподіленої системи
+
+ copyright:
+ from_year: 2013
+ authors: |
+ Автори etcd
+
+
+ version_menu: Версії
+
+ version:
+ deprecation_warning: >-
+ Ця версія etcd більше не підтримується. Останню версію див. у [остання
+ стабільна версія](/docs/latest/).
+ versions:
+ - version: v3.5
+ url: /uk/docs/v3.5/
+
+ ui:
+ feedback:
+ 'yes': >-
+ Раді чути! Будь ласка,
+ повідомте нам, як ми можемо зробити краще.
+ 'no': >-
+ Дуже шкода це чути. Будь ласка,
+ повідомте нам, як ми можемо зробити краще.
+
+ # Footer Links
+ links:
+ # End user relevant links. These will show up on left side of footer and in the community page if you have one.
+ user:
+ - name: Google Group
+ url: https://groups.google.com/g/etcd-dev
+ icon: fab fa-google
+ - name: Twitter
+ url: https://twitter.com/etcdio
+ icon: fab fa-twitter
+ - name: Github Discussions
+ url: https://github.com/etcd-io/etcd/discussions
+ icon: fab fa-github
+ # Developer relevant links. These will show up on right side of footer and in the community page if you have one.
+ developer:
+ - name: Etcd на GitHub
+ url: https://github.com/etcd-io/etcd
+ icon: fab fa-github-square
+ - name: Сайт Etcd.io на GitHub
+ url: https://github.com/etcd-io/website
+ icon: fab fa-github
diff --git a/config/_default/navigation/menus.en.yaml b/config/_default/navigation/menus.en.yaml
new file mode 100644
index 000000000..cae257c39
--- /dev/null
+++ b/config/_default/navigation/menus.en.yaml
@@ -0,0 +1,11 @@
+# Site menu (partial -- also see pages with 'menu' in front matter)
+main:
+ - name: Docs
+ url: /docs/latest/
+ weight: -10
+ - name: Blog
+ pageref: /blog/
+ - name: Install
+ url: /docs/latest/install/
+ - name: Play
+ url: http://play.etcd.io/play
diff --git a/config/_default/navigation/menus.uk.yaml b/config/_default/navigation/menus.uk.yaml
new file mode 100644
index 000000000..594a2ceaf
--- /dev/null
+++ b/config/_default/navigation/menus.uk.yaml
@@ -0,0 +1,11 @@
+# Site menu (partial -- also see pages with 'menu' in front matter)
+main:
+ - name: Документація
+ url: /docs/latest/
+ weight: -10
+ - name: Блог
+ pageref: /blog/
+ - name: Встановлення
+ url: /docs/latest/install/
+ - name: Спробувати
+ url: http://play.etcd.io/play
diff --git a/content/en/_index.html b/content/en/_index.html
index a797c6cba..a49eb9262 100644
--- a/content/en/_index.html
+++ b/content/en/_index.html
@@ -14,7 +14,7 @@
---
{{< blocks/cover image_anchor="top" height="min" color="primary" >}}
-
+
A distributed, reliable key-value store for the most critical data of a distributed system
diff --git a/content/uk/_index.html b/content/uk/_index.html
new file mode 100644
index 000000000..d05598d32
--- /dev/null
+++ b/content/uk/_index.html
@@ -0,0 +1,45 @@
+---
+# TODO(chalin): drop the `title` field once Hugo is fixed to use the site title
+title: etcd
+features:
+ - title: Простий інтерфейс
+ description: Отримуйте та зберігайте значення використовуючи стандартні інструменти HTTP, такі як curl
+ icon: interface.svg
+ - title: Сховище ключ-значення
+ description: Зберігайте дані в ієрархічно організованих теках, так само як у звичайній файловій системі
+ icon: kv.svg
+ - title: Спостерігайте за замінами
+ description: Спостерігайте за змінами у певних ключах або теках для реагування на зміни в значеннях
+ icon: watch.svg
+---
+
+{{< blocks/cover image_anchor="top" height="min" color="primary" >}}
+
+
+ Розподілене, надійне сховище ключ-значення для найважливіших даних розподіленої системи
+
+
+{{< /blocks/cover >}}
+
+{{% blocks/lead color="white" %}}
+ Що таке etcd?
+
+ etcd — це стійке, розподілене сховище ключів-значень, яке забезпечує надійний спосіб зберігання даних, до яких потрібно
+ отримати доступ у розподіленій системі або кластері компʼютерів. Воно ефективно справляється з виборами лідера під час
+ розділення мережі та може витримати відмову системи, навіть вузла-лідера.
+ Дізнатись більше
+
+{{% /blocks/lead %}}
+
+
+ {{< uk/home/features >}}
+ {{< uk/home/used-by >}}
+ {{< uk/home/cncf >}}
+
\ No newline at end of file
diff --git a/i18n/uk.toml b/i18n/uk.toml
new file mode 100644
index 000000000..5f31e2cd5
--- /dev/null
+++ b/i18n/uk.toml
@@ -0,0 +1,16 @@
+[feedback_title]
+other = "Відгук"
+[feedback_question]
+other = "Чи це було корисним?"
+[feedback_positive]
+other = "Так"
+[feedback_negative]
+other = "Ні"
+[post_create_issue]
+other = "Запропонувати зміни в документацію"
+[post_edit_this]
+other = "Змінити сторінку"
+[post_view_this]
+other = "Переглянути код сторінки"
+[post_create_project_issue]
+other = "Створити тікет"
diff --git a/layouts/404.uk.html b/layouts/404.uk.html
new file mode 100644
index 000000000..eb0e87971
--- /dev/null
+++ b/layouts/404.uk.html
@@ -0,0 +1,45 @@
+{{/* etcd-docsy full file override: we're not tracking changes to the docsy base file. */}}
+
+{{ define "title" -}}
+404 Сторінку не знайдено – {{ site.Title -}}
+{{ end }}
+
+{{ define "main" -}}
+{{ $newIssuePath := "issues/new?title=Unexpected%20page-not-found%20error&body=URL%3A%20%0AExpected%20page%3A%20" -}}
+{{ $newIssueUrl := printf "%s/%s" site.Params.github_repo $newIssuePath -}}
+
+
+
+
+
+ Сторінку не знайдено
+
+
+ 404
+
+
+
+
+
+
+
+
+
+ Сторінка, яку ви запросили, не існує.
+
+
+ Перевірте правильність написання URL-адреси.
+
+
+ Якщо ви вважаєте, що сторінка повинна існувати,
+ створіть тікет.
+
+
+
+ Головна
+
+
+
+
+
+{{ end }}
diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html
new file mode 100644
index 000000000..7f8e97424
--- /dev/null
+++ b/layouts/_default/_markup/render-heading.html
@@ -0,0 +1 @@
+{{ template "_default/_markup/td-render-heading.html" . }}
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index 4e996d0b1..c604247a1 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -1,8 +1,48 @@
-{{ $isExternal := hasPrefix .Destination "http" -}}
-
-{{- .Text | safeHTML -}}
-
-{{- /* This directive ensures that all trailing whitespace is trimmed. */ -}}
\ No newline at end of file
+{{- $u := urls.Parse .Destination -}}
+{{- $href := $u.String -}}
+{{- $langCode := .Page.Site.Language.Lang -}}
+
+{{- if strings.HasPrefix $u.String "#" }}
+{{- /* Anchor link in the document, leave unchanged */ -}}
+
+{{- else if $u.IsAbs -}}
+{{- /* External link, leave unchanged */ -}}
+
+{{- else if strings.HasPrefix $u.Path (printf "/%s/" $langCode) -}}
+{{- /* Internal link in the current language, leave unchanged */ -}}
+
+{{- else if strings.HasPrefix $u.Path "/" -}}
+{{- $localizedPath := printf "/%s%s" $langCode $u.Path -}}
+{{- with or
+(.Page.GetPage $localizedPath)
+(.Page.Resources.Get $localizedPath)
+(resources.Get $localizedPath)
+-}}
+{{- $href = .RelPermalink -}}
+{{- else -}}
+{{- $path := strings.TrimPrefix "./" $u.Path }}
+{{- with or
+(.Page.GetPage $path)
+(.Page.Resources.Get $path)
+(resources.Get $path)
+-}}
+{{- $href = .RelPermalink -}}
+{{- end -}}
+{{- end -}}
+
+{{- if and $u.RawQuery (not (strings.Contains $href "?")) -}}
+{{- $href = printf "%s?%s" $href $u.RawQuery -}}
+{{- end -}}
+{{- if and $u.Fragment (not (strings.Contains $href "#")) -}}
+{{- $href = printf "%s#%s" $href $u.Fragment -}}
+{{- end -}}
+
+{{- else -}}
+{{- /* Other internal links, leave unchanged */ -}}
+
+{{- end -}}
+
+{{- $attributes := dict "href" $href "title" (.Title | transform.HTMLEscape) -}}
+{{ .Text | safeHTML }}
+{{- /**/ -}}
diff --git a/layouts/index.redirects b/layouts/index.redirects
index cd1e6a12d..3553636ea 100644
--- a/layouts/index.redirects
+++ b/layouts/index.redirects
@@ -1,4 +1,4 @@
-{{ $latest := site.Params.latest_stable_version }}
+{{- $latest := site.Params.latest_stable_version -}}
/docs/latest /docs/{{ $latest }}/
/docs/latest/* /docs/{{ $latest }}/:splat
@@ -42,3 +42,13 @@ docs/v3.4.0/reporting-bugs /docs/v3.4.0/reporting_bugs/
/docs/v3.3/dl_build /docs/v3.3/install/
/docs/v3.2/dl_build /docs/v3.2/install/
/docs/v3.1/dl_build /docs/v3.1/install/
+
+# Add redirects for each language except 'en'
+{{ range .Site.Languages }}
+{{- $lang := .Lang -}}
+{{- if ne $lang "en" -}}
+
+/{{ $lang }}/* /{{ $lang }}/404.html 404
+
+{{- end -}}
+{{- end }}
diff --git a/layouts/shortcodes/uk/home/cncf.html b/layouts/shortcodes/uk/home/cncf.html
new file mode 100644
index 000000000..fc0419518
--- /dev/null
+++ b/layouts/shortcodes/uk/home/cncf.html
@@ -0,0 +1,5 @@
+{{ $src := "https://raw.githubusercontent.com/cncf/artwork/master/other/cncf/horizontal/color/cncf-color.png" -}}
+
+ {{ .Site.Title }} є проєктом CNCF
+
+
diff --git a/layouts/shortcodes/uk/home/features.html b/layouts/shortcodes/uk/home/features.html
new file mode 100644
index 000000000..4e129dcae
--- /dev/null
+++ b/layouts/shortcodes/uk/home/features.html
@@ -0,0 +1,41 @@
+{{ $features := $.Page.Params.features -}}
+
+ Характеристики
+
+
+ {{ range $features -}}
+ {{ $icon := printf "img/%s" .icon | relURL -}}
+ {{ $desc := .description | markdownify -}}
+
+
+
+
{{ .title }}
+
{{ $desc }}
+
+
+
+ {{ end }}
+
+
+
+
+
+
Необовʼязкова автентифікація клієнтського сертифіката SSL
+
+
+
+
+
Перевірено на 1000 записів/сек на екземпляр
+
+
+
+
+
Опціональні TTL для закінчення терміну дії ключів
+
+
+
+
+
Правильно розповсюджується за протоколом Raft
+
+
+
diff --git a/layouts/shortcodes/uk/home/used-by.html b/layouts/shortcodes/uk/home/used-by.html
new file mode 100644
index 000000000..fe573e16c
--- /dev/null
+++ b/layouts/shortcodes/uk/home/used-by.html
@@ -0,0 +1,42 @@
+{{ $usedBy := site.Data.used_by -}}
+
+
+Використовується
+
+
+ {{ range $usedBy -}}
+ {{ $img := printf "img/users/%s" .image | relURL -}}
+
+ {{- end }}
+
+
+
+{{- /*
+
+ ...
+
+
+
+
+
A template for PostgreSQL HA with ZooKeeper, etcd, or Consul
+
+
+
+
+
+
A transparent, highly scalable and cryptographically verifiable data store, created by Google
+
+
+
+
+*/ -}}
diff --git a/package.json b/package.json
index b97979550..e86958c94 100644
--- a/package.json
+++ b/package.json
@@ -4,14 +4,15 @@
"build-and-serve": "npm run build && npm run serve",
"build:preview": "hugo --cleanDestinationDir -e dev -DFE --minify --baseURL \"${DEPLOY_PRIME_URL:-/}\"",
"build:production": "hugo --cleanDestinationDir --minify",
- "build": "hugo --cleanDestinationDir -e dev -DFE",
+ "build": "hugo --cleanDestinationDir -e dev -DFE --printI18nWarnings",
"check-links:all": "HTMLTEST_ARGS= npm run _check-links",
"check-links": "npm run _check-links",
"postbuild:preview": "npm run _check-links",
"precheck-links:all": "npm run build",
"precheck-links": "npm run build",
"preinstall": "npm run submodule:get",
- "serve": "netlify dev -c \"hugo serve --minify -DFE -w\"",
+ "serve": "netlify dev -c \"hugo serve --minify -DFE -w --printI18nWarnings\"",
+ "serve:debug": "netlify dev --debug -c \"hugo serve --minify -DFE -w --printI18nWarnings\"",
"submodule:get": "git submodule update --init --recursive --depth 1",
"submodule:update": "git submodule update --remote --recursive --depth 1"
},