feat: add multilingual support
This commit is contained in:
@ -9,6 +9,11 @@ languageCode = "en-US"
|
||||
paginate = 7
|
||||
rssLimit = 10
|
||||
|
||||
# Multilingual
|
||||
defaultContentLanguage = "en"
|
||||
# disableLanguages = ["nl"]
|
||||
# defaultContentLanguageInSubdir = true
|
||||
|
||||
# add redirects/headers
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "REDIRECTS", "HEADERS"]
|
||||
@ -47,29 +52,6 @@ rel = "sitemap"
|
||||
dir = ":cacheDir/:project"
|
||||
maxAge = "10s"
|
||||
|
||||
[markup]
|
||||
[markup.goldmark]
|
||||
[markup.goldmark.extensions]
|
||||
linkify = false
|
||||
[markup.goldmark.parser]
|
||||
autoHeadingID = true
|
||||
autoHeadingIDType = "github"
|
||||
[markup.goldmark.parser.attribute]
|
||||
block = true
|
||||
title = true
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
[markup.highlight]
|
||||
codeFences = false
|
||||
guessSyntax = false
|
||||
hl_Lines = ""
|
||||
lineNoStart = 1
|
||||
lineNos = false
|
||||
lineNumbersInTable = true
|
||||
noClasses = false
|
||||
style = "dracula"
|
||||
tabWidth = 4
|
||||
|
||||
[sitemap]
|
||||
changefreq = "weekly"
|
||||
filename = "sitemap.xml"
|
||||
|
18
config/_default/languages.toml
Normal file
18
config/_default/languages.toml
Normal file
@ -0,0 +1,18 @@
|
||||
[en]
|
||||
languageName = "English"
|
||||
contentDir = "content/en"
|
||||
weight = 10
|
||||
[en.params]
|
||||
languageISO = "EN"
|
||||
|
||||
[nl]
|
||||
languageName = "Nederlands"
|
||||
contentDir = "content/nl"
|
||||
weight = 20
|
||||
[nl.params]
|
||||
languageISO = "NL"
|
||||
titleAddition = "Modern documentatie-thema"
|
||||
description = "Doks is een Hugo-thema waarmee je moderne documentatie-websites kunt bouwen die veilig, snel en klaar voor SEO zijn — standaard."
|
||||
titleHome = "Doks thema"
|
||||
footer = "Mogelijk gemaakt door <a href=\"https://www.netlify.com/\">Netlify</a>, <a href=\"https://gohugo.io/\">Hugo</a>, en <a href=\"https://getdoks.org/\">Doks</a>"
|
||||
alertText = "Introductie van het Doks-kinderthema, verschillende DX + UX-updates en meer! <a class=\"alert-link stretched-link\" href=\"https://getdoks.org/blog/doks-v0.2/\">Bekijk Doks v0.2</a>"
|
29
config/_default/markup.toml
Normal file
29
config/_default/markup.toml
Normal file
@ -0,0 +1,29 @@
|
||||
defaultMarkdownHandler = "goldmark"
|
||||
|
||||
[goldmark]
|
||||
[goldmark.extensions]
|
||||
linkify = false
|
||||
[goldmark.parser]
|
||||
autoHeadingID = true
|
||||
autoHeadingIDType = "github"
|
||||
[goldmark.parser.attribute]
|
||||
block = true
|
||||
title = true
|
||||
[goldmark.renderer]
|
||||
unsafe = true
|
||||
|
||||
[highlight]
|
||||
codeFences = false
|
||||
guessSyntax = false
|
||||
hl_Lines = ""
|
||||
lineNoStart = 1
|
||||
lineNos = false
|
||||
lineNumbersInTable = true
|
||||
noClasses = false
|
||||
style = "dracula"
|
||||
tabWidth = 4
|
||||
|
||||
[tableOfContents]
|
||||
endLevel = 3
|
||||
ordered = false
|
||||
startLevel = 2
|
39
config/_default/menus/menus.nl.toml
Normal file
39
config/_default/menus/menus.nl.toml
Normal file
@ -0,0 +1,39 @@
|
||||
[[docs]]
|
||||
name = "Prologue"
|
||||
weight = 10
|
||||
identifier = "prologue"
|
||||
url = "/docs/prologue/"
|
||||
|
||||
[[docs]]
|
||||
name = "Help"
|
||||
weight = 60
|
||||
identifier = "help"
|
||||
url = "/docs/help/"
|
||||
|
||||
[[main]]
|
||||
name = "Docs"
|
||||
url = "/docs/prologue/introduction/"
|
||||
weight = 10
|
||||
|
||||
# [[main]]
|
||||
# name = "Blog"
|
||||
# url = "/blog/"
|
||||
# weight = 20
|
||||
|
||||
[[social]]
|
||||
name = "GitHub"
|
||||
pre = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-github\"><path d=\"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22\"></path></svg>"
|
||||
url = "https://github.com/h-enk/doks"
|
||||
post = "v0.1.0"
|
||||
weight = 10
|
||||
|
||||
[[social]]
|
||||
name = "Twitter"
|
||||
pre = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-twitter\"><path d=\"M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z\"></path></svg>"
|
||||
url = "https://twitter.com/getdoks"
|
||||
weight = 20
|
||||
|
||||
# [[footer]]
|
||||
# name = "Privacy"
|
||||
# url = "/privacy-policy/"
|
||||
# weight = 10
|
@ -76,5 +76,5 @@ editPage = false
|
||||
highLight = true
|
||||
kaTex = false
|
||||
collapsibleSidebar = true
|
||||
multilingualMode = false # Not yet functional
|
||||
multilingualMode = true
|
||||
docsVersioning = false # Not yet functional
|
||||
|
Reference in New Issue
Block a user