From c95c0a56cd994ff09c3aee767949a88752642409 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 7 Apr 2024 01:19:17 -0700 Subject: migrate docs to vitepress --- api-examples.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 api-examples.md (limited to 'api-examples.md') diff --git a/api-examples.md b/api-examples.md new file mode 100644 index 0000000..6bd8bb5 --- /dev/null +++ b/api-examples.md @@ -0,0 +1,49 @@ +--- +outline: deep +--- + +# Runtime API Examples + +This page demonstrates usage of some of the runtime APIs provided by VitePress. + +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: + +```md + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+``` + + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+ +## More + +Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). -- cgit v1.2.3