-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
docs: migration to Astro #41251
base: main
Are you sure you want to change the base?
docs: migration to Astro #41251
Conversation
4b23c7d
to
fa28fc4
Compare
package.json
Outdated
"watch-js-docs": "nodemon --watch site/assets/js/ --ext js --exec \"npm run js-lint\"" | ||
"watch-js-docs": "nodemon --watch site/assets/js/ --ext js --exec \"npm run js-lint\"", | ||
"astro-dev": "astro dev --root site-new", | ||
"astro-build": "astro build --root site-new && rm -rf _site && cp -r site-new/dist _site", |
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.
&& rm -rf _site && cp -r site/dist _site
is temporary to make Netlify works as it checks the built content in _site
0fd6236
to
43a8c70
Compare
15a51b2
to
fb6a469
Compare
f1ed5cd
to
c91e74f
Compare
@@ -30,7 +30,10 @@ execFile('java', ['-version'], (error, stdout, stderr) => { | |||
// Per https://www.w3.org/TR/html-aria/#docconformance having "aria-disabled" on a link is | |||
// NOT RECOMMENDED, but it's still valid - we explain in the docs that it's not ideal, | |||
// and offer more robust alternatives, but also need to show a less-than-ideal example | |||
'An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.' | |||
'An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.', | |||
// A `code` element with the `is:raw` attribute coming from remark-prismjs (Astro upstream possible bug) |
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.
Workaround for withastro/astro#13400
c91e74f
to
21573d8
Compare
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
21573d8
to
3afdd5f
Compare
@@ -113,6 +123,13 @@ | |||
"@rollup/plugin-node-resolve": "^16.0.0", | |||
"@rollup/plugin-replace": "^6.0.2", | |||
"@stackblitz/sdk": "^1.11.0", | |||
"@types/bootstrap": "^5.2.6", |
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.
Check whether we keep it or not. Might be maybe problematic for major versions.
This PR migrates our documentation to Astro based on previous work at #38319.
🌟 Netlify preview
Note
Last commit gathered: 53171ad (March 9, 2025)
Sub-tasks
site/assets
(must be the latest versions at the end)&& astro check --root site && tsc -p site --noEmit
to theastro-lint
script.github/workflows/*
.github/workflows/docs.yml
.github/workflows/lint.yml
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 correctlyCode.astro
file<JsDocs>
from 06f7c3b + 34c2725 + e2854b9 (compared tomain
branch)site/layouts/_default/examples.html
with integrity values etc.)aria-label
if not present by default in Astroindex.astro
examples, double-check that the external scripts and links have been set with the latest version + integritydefer
(see 45fe28c); do we need that with Astro?TODO(Astro migration)
comments.md
AND.mdx
files to check the JS that is contained in the code snippets (Markdown code)docs-vnu
issues"docs-lint": "npm-run-all docs-prettier-check"
->"docs-lint": "npm-run-all docs-prettier-check docs-vnu",
Validate HTML
from.github/workflows/docs.yml
sw.js
andCNAME
? (and other files?)Stackblitz
Syntax highlighting
Do we switch, and now, to Shiki?
Clean up the
_syntax.scss
file that probably still have things related to Chroma.The colors are reactive to light/dark mode, but aren't exactly the same as Bootstrap. It might be re-plugged or handled differently to have the same rendering
Add
$
or>PM
prefixes for these languagesDiff code is highlighted with colors
At
docs/5.3/getting-started/download#yarn
, we should have a$
at each line:At
docs/5.3/docsref
, there are extra spaces (that should be automatically removed by reindenting the content of<ScssDocs>
and<JsDocs>
)Identation issues when we use stuff like:
that renders
Deployment
Optional
/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.