Conversation
Size ComparisonDetails
✅ None of the examples has changed their size significantly. |
832800f to
0ec8ecd
Compare
|
Visit the preview URL for this PR (updated for commit 25a80be): https://yew-rs--pr4069-yew-docs-185gwe7t.web.app (expires Mon, 23 Mar 2026 12:53:11 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Replace the Docusaurus-based website with a pure Rust/Yew implementation. The SSG pipeline compiles each page to WASM, runs wasm-bindgen and wasm-opt, then captures SSR output for SEO-friendly HTML. All docs (5 versions x 4 languages), blog posts, community pages, search, and 404 are generated as static files. Key features: - Content model with dual HTML/Markdown rendering for copy-as-markdown - Syntax highlighting via syntect with light/dark themes - Collapsible sidebar, table of contents, breadcrumbs, pagination - 3-state theme toggle (light/dark/system) - Blog with date-prefixed URLs, index, sidebar, RSS and Atom feeds - Full-page Algolia search with version faceting - SEO: hreflang, OG tags, JSON-LD breadcrumbs, canonical URLs - E2E tests with fantoccini/geckodriver - Deduplicated versioned docs across 0.20/0.21/0.22/0.23/next
Replace the Docusaurus-based website with a pure Rust/Yew implementation. The SSG pipeline compiles each page to WASM, runs wasm-bindgen and wasm-opt, then captures SSR output for SEO-friendly HTML. All docs (5 versions x 4 languages), blog posts, community pages, search, and 404 are generated as static files. Key features: - Content model with dual HTML/Markdown rendering for copy-as-markdown - Syntax highlighting via syntect with light/dark themes - Collapsible sidebar, table of contents, breadcrumbs, pagination - 3-state theme toggle (light/dark/system) - Blog with date-prefixed URLs, index, sidebar, RSS and Atom feeds - Full-page Algolia search with version faceting - SEO: hreflang, OG tags, JSON-LD breadcrumbs, canonical URLs - E2E tests with fantoccini/geckodriver - Deduplicated versioned docs across 0.20/0.21/0.22/0.23/next
ce3a6d7 to
15b5594
Compare
|
@WorldSEnder still a draft PR but any opinions are welcome. you can already try the wasm website in the preview URL |
|
Size Note: |
This is now implemented. Each locale (en, ja, zh-Hans, zh-Hant) has one SPA binary powered by Architecture:
Per-page WASM download went from ~1.7 MB (per navigation) to ~2.8 MB (once per session, then all version/page switches are instant. 930 kB after compression, seems acceptible). Full build time in CI reduces tenfold (90 minutes -> 11 minutes). |
more todos:
|
|
As previously commented, a huge bloat is syntect. We don't have codeblocks on a lot of pages like the home page and the getting-started/examples page. But the SPA approach now inevitably bundles it. after #3932 lands though, we can delay loading the CodeBlock component. This will even beat docusaurus. Note docusaurs based getting-started/examples and getting-started/editor-setup currently load JavaScript of identical size. |
fixes #2779
Replace the Docusaurus-based website with a pure Rust/Yew implementation.
The SSG pipeline compiles each page to WASM, runs wasm-bindgen and wasm-opt, then captures SSR output for SEO-friendly HTML. All docs (5 versions x 4 languages), blog posts, community pages, search, and 404 are generated as static files.
This is a quite faithful rewrite of our old docusaurus based website.
Key features:
Some design choices and notes:
thirtyfour,chromiumoxidewere considered and Fantoccini has the most downloads, most stars, most recent release cadence../yew-rs/ssg/, accepts page filtering,--jobs Nflags, and--skip-wasm-optflags that can shrink build time greatly. Since we don't have beefy runners and we do have to run wasm-opt in the CI, a fresh build might take a lot longer (10 minutes)Get Startedbutton and theLearn Morebuttons on each feature card now consume the version and locale too. (new feature){category}/introduction.mdxfiles. Most pages (7 out of 9) had aslugin the old mdx files so that the slug{category}by itself shows the introduction page, (and{category}/introductiongives a 404). The only two exceptions were:https://yew.rs/docs/next/getting-started/introductionandhttps://yew.rs/docs/advanced-topics/struct-components/introduction. The new code unifies the aliasing behaviour. It means old urls todocs/next/getting-started/introductionanddocs/advanced-topics/struct-components/introductionwill hit 404.Todos
/docs/concepts/function-components/statepage