Skip to content

Commit

Permalink
Add example placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Aug 22, 2024
1 parent 66e5ae0 commit 0aeecbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 42 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default defineConfig({
text: 'Getting Started',
items: [
{ text: 'What is Galaxy Charts?', link: '/content/introduction' },
{ text: 'Examples', link: '/content/examples' },
{ text: 'Installation', link: '/content/installation' },
{ text: 'Connect to Galaxy Instance', link: '/content/configuration' },
]
Expand Down
46 changes: 4 additions & 42 deletions docs/content/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,10 @@
outline: deep
---

# Runtime API Examples
# Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.
Here are some examples.

The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
## NGL Protein Structure Viewer

```md
<script setup>
import { useData } from 'vitepress'

const { theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```

<script setup>
import { useData } from 'vitepress'

const { site, theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>

## More

Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).
## Plotly-JS Diagrams

0 comments on commit 0aeecbf

Please sign in to comment.