feat: add multilingual mode support (#241)

BREAKING CHANGE:  Layout file renamed ´layouts/partials/page-footer.html → layouts/partials/menu-nextprev.html`. If you use overrides, you might need to change the filenames as well.
This commit is contained in:
Robert Kaussow 2022-01-23 13:21:44 +01:00 committed by GitHub
parent 42ebf067bb
commit 5c22ce57dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 437 additions and 144 deletions

View file

@ -6,6 +6,7 @@ document.addEventListener("DOMContentLoaded", function (event) {
const input = document.querySelector("#gdoc-search-input")
const results = document.querySelector("#gdoc-search-results")
const basePath = urlPath(input ? input.dataset.siteBaseUrl : "")
const lang = input ? input.dataset.siteLang : ""
const configSchema = {
type: "object",
@ -26,7 +27,7 @@ document.addEventListener("DOMContentLoaded", function (event) {
if (!input) return
getJson(combineURLs(basePath, "/search/config.min.json"), function (searchConfig) {
getJson(combineURLs(basePath, "/search/" + lang + ".config.min.json"), function (searchConfig) {
const validationResult = validator.validate(searchConfig)
if (!validationResult.valid)