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.
This PR is the result of a long process of migration from Hugo to Astro.
It's based on a previous work made with @HiDeoo a long time ago at #38319.
I've restarted from there and spent quite some time gathering all the commits from the main branch, and adapting everything so that the rendering is exactly the same as the one from https://twbs-bootstrap.netlify.app.
Shoutout also to @mdo for the helpful commits and reviews!
🌟 Netlify preview
Note
Last commit gathered: 99a0dc6 (April 11, 2025)
Placeholder Documentation Component
The placeholder documentation component (previously a shortcode) is slightly different for only one use case at https://deploy-preview-41251--twbs-bootstrap.netlify.app/docs/5.3/utilities/object-fit/#examples where the colors are different from https://twbs-bootstrap.netlify.app/docs/5.3/utilities/object-fit/#examples.
IMHO, this is an acceptable modification that avoids to have this specificity f52d4a3
ESLint Support - JS in MDX
Right now, it doesn't seem possible to handle things like
{/* <!-- eslint-disable whatever --> */}
in a MDX file. So, I haven't added the JS check in MDX files.Sub-tasks
site/assets
(must be the latest versions at the end).github/workflows/*
site-new
tosite
gh-pages
with the same process as before at first<ScssDocs
wherefile="site"
-> find thesite-new
reference so thatnpm run astro-build
builds correctly:
in:root
at /docs/5.3/customize/css-variablesCode.astro
file -> it's apparently not needed as already handled<JsDocs>
from 06f7c3b + 34c2725 + e2854b9 (compared tomain
branch)site/layouts/_default/examples.html
with integrity values etc.)index.astro
examples, double-check that the external scripts use the right versions and sha384, compared tomain
branchTODO(Astro migration)
commentsdocs-vnu
issues and reuse it everywhere like it was the case inmain
branchsw.js
,CNAME
, and mayb other "external" filesStackblitz
Syntax highlighting and code snippets
_syntax.scss
file that probably still have things related to Chroma.$
or>PM
prefixes for these languagesdocs/5.3/getting-started/download#yarn
, we should have a$
at each line<JsDocs>
<ScssDocs>
<Example code={}>
with wrapping elementsDeployment
TODO(Astro migration)
part from our.gitignore
filePostponed tasks
<ScssDocs>
renders// scss-docs-start
and// scss-docs-end
in /customize/color-modes#sass-variables and shouldn't. It's because this is a special use case where there's a// scss-docs-start sass-dark-mode-vars
wrapper that can contains several// scss-docs-start theme-*-dark-variables
blocks...<ScssDocs>
renders// scss-docs-start vr-variables
(and// scss-docs-end
) in /docs/5.3/content/typography and shouldn't/docs/5.3/examples/dashboard-rtl/
and/docs/5.3/examples/dashboard-rtl
behave differently in dev mode, depending on whether the trailing slash is present. This affects CSS and JS not loading (the local server looks for/docs/5.3/examples/dashboard.css
for instance), though the issue does not occur on production, on Netlify. Please note that when you're navigating in the website by following the links, it works well.<div class="bd-example">...</div>
by<Example showMarkup={false} code={
...} />
astro check --root site
,tsc -p site --noEmit
ResponsiveImage.astro
component to implement the equivalent of Hugo'simageConfig
and calculate the width and height of the image automaticallyaria-label
to the anchor links in the docs (see 688d7e3). Could be suggested upstream as difficult to implement from our own code.defer
like in 45fe28c, or we keep the using scripts insite/assets/*
&& rm -rf _site && cp -r site/dist _site
was temporary to make Netlify works as it checks the built content in_site
. It would need a live coding session with access to the Netlify account to change that.