When we migrated to the Vike v1.0 structure (#347), were were (previously) unable to set the <html> tag attributes that we had relied on in existing projects. In particular, this caused issues with:
The build tests, which read the data-content-id
Some g-components, which relied on the class core or enhanced in the <html> element
More recent versions of vike-react have solved this problem by adding a new +htmlAttributes.js config file to set these attributes (even dynamically from the context data) — so this PR updates the various package versions and adds the appropriate files to take advantage of the new feature.
It might be that we eventually want to embark on a larger refactor of the config/ folder - right now we have effectively built our own config mechanism on top of the one that vike-react expects/supports. Still, for now this should provide a fairly effective fix to continue our existing config behaviour and make sure that pages work as expected.
When we migrated to the Vike v1.0 structure (#347), were were (previously) unable to set the
<html>
tag attributes that we had relied on in existing projects. In particular, this caused issues with:data-content-id
core
orenhanced
in the<html>
elementMore recent versions of
vike-react
have solved this problem by adding a new+htmlAttributes.js
config file to set these attributes (even dynamically from thecontext
data) — so this PR updates the various package versions and adds the appropriate files to take advantage of the new feature.It might be that we eventually want to embark on a larger refactor of the
config/
folder - right now we have effectively built our own config mechanism on top of the one thatvike-react
expects/supports. Still, for now this should provide a fairly effective fix to continue our existing config behaviour and make sure that pages work as expected.Test steps:
config/article.js
filenpm run build
head -n 2 dist/client/index.html
The output should look like the following: