Documentation i18n

- moved English documentation in en-US subfolder
- allow for links to /docs/{name} to resolve to /docs/{lang}/{name}
- i18n on about page
This commit is contained in:
Olivier Meunier
2024-03-05 07:17:56 +01:00
parent 062d0359cb
commit 6d8f733f38
19 changed files with 131 additions and 85 deletions

View File

@@ -128,6 +128,7 @@ func mdToHTML(source, dest string) (*File, error) {
meta.Meta,
),
goldmark.WithParserOptions(
parser.WithHeadingAttribute(),
parser.WithAutoHeadingID(),
parser.WithASTTransformers(
util.Prioritized(&linkTransform{}, 900),
@@ -311,7 +312,6 @@ func main() {
aliases := []string{}
if path.Ext(src) == ".md" {
// destFile = strings.TrimSuffix(destFile, ".md") + ".html"
dst = strings.TrimSuffix(dst, ".md") + ".html"
file, err = mdToHTML(src, dst)