Files
markusgraf_ch/hugo.toml
T
gurixandClaude c3c747b7fa feat: add multilingual support with German and English
Implement complete multilingual support using Hugo's multilingual mode with German (de) as default and English (en) as secondary language.

Changes:
- Configure Hugo multilingual mode with language-specific parameters
- Reorganize content using language suffix pattern (filename.de.md, filename.en.md)
- Translate all content to English (home page and CV page)
- Implement language switcher that maintains page context
- Add language-specific navigation menus
- Update templates to use language-aware URL functions (relLangURL)
- Fix navbar brand and Home links to respect current language
- Add translationKey to content frontmatter for explicit translation linking

URL Structure:
- German: /de/ (home), /de/cv/ (CV page)
- English: /en/ (home), /en/cv/ (CV page)

Key Implementation Details:
- Use filename.{lang}.md pattern instead of {lang}/filename.md subdirectories
- Always use relLangURL for internal navigation, never .Site.BaseURL
- Menu URLs must include language prefix when defaultContentLanguageInSubdir = true
- Added translationKey to frontmatter for proper translation discovery

Documented 5 critical bugs and their solutions in design.md for future reference.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 23:52:08 +01:00

45 lines
1.0 KiB
TOML

baseURL = 'https://markusgraf.ch/'
defaultContentLanguage = 'de'
defaultContentLanguageInSubdir = true
# Disable default taxonomies (categories and tags) for minimal site
# To re-enable for blog/content organization, see docs/TAXONOMIES.md
disableKinds = ['taxonomy', 'term']
[params]
description = 'Personal website of Markus Graf'
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
# Language configuration
[languages]
[languages.de]
languageCode = 'de'
languageName = 'Deutsch'
title = 'Markus Graf'
weight = 1
[languages.de.params]
description = 'Persönliche Website von Markus Graf'
[languages.en]
languageCode = 'en'
languageName = 'English'
title = 'Markus Graf'
weight = 2
[languages.en.params]
description = 'Personal website of Markus Graf'
# Language-specific menus
[[languages.de.menu.main]]
name = 'Lebenslauf'
url = '/de/cv/'
weight = 10
[[languages.en.menu.main]]
name = 'Curriculum Vitae'
url = '/en/cv/'
weight = 10