diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-05-23 12:33:57 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-05-23 12:33:57 -0300 |
commit | fdb149f9404cd29567689ee4196bbd408c9507cc (patch) | |
tree | 5b9050677e1e12d64d0ad19621fe10905574f54f | |
parent | 3ba2440f7b405b0f2556957ad827defe25873c4d (diff) |
expose URL key and value(s) in html
-rwxr-xr-x | src/upd8.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/upd8.js b/src/upd8.js index 4d51d7f7..ba59068f 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -1082,7 +1082,10 @@ writePage.html = (pageInfo, { return filterEmptyLines(fixWS` <!DOCTYPE html> <html ${html.attributes({ - lang: language.code, + lang: language.intlCode, + 'data-language-code': language.code, + 'data-url-key': paths.toPath[0], + ...Object.fromEntries(paths.toPath.slice(1).map((v, i) => [['data-url-value' + i], v])), 'data-rebase-localized': to('localized.root'), 'data-rebase-shared': to('shared.root'), 'data-rebase-media': to('media.root'), |