diff --git a/Sources/Generator/Generators/OverviewPageGenerator.swift b/Sources/Generator/Generators/OverviewPageGenerator.swift index 75c6825..4eff4ef 100644 --- a/Sources/Generator/Generators/OverviewPageGenerator.swift +++ b/Sources/Generator/Generators/OverviewPageGenerator.swift @@ -25,6 +25,7 @@ struct OverviewPageGenerator { sectionUrl: section.sectionUrl(for: language), languageButton: languageButton, page: section) + content[.language] = language content[.contentClass] = "overview" content[.header] = makeHeader(page: section, metadata: metadata, language: language) content[.content] = makeContent(section: section, language: language) diff --git a/Sources/Generator/Generators/PageGenerator.swift b/Sources/Generator/Generators/PageGenerator.swift index f4fa6c9..56347ad 100644 --- a/Sources/Generator/Generators/PageGenerator.swift +++ b/Sources/Generator/Generators/PageGenerator.swift @@ -28,6 +28,7 @@ struct PageGenerator { page: page, metadata: metadata, language: language, path: inputContentPath) var content = [PageTemplate.Key : String]() + content[.language] = language content[.head] = factory.pageHead.generate(page: page, language: language, includesCode: pageIncludesCode) let sectionUrl = page.sectionUrl(for: language) content[.topBar] = factory.topBar.generate(sectionUrl: sectionUrl, languageButton: nextLanguage, page: page) diff --git a/Sources/Generator/Templates/Pages/PageTemplate.swift b/Sources/Generator/Templates/Pages/PageTemplate.swift index 77a03fa..36b81f1 100644 --- a/Sources/Generator/Templates/Pages/PageTemplate.swift +++ b/Sources/Generator/Templates/Pages/PageTemplate.swift @@ -3,6 +3,7 @@ import Foundation struct PageTemplate: Template { enum Key: String, CaseIterable { + case language = "LANG" case head = "HEAD" case topBar = "TOP_BAR" case contentClass = "CONTENT_CLASS"