diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-07-26 11:10:47 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-07-26 11:10:47 -0300 |
commit | 6b56b12a0e84581e61fdacce3dbaced1299aa7ae (patch) | |
tree | 38f08f4132295b86010787afe9a2add64c114926 /src/content/dependencies | |
parent | bce6a52f44b6be8de1d7ed42150d051c25e63fb7 (diff) |
content: generatePageLayout: expose page path for CSS/JS
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/generatePageLayout.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js index fe2bef99..0a26dfd9 100644 --- a/src/content/dependencies/generatePageLayout.js +++ b/src/content/dependencies/generatePageLayout.js @@ -55,6 +55,7 @@ export default { 'cachebust', 'html', 'language', + 'pagePath', 'to', 'wikiData', ], @@ -205,6 +206,7 @@ export default { cachebust, html, language, + pagePath, to, }) { let titleHTML = null; @@ -460,11 +462,11 @@ export default { lang: language.intlCode, 'data-language-code': language.code, - /* 'data-url-key': 'localized.' + pagePath[0], ...Object.fromEntries( - pagePath.slice(1).map((v, i) => [['data-url-value' + i], v])), - */ + pagePath + .slice(1) + .map((v, i) => [['data-url-value' + i], v])), 'data-rebase-localized': to('localized.root'), 'data-rebase-shared': to('shared.root'), |