-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(build): split rendering index.html
from building index.json
#10953
Conversation
7091f33
to
bbcab3d
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
4e5e120
to
d6e8dd6
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has merge conflicts that must be resolved before it can be merged. |
index.html
from building index.json
Ensures `yarn build` can be called like before.
This is now deployed to stage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Should we get it on stage one more time and then merge?
This is still deployed on stage, since 2024-06-14. |
Important
Deprecation notice
Rendering index.html files as part of the build command is now DEPRECATED, and will no longer be supported in Yari v3. To resolve this warning, add the
-n
(--nohtml
) option.Summary
(MP-1174 e.a.)
Problem
Currently, building the
index.json
files and rendering theindex.html
files happens in a single step via theyarn build
command. Although it's possible to only build theindex.json
files viayarn build -n
, it is not possible to only render theindex.html
files.Solution
index.html
files into a separate command (yarn render:html
).yarn build:docs
).render:html
command to render static pages (aka "SPAs"), by ensuring the corresponding builds produceindex.json
s (that just contain apageTitle
and aurl
for now).yarn build
is called without the-n
flag.Screenshots
(No visual change.)
How did you test this change?
Ran a full build locally on
main
and on this branch, and compared the resulting build output. The only changes identified were as follows:index.json
files for all static pages ("SPAs").og:url
field now contains the correct URL for static pages ("SPAs"), instead of the base URL.index.json
s now contain aurl
field, which is replicated in the hydration data of theindex.html
, but not part of themetadata.json
.