Fix code examples that would fail if copy-pasted (#1050)
This commit is contained in:
parent
3db90ea403
commit
71882300b0
5 changed files with 7 additions and 7 deletions
|
@ -42,7 +42,7 @@ const data = Astro.fetchContent('../pages/post/*.md'); // returns an array of po
|
||||||
**/
|
**/
|
||||||
astro: {
|
astro: {
|
||||||
headers: [], // an array of h1...h6 elements in the markdown file
|
headers: [], // an array of h1...h6 elements in the markdown file
|
||||||
source: '' // raw source of the markdown file
|
source: '', // raw source of the markdown file
|
||||||
html: '' // rendered HTML of the markdown file
|
html: '' // rendered HTML of the markdown file
|
||||||
},
|
},
|
||||||
url: '' // the rendered path
|
url: '' // the rendered path
|
||||||
|
|
|
@ -42,7 +42,7 @@ const data = Astro.fetchContent('../pages/post/*.md'); // returns an array of po
|
||||||
**/
|
**/
|
||||||
astro: {
|
astro: {
|
||||||
headers: [], // an array of h1...h6 elements in the markdown file
|
headers: [], // an array of h1...h6 elements in the markdown file
|
||||||
source: '' // raw source of the markdown file
|
source: '', // raw source of the markdown file
|
||||||
html: '' // rendered HTML of the markdown file
|
html: '' // rendered HTML of the markdown file
|
||||||
},
|
},
|
||||||
url: '' // the rendered path
|
url: '' // the rendered path
|
||||||
|
|
|
@ -59,9 +59,9 @@ export default {
|
||||||
snowpackPlugin: '@snowpack/plugin-xxx', // optional, the name of a snowpack plugin to inject
|
snowpackPlugin: '@snowpack/plugin-xxx', // optional, the name of a snowpack plugin to inject
|
||||||
snowpackPluginOptions: { example: true }, // optional, any options to be forwarded to the snowpack plugin
|
snowpackPluginOptions: { example: true }, // optional, any options to be forwarded to the snowpack plugin
|
||||||
knownEntrypoint: ['framework'], // optional, entrypoint modules that will be used by compiled source
|
knownEntrypoint: ['framework'], // optional, entrypoint modules that will be used by compiled source
|
||||||
external: ['dep'] // optional, dependencies that should not be built by snowpack
|
external: ['dep'], // optional, dependencies that should not be built by snowpack
|
||||||
polyfills: ['./shadow-dom-polyfill.js'] // optional, module scripts that should be loaded before client hydration.
|
polyfills: ['./shadow-dom-polyfill.js'], // optional, module scripts that should be loaded before client hydration.
|
||||||
hydrationPolyfills: ['./hydrate-framework.js'] // optional, polyfills that need to run before hydration ever occurs.
|
hydrationPolyfills: ['./hydrate-framework.js'], // optional, polyfills that need to run before hydration ever occurs.
|
||||||
jsxImportSource: 'preact', // optional, the name of the library from which JSX is imported
|
jsxImportSource: 'preact', // optional, the name of the library from which JSX is imported
|
||||||
jsxTransformOptions: async () => { // optional, a function to transform JSX files
|
jsxTransformOptions: async () => { // optional, a function to transform JSX files
|
||||||
const { default: { default: jsx }} = await import('@babel/plugin-transform-react-jsx');
|
const { default: { default: jsx }} = await import('@babel/plugin-transform-react-jsx');
|
||||||
|
|
|
@ -118,7 +118,7 @@ The `mount` configuration changes where Snowpack looks for and builds files. Eve
|
||||||
```diff
|
```diff
|
||||||
mount: {
|
mount: {
|
||||||
- /* ... */
|
- /* ... */
|
||||||
+ // directory name: 'build directory'
|
+ // directory name: 'build directory',
|
||||||
+ public: '/',
|
+ public: '/',
|
||||||
+ src: '/dist',
|
+ src: '/dist',
|
||||||
},
|
},
|
||||||
|
|
|
@ -172,7 +172,7 @@ The `mount` configuration changes where Snowpack scan for and builds files. Head
|
||||||
|
|
||||||
mount: {
|
mount: {
|
||||||
- /* ... */
|
- /* ... */
|
||||||
+ // directory name: 'build directory'
|
+ // directory name: 'build directory',
|
||||||
+ public: '/',
|
+ public: '/',
|
||||||
+ src: '/dist',
|
+ src: '/dist',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue