Skip to content
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

Server-side Rendering (without hydration) #2335

Merged
merged 31 commits into from
Jan 12, 2022
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
65af3a2
Basic render to html implementation.
futursolo Jan 6, 2022
667796d
Remove HtmlWriter.
futursolo Jan 6, 2022
820d3ac
Escape html content.
futursolo Jan 6, 2022
1b2d823
Add non-suspense tests.
futursolo Jan 6, 2022
5b3f5e3
Add Suspense tests.
futursolo Jan 6, 2022
c7c9d2d
Gated "ssr" feature.
futursolo Jan 6, 2022
2bab219
Add example.
futursolo Jan 6, 2022
90deefc
merge master into ssr
futursolo Jan 6, 2022
482865e
Fix tests.
futursolo Jan 6, 2022
10f4ac4
Fix docs.
futursolo Jan 6, 2022
77b48c0
Fix heading size.
futursolo Jan 6, 2022
476300a
Remove the unused YewRenderer.
futursolo Jan 6, 2022
95e1d39
Remove extra comment.
futursolo Jan 6, 2022
655afd4
unify naming.
futursolo Jan 6, 2022
26bebb5
Update docs.
futursolo Jan 7, 2022
61f44d1
Update docs.
futursolo Jan 7, 2022
826b431
Update docs.
futursolo Jan 7, 2022
ed138b1
Isolate spawn_local.
futursolo Jan 7, 2022
bd26db4
Add doc flags.
futursolo Jan 7, 2022
f003aab
Add ssr feature to docs.
futursolo Jan 7, 2022
e56fcef
Move ServerRenderer into their own file.
futursolo Jan 7, 2022
ebe8c68
Fix docs.
futursolo Jan 7, 2022
10d7295
Update features and docs.
futursolo Jan 8, 2022
8635d63
Fix example.
futursolo Jan 8, 2022
3599240
Adjust comment position.
futursolo Jan 8, 2022
39a3d06
Fix effects being wrongly called when a component is suspended.
futursolo Jan 9, 2022
49566a0
Fix clippy.
futursolo Jan 9, 2022
17fd3b9
Uuid & no double boxing.
futursolo Jan 11, 2022
c67de39
merge master into ssr
futursolo Jan 11, 2022
0f24ae6
Merge branch 'master' into ssr
futursolo Jan 11, 2022
3567689
Merge branch 'master' into fursolo-ssr
ranile Jan 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge master into ssr
futursolo committed Jan 6, 2022
commit 90deefc53479170e684a6701a39a88e7ccbeab31
2 changes: 1 addition & 1 deletion website/docs/advanced-topics/server-side-rendering.md
Original file line number Diff line number Diff line change
@@ -103,6 +103,6 @@ Example: [simple\_ssr](https://github.com/yewstack/yew/tree/master/examples/susp
::: warning

Server-side rendering is experiemental and currently has no hydration support.
However, you can still generate static websites.
However, you can still use it to generate static websites.

:::
195 changes: 81 additions & 114 deletions website/sidebars.js
Original file line number Diff line number Diff line change
@@ -3,108 +3,62 @@
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation

The sidebars can be generated from the filesystem, or explicitly defined here.

Create as many sidebars as you want.
*/

module.exports = {
// By default, Docusaurus generates a sidebar from the docs folder structure
// conceptsSidebar: [{type: 'autogenerated', dirName: '.'}],

// But you can create a sidebar manually
sidebar: [
{
type: 'category',
label: 'Getting Started',
link: { type: 'doc', id: 'getting-started/introduction' },
items: [
"getting-started/build-a-sample-app",
"getting-started/examples",
"getting-started/editor-setup",
],
},
// But you can create a sidebar manually
sidebar: [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we seriously need to add a formatting hook to commits as every person keeps formatting this file differently.

{
type: "category",
label: "Getting Started",
link: { type: "doc", id: "getting-started/introduction" },
items: [
"getting-started/build-a-sample-app",
"getting-started/examples",
"getting-started/editor-setup",
],
},
{
type: "category",
label: "Concepts",
link: {
type: "generated-index",
title: "Yew concepts",
description: "Learn about the important Yew concepts!",
},
items: [
{
type: "category",
label: "Concepts",
link: {
type: 'generated-index',
title: 'Yew concepts',
description: 'Learn about the important Yew concepts!',
},
items: [
{
type: "category",
label: "Components",
link: { type: 'doc', id: 'concepts/components/introduction' },
items: [
"concepts/components/lifecycle",
"concepts/components/scope",
"concepts/components/callbacks",
"concepts/components/properties",
"concepts/components/children",
"concepts/components/refs"
],
},
{
type: "category",
label: "HTML",
link: { type: 'doc', id: 'concepts/html/introduction' },
items: [
"concepts/html/components",
"concepts/html/elements",
"concepts/html/events",
"concepts/html/classes",
"concepts/html/fragments",
"concepts/html/lists",
"concepts/html/literals-and-expressions",
"concepts/html/conditional-rendering"
]
},
{
type: "category",
label: "Function Components",
items: [
"concepts/function-components/introduction",
"concepts/function-components/attribute",
"concepts/function-components/pre-defined-hooks",
"concepts/function-components/custom-hooks",
]
},
{
type: "category",
label: "wasm-bindgen",
link: {
type: 'generated-index',
title: 'wasm-bindgen',
description: 'Learn about wasm-bindgen',
slug: '/concepts/wasm-bindgen'
},
items: [
"concepts/wasm-bindgen/introduction",
"concepts/wasm-bindgen/web-sys",
]
},
"concepts/agents",
"concepts/contexts",
"concepts/router",
"concepts/suspense",
]
type: "category",
label: "Components",
link: { type: "doc", id: "concepts/components/introduction" },
items: [
"concepts/components/lifecycle",
"concepts/components/scope",
"concepts/components/callbacks",
"concepts/components/properties",
"concepts/components/children",
"concepts/components/refs",
],
},
{
type: 'category',
label: 'Advanced topics',
link: {
type: 'generated-index',
title: 'Advanced topics',
description: 'Learn about the advanced topics and inner workings of Yew!',
},
items: [
"advanced-topics/how-it-works",
"advanced-topics/optimizations",
"advanced-topics/portals",
]
type: "category",
label: "HTML",
link: { type: "doc", id: "concepts/html/introduction" },
items: [
"concepts/html/components",
"concepts/html/elements",
"concepts/html/events",
"concepts/html/classes",
"concepts/html/fragments",
"concepts/html/lists",
"concepts/html/literals-and-expressions",
"concepts/html/conditional-rendering",
],
},
{
type: "category",
@@ -116,6 +70,20 @@ module.exports = {
"concepts/function-components/custom-hooks",
],
},
{
type: "category",
label: "wasm-bindgen",
link: {
type: "generated-index",
title: "wasm-bindgen",
description: "Learn about wasm-bindgen",
slug: "/concepts/wasm-bindgen",
},
items: [
"concepts/wasm-bindgen/introduction",
"concepts/wasm-bindgen/web-sys",
],
},
"concepts/agents",
"concepts/contexts",
"concepts/router",
@@ -125,6 +93,12 @@ module.exports = {
{
type: "category",
label: "Advanced topics",
link: {
type: "generated-index",
title: "Advanced topics",
description:
"Learn about the advanced topics and inner workings of Yew!",
},
items: [
"advanced-topics/how-it-works",
"advanced-topics/optimizations",
@@ -135,14 +109,16 @@ module.exports = {
{
type: "category",
label: "More",
link: {
type: "generated-index",
title: "Miscellaneous",
},
items: [
"more/debugging",
"more/development-tips",
"more/external-libs",
"more/css",
"more/testing",
"more/roadmap",
"more/wasm-build-tools",
],
},
{
@@ -155,26 +131,17 @@ module.exports = {
items: ["migration-guides/yew/from-0_18_0-to-0_19_0"],
},
{
type: "category",
label: "Migration guides",
items: [
{
type: "category",
label: "yew",
items: ["migration-guides/yew/from-0_18_0-to-0_19_0"],
},
{
type: "category",
label: "yew-agent",
items: ["migration-guides/yew-agent/from-0_0_0-to-0_1_0"],
},
{
type: "category",
label: "yew-router",
items: ["migration-guides/yew-router/from-0_15_0-to-0_16_0"],
},
],
type: "category",
label: "yew-agent",
items: ["migration-guides/yew-agent/from-0_0_0-to-0_1_0"],
},
"tutorial"
],
{
type: "category",
label: "yew-router",
items: ["migration-guides/yew-router/from-0_15_0-to-0_16_0"],
},
],
},
"tutorial",
],
};
You are viewing a condensed version of this merge commit. You can view the full changes here.