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:
parent
42ebf067bb
commit
5c22ce57dc
88 changed files with 437 additions and 144 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue