-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Description
Summary
This change prevents blank HTML pages produced by the static site generator from shipping. It adds a Nunjucks fallback template and a script that scans build/*.html after generation and replaces any pages whose is empty with a readable fallback page containing template metadata and links.
Why
Some templates fail to render their README/assets and result in files like:
. These blank pages are confusing for users and break the browsing experience on the hosted library.Earlier
After
Method of generation:
Here I have created a fallback template which will be shown if incase the html is not generated by nunjuck.
Here the workflow will do npm run build which will build all the html files, however if in case some html files are not generated then they will be replaced by fallback template
workflow:
Generate pages (normal build) ---> Run the fixer ---> Scan built HTML files
---> Detect empty page ---> Gather metadata for the fallback --->
Render the fallback template ---> Overwrite the file
PR : #445
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels