Docs: unminify downloadable example HTML files #41637
Merged
+26
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #41529
This PR suggests a way to "unminify" the HTML examples minified by Astro to be embedded in the docs website. This would use Prettier with its basic configuration.
I'm not sure why, but Prettier is not happy with the 2-lines
<img>
without double quotes for thesrc
in our cheatsheet example pages. I just modified the 4 problematic use cases so that no error happens.In order to compare, one can do the following:
npm run release-zip-examples
unzip bootstrap-5.3.7-examples.zip
cd bootstrap-5.3.7-examples
http-server
and go to http://127.0.0.1:8080/cheatsheet-rtl/ or http://127.0.0.1:8080/cheatsheet/ to double-check the rendering of the modified imagesindex.html
files and check that they are not minified anymoreFor instance, here's the
bootstrap-5.3.7-examples/sticky-footer/index.html