Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docsy.dev/config/_default/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ imaging:

languages:
en:
languageName: English
label: English
params:
description: Docsy does docs
fr:
languageName: Français
label: Français
params:
description: Docsy, c’est la doc.

Expand Down
4 changes: 2 additions & 2 deletions docsy.dev/content/en/docs/get-started/basic-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ by removing the following lines from `hugo.toml`:

```toml
[languages.no]
languageName ="Norsk"
label ="Norsk"
contentDir = "content/no"
[languages.no.params]
title = "Goldydocs"
Expand All @@ -40,7 +40,7 @@ time_format_default = "02.01.2006"
time_format_blog = "02.01.2006"

[languages.fa]
languageName ="فارسی"
label ="فارسی"
contentDir = "content/fa"
[languages.fa.params]
title = "اسناد گلدی"
Expand Down
12 changes: 6 additions & 6 deletions docsy.dev/content/en/docs/language.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ defaultContentLanguageInSubdir = false
...
[languages]
[languages.en]
languageName ="English"
label ="English"
# Weight used for sorting.
weight = 1
[languages.en.params]
title = "Goldydocs"
description = "Docsy does docs"
[languages.no]
languageName ="Norsk"
label ="Norsk"
contentDir = "content/no"
[languages.no.params]
title = "Goldydocs"
Expand All @@ -51,13 +51,13 @@ defaultContentLanguageInSubdir: false
languages:
en:
languageName: English
label: English
weight: 1 # used for sorting
params:
title: Docsy
description: Docsy does docs
'no':
languageName: Norsk
label: Norsk
contentDir: content/no
params:
title: Docsy
Expand All @@ -72,15 +72,15 @@ languages:
"defaultContentLanguageInSubdir": false,
"languages": {
"en": {
"languageName": "English",
"label": "English",
"weight": 1,
"params": {
"title": "Docsy",
"description": "Docsy does docs"
}
},
"no": {
"languageName": "Norsk",
"label": "Norsk",
"contentDir": "content/no",
"params": {
"title": "Docsy",
Expand Down
2 changes: 1 addition & 1 deletion docsy.dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"afdocs": "^0.9.2",
"autoprefixer": "^10.4.27",
"cross-env": "^10.1.0",
"hugo-extended": "0.157.0",
"hugo-extended": "0.161.1",
"netlify-cli": "^24.0.1",
"npm-check-updates": "^19.6.3",
"postcss-cli": "^11.0.1",
Expand Down
2 changes: 1 addition & 1 deletion layouts/_partials/head-css.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
makes it snappier to develop in Chrome, but it may look sub-optimal in other
browsers. */ -}}

{{ if eq .Site.Language.LanguageDirection "rtl" -}}
{{ if eq .Site.Language.Direction "rtl" -}}
{{ $css = $css
| postCSS (dict "use" "autoprefixer rtlcss" "noMap" true)
| resources.Copy (replace $scssMain "." ".rtl.") -}}
Expand Down
10 changes: 5 additions & 5 deletions layouts/_partials/navbar-lang-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="td-lang-menu dropdown">
<a class="nav-link dropdown-toggle td-lang-menu__title" href="#" role="button"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="td-lang-menu__title-text">{{ $langPage.Language.LanguageName }}</span>
<span class="td-lang-menu__title-text">{{ $langPage.Language.Label }}</span>
<span class="td-lang-menu__title-code">{{ $langPage.Language.Lang | upper }}</span>
</a>
{{/* */ -}}
Expand All @@ -23,13 +23,13 @@
{{ $isActive := eq $.Site.Language.Lang .Lang -}}
<li>
{{- if $isActive -}}
<span class="dropdown-item active">{{ .LanguageName }}</span>
<span class="dropdown-item active">{{ .Label }}</span>
{{- else if $translated -}}
<a class="dropdown-item" href="{{ $translated.RelPermalink }}">{{ .LanguageName }}</a>
<a class="dropdown-item" href="{{ $translated.RelPermalink }}">{{ .Label }}</a>
{{- else -}}
<span class="dropdown-item disabled">{{ .LanguageName }}</span>
<span class="dropdown-item disabled">{{ .Label }}</span>
{{- end -}}
</li>
{{ end -}}
</ul>
</div>
</div>
4 changes: 2 additions & 2 deletions layouts/baseof.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage"
{{- with .Site.Language.LanguageDirection }} dir="{{ . }}" {{- end -}}
{{- with .Site.Language.Direction }} dir="{{ . }}" {{- end -}}
{{ with .Site.Language.Lang }} lang="{{ . }}" {{- end }} {{/**/ -}}
class="no-js"
{{- $darkMode := partialCached "dark-mode-config.html" "dark-mode-global" -}}
Expand All @@ -20,4 +20,4 @@
</div>
{{ partialCached "scripts.html" . }}
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions layouts/blog/baseof.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage"
{{- with .Site.Language.LanguageDirection }} dir="{{ . }}" {{- end -}}
{{- with .Site.Language.Direction }} dir="{{ . }}" {{- end -}}
{{ with .Site.Language.Lang }} lang="{{ . }}" {{- end }} {{/**/ -}}
class="no-js"
{{- $darkMode := partialCached "dark-mode-config.html" "dark-mode-global" -}}
Expand Down Expand Up @@ -48,4 +48,4 @@
</div>
{{ partial "scripts.html" . }}
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion layouts/blog/baseof.print.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage"
{{- with .Site.Language.LanguageDirection }} dir="{{ . }}" {{- end -}}
{{- with .Site.Language.Direction }} dir="{{ . }}" {{- end -}}
{{ with .Site.Language.Lang }} lang="{{ . }}" {{- end }} {{/**/ -}}
class="no-js"
{{- $darkMode := partialCached "dark-mode-config.html" "dark-mode-global" -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/docs/baseof.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage"
{{- with .Site.Language.LanguageDirection }} dir="{{ . }}" {{- end -}}
{{- with .Site.Language.Direction }} dir="{{ . }}" {{- end -}}
{{ with .Site.Language.Lang }} lang="{{ . }}" {{- end }} {{/**/ -}}
class="no-js"
{{- $darkMode := partialCached "dark-mode-config.html" "dark-mode-global" -}}
Expand Down Expand Up @@ -44,4 +44,4 @@
</div>
{{ partial "scripts.html" . }}
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion layouts/docs/baseof.print.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage"
{{- with .Site.Language.LanguageDirection }} dir="{{ . }}" {{- end -}}
{{- with .Site.Language.Direction }} dir="{{ . }}" {{- end -}}
{{ with .Site.Language.Lang }} lang="{{ . }}" {{- end }} {{/**/ -}}
class="no-js"
{{- $darkMode := partialCached "dark-mode-config.html" "dark-mode-global" -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@
{{ with $home.OutputFormats.Get "markdown" -}}
{{ $url = .Permalink -}}
{{ end -}}
- [{{ $home.Language.LanguageName }}]({{ $url }}) {{- "\n" -}}
- [{{ $home.Language.Label }}]({{ $url }}) {{- "\n" -}}
{{ end -}}
{{ end -}}
2 changes: 1 addition & 1 deletion layouts/swagger/baseof.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage"
{{- with .Site.Language.LanguageDirection }} dir="{{ . }}" {{- end -}}
{{- with .Site.Language.Direction }} dir="{{ . }}" {{- end -}}
{{ with .Site.Language.Lang }} lang="{{ . }}" {{- end }} {{/**/ -}}
class="no-js"
{{- $darkMode := partialCached "dark-mode-config.html" "dark-mode-global" -}}
Expand Down