diff options
author | 2021-07-15 18:14:46 +0000 | |
---|---|---|
committer | 2021-07-15 18:14:46 +0000 | |
commit | f51f6c85d124226dbf35205f0550862a47ed3d5f (patch) | |
tree | 3dcdaf3019cc20362d41ae7bd791424f6e651288 /docs/src/pages/reference | |
parent | 166e22bdf35b9751dc42f5cc6cb27a99b077df93 (diff) | |
download | astro-f51f6c85d124226dbf35205f0550862a47ed3d5f.tar.gz astro-f51f6c85d124226dbf35205f0550862a47ed3d5f.tar.zst astro-f51f6c85d124226dbf35205f0550862a47ed3d5f.zip |
[ci] yarn format
Diffstat (limited to 'docs/src/pages/reference')
-rw-r--r-- | docs/src/pages/reference/api-reference.md | 9 | ||||
-rw-r--r-- | docs/src/pages/reference/builtin-components.md | 2 | ||||
-rw-r--r-- | docs/src/pages/reference/configuration-reference.md | 9 | ||||
-rw-r--r-- | docs/src/pages/reference/renderer-reference.md | 12 |
4 files changed, 24 insertions, 8 deletions
diff --git a/docs/src/pages/reference/api-reference.md b/docs/src/pages/reference/api-reference.md index 834ab92c3..b5f4f1bf1 100644 --- a/docs/src/pages/reference/api-reference.md +++ b/docs/src/pages/reference/api-reference.md @@ -65,6 +65,7 @@ const data = Astro.fetchContent('../pages/post/*.md'); // returns an array of po `Astro.site` returns a `URL` made from `buildOptions.site` in your Astro config. If undefined, this will return a URL generated from `localhost`. ## Collections API + ### `collection` prop ```jsx @@ -158,7 +159,12 @@ Astro will generate an RSS 2.0 feed at `/feed/[collection].xml` (for example, `/ ⚠️ Even though Astro will create the RSS feed for you, you’ll still need to add `<link>` tags manually in your `<head>` HTML: ```html -<link rel="alternate" type="application/rss+xml" title="My RSS Feed" href="/feed/podcast.xml" /> +<link + rel="alternate" + type="application/rss+xml" + title="My RSS Feed" + href="/feed/podcast.xml" +/> ``` ## `import.meta` @@ -176,4 +182,3 @@ export default function () { ``` [canonical]: https://en.wikipedia.org/wiki/Canonical_link_element - diff --git a/docs/src/pages/reference/builtin-components.md b/docs/src/pages/reference/builtin-components.md index 109a5cba0..54f22c2ea 100644 --- a/docs/src/pages/reference/builtin-components.md +++ b/docs/src/pages/reference/builtin-components.md @@ -17,8 +17,8 @@ import { Markdown } from 'astro/components'; ``` See our [Markdown Guide](/guides/markdown-content) for more info. -<!-- TODO: We should move some of the specific component info here. --> +<!-- TODO: We should move some of the specific component info here. --> ## `<Prism />` diff --git a/docs/src/pages/reference/configuration-reference.md b/docs/src/pages/reference/configuration-reference.md index 055024ca8..33e188a3d 100644 --- a/docs/src/pages/reference/configuration-reference.md +++ b/docs/src/pages/reference/configuration-reference.md @@ -21,10 +21,15 @@ export default { // tailwindConfig: '', // Path to tailwind.config.js if used, e.g. './tailwind.config.js' }, // component renderers which are enabled by default - renderers: ['@astrojs/renderer-svelte', '@astrojs/renderer-vue', '@astrojs/renderer-react', '@astrojs/renderer-preact'], + renderers: [ + '@astrojs/renderer-svelte', + '@astrojs/renderer-vue', + '@astrojs/renderer-react', + '@astrojs/renderer-preact', + ], }; ``` ## Snowpack Config -Astro is powered internally by Snowpack. You can configure Snowpack directly by creating a `snowpack.config.js` file. See [snowpack.dev](https://www.snowpack.dev/reference/configuration) for full documentation on this file.
\ No newline at end of file +Astro is powered internally by Snowpack. You can configure Snowpack directly by creating a `snowpack.config.js` file. See [snowpack.dev](https://www.snowpack.dev/reference/configuration) for full documentation on this file. diff --git a/docs/src/pages/reference/renderer-reference.md b/docs/src/pages/reference/renderer-reference.md index 37e5dd4e7..568650fe7 100644 --- a/docs/src/pages/reference/renderer-reference.md +++ b/docs/src/pages/reference/renderer-reference.md @@ -120,10 +120,13 @@ Note that `childHTML` is an HTML string representing this component's children. ```js import { h, renderToString } from 'xxx'; -const Wrapper = ({ value }) => h('astro-fragment', { dangerouslySetInnerHTML: { __html: value } }); +const Wrapper = ({ value }) => + h('astro-fragment', { dangerouslySetInnerHTML: { __html: value } }); function renderToStaticMarkup(Component, props, childHTML) { - const html = renderToString(h(Component, props, h(Wrapper, { value: childHTML }))); + const html = renderToString( + h(Component, props, h(Wrapper, { value: childHTML })) + ); return { html }; } ``` @@ -152,7 +155,10 @@ import SharedWrapper from './SharedWrapper.js'; export default (element) => { return (Component, props, childHTML) => { - hydrate(h(Component, props, h(SharedWrapper, { value: childHTML })), element); + hydrate( + h(Component, props, h(SharedWrapper, { value: childHTML })), + element + ); }; }; ``` |