diff options
author | 2021-07-01 05:43:02 -0700 | |
---|---|---|
committer | 2021-07-01 08:43:02 -0400 | |
commit | 8f74b3bdbb1cae31e036daf1b7f5fc28686ddd4d (patch) | |
tree | ef46c13328abae62209ad30d49401285f5f72a01 /examples/with-markdown/src | |
parent | 6a660f1b08430fe6e8f0e0939220511827cb0bc0 (diff) | |
download | astro-8f74b3bdbb1cae31e036daf1b7f5fc28686ddd4d.tar.gz astro-8f74b3bdbb1cae31e036daf1b7f5fc28686ddd4d.tar.zst astro-8f74b3bdbb1cae31e036daf1b7f5fc28686ddd4d.zip |
update example astro inline docs (#592)
Diffstat (limited to 'examples/with-markdown/src')
-rw-r--r-- | examples/with-markdown/src/pages/index.astro | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/with-markdown/src/pages/index.astro b/examples/with-markdown/src/pages/index.astro index 666e0557f..6e402fb1c 100644 --- a/examples/with-markdown/src/pages/index.astro +++ b/examples/with-markdown/src/pages/index.astro @@ -1,4 +1,5 @@ --- +// Component Imports import { Markdown } from 'astro/components'; import Layout from '../layouts/main.astro'; import ReactCounter from '../components/ReactCounter.jsx'; @@ -6,11 +7,17 @@ import PreactCounter from '../components/PreactCounter.tsx'; import VueCounter from '../components/VueCounter.vue'; import SvelteCounter from '../components/SvelteCounter.svelte'; +// Component Script: +// You can write any JavaScript/TypeScript that you'd like here. +// It will run during the build, but never in the browser. +// All variables are available to use in the HTML template below. const title = 'Astro Markdown'; const variable = 'content'; const items = ['A', 'B', 'C']; ---- +// Full Astro Component Syntax: +// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md +--- <Layout content={{ title }}> <Markdown> # Introducing {title} |