Docs: Add READMEs for renderers (#1351)
* Add README stub for renderers * Add renderer READMEs
This commit is contained in:
parent
5237db20b9
commit
97d37f8f49
8 changed files with 184 additions and 1 deletions
10
.changeset/blue-birds-pretend.md
Normal file
10
.changeset/blue-birds-pretend.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
'@astrojs/renderer-lit': patch
|
||||||
|
'@astrojs/renderer-preact': patch
|
||||||
|
'@astrojs/renderer-react': patch
|
||||||
|
'@astrojs/renderer-solid': patch
|
||||||
|
'@astrojs/renderer-svelte': patch
|
||||||
|
'@astrojs/renderer-vue': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update READMEs for all renderers
|
11
packages/renderers/README.md
Normal file
11
packages/renderers/README.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Astro Renderers
|
||||||
|
|
||||||
|
Astro is designed to support your favorite UI frameworks. [React][react], [Svelte][svelte], [Vue][vue], and [Preact][preact] are all built-in to Astro and supported out of the box. No configuration is needed to enable these.
|
||||||
|
|
||||||
|
For adding additional frameworks (or your own custom one), please refer to [the full documentation][renderer-docs].
|
||||||
|
|
||||||
|
[preact]: https://npm.im/@astrojs/renderer-preact
|
||||||
|
[react]: https://npm.im/@astrojs/renderer-react
|
||||||
|
[renderer-docs]: https://docs.astro.build/reference/renderer-reference
|
||||||
|
[svelte]: https://npm.im/@astrojs/renderer-svelte
|
||||||
|
[vue]: https://npm.im/@astrojs/renderer-vue
|
|
@ -77,4 +77,11 @@ import '../components/my-element.js';
|
||||||
<my-element client:visible />
|
<my-element client:visible />
|
||||||
```
|
```
|
||||||
|
|
||||||
The above will only load the element's JavaScript when the user has scrolled it into view. Since it is server rendered they will not see any jank; it will load and hydrate transparently.
|
The above will only load the element's JavaScript when the user has scrolled it into view. Since it is server rendered they will not see any jank; it will load and hydrate transparently.
|
||||||
|
|
||||||
|
## More Documentation
|
||||||
|
|
||||||
|
[Astro Renderer Documentation][renderer-docs]
|
||||||
|
|
||||||
|
[astro]: https://astro.build
|
||||||
|
[renderer-docs]: https://docs.astro.build/reference/renderer-reference
|
||||||
|
|
31
packages/renderers/renderer-preact/README.md
Normal file
31
packages/renderers/renderer-preact/README.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# @astrojs/renderer-preact
|
||||||
|
|
||||||
|
This is a plugin for [Astro][astro] apps that enables server-side rendering of Preact components.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Install `@astrojs/renderer-preact` and then add it to your `astro.config.mjs` in the `renderers` property:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @astrojs/renderer-preact
|
||||||
|
```
|
||||||
|
|
||||||
|
__astro.config.mjs__
|
||||||
|
|
||||||
|
```js
|
||||||
|
export default {
|
||||||
|
// ...
|
||||||
|
|
||||||
|
renderers: [
|
||||||
|
// ...
|
||||||
|
'@astrojs/renderer-preact'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
[Astro Renderer Documentation][renderer-docs]
|
||||||
|
|
||||||
|
[astro]: https://astro.build
|
||||||
|
[renderer-docs]: https://docs.astro.build/reference/renderer-reference
|
31
packages/renderers/renderer-react/README.md
Normal file
31
packages/renderers/renderer-react/README.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# @astrojs/renderer-react
|
||||||
|
|
||||||
|
This is a plugin for [Astro][astro] apps that enables server-side rendering of React components.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Install `@astrojs/renderer-react` and then add it to your `astro.config.mjs` in the `renderers` property:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @astrojs/renderer-react
|
||||||
|
```
|
||||||
|
|
||||||
|
__astro.config.mjs__
|
||||||
|
|
||||||
|
```js
|
||||||
|
export default {
|
||||||
|
// ...
|
||||||
|
|
||||||
|
renderers: [
|
||||||
|
// ...
|
||||||
|
'@astrojs/renderer-react'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
[Astro Renderer Documentation][renderer-docs]
|
||||||
|
|
||||||
|
[astro]: https://astro.build
|
||||||
|
[renderer-docs]: https://docs.astro.build/reference/renderer-reference
|
31
packages/renderers/renderer-solid/README.md
Normal file
31
packages/renderers/renderer-solid/README.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# @astrojs/renderer-solid
|
||||||
|
|
||||||
|
This is a plugin for [Astro][astro] apps that enables server-side rendering of SolidJS components.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Install `@astrojs/renderer-solid` and then add it to your `astro.config.mjs` in the `renderers` property:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @astrojs/renderer-solid
|
||||||
|
```
|
||||||
|
|
||||||
|
__astro.config.mjs__
|
||||||
|
|
||||||
|
```js
|
||||||
|
export default {
|
||||||
|
// ...
|
||||||
|
|
||||||
|
renderers: [
|
||||||
|
// ...
|
||||||
|
'@astrojs/renderer-solid'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
[Astro Renderer Documentation][renderer-docs]
|
||||||
|
|
||||||
|
[astro]: https://astro.build
|
||||||
|
[renderer-docs]: https://docs.astro.build/reference/renderer-reference
|
31
packages/renderers/renderer-svelte/README.md
Normal file
31
packages/renderers/renderer-svelte/README.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# @astrojs/renderer-svelte
|
||||||
|
|
||||||
|
This is a plugin for [Astro][astro] apps that enables server-side rendering of Svelte components.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Install `@astrojs/renderer-svelte` and then add it to your `astro.config.mjs` in the `renderers` property:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @astrojs/renderer-svelte
|
||||||
|
```
|
||||||
|
|
||||||
|
__astro.config.mjs__
|
||||||
|
|
||||||
|
```js
|
||||||
|
export default {
|
||||||
|
// ...
|
||||||
|
|
||||||
|
renderers: [
|
||||||
|
// ...
|
||||||
|
'@astrojs/renderer-svelte'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
[Astro Renderer Documentation][renderer-docs]
|
||||||
|
|
||||||
|
[astro]: https://astro.build
|
||||||
|
[renderer-docs]: https://docs.astro.build/reference/renderer-reference
|
31
packages/renderers/renderer-vue/README.md
Normal file
31
packages/renderers/renderer-vue/README.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# @astrojs/renderer-vue
|
||||||
|
|
||||||
|
This is a plugin for [Astro][astro] apps that enables server-side rendering of Vue 3.x components.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Install `@astrojs/renderer-vue` and then add it to your `astro.config.mjs` in the `renderers` property:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @astrojs/renderer-vue
|
||||||
|
```
|
||||||
|
|
||||||
|
__astro.config.mjs__
|
||||||
|
|
||||||
|
```js
|
||||||
|
export default {
|
||||||
|
// ...
|
||||||
|
|
||||||
|
renderers: [
|
||||||
|
// ...
|
||||||
|
'@astrojs/renderer-vue'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
[Astro Renderer Documentation][renderer-docs]
|
||||||
|
|
||||||
|
[astro]: https://astro.build
|
||||||
|
[renderer-docs]: https://docs.astro.build/reference/renderer-reference
|
Loading…
Reference in a new issue