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
<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>Results
Theme Data
{
"siteTitle": "Physics Foundations Soc.",
"nav": [
{
"text": "Home",
"link": "/"
},
{
"text": "Members",
"link": "/suntola/"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
},
{
"text": "Period Doubling",
"link": "/lehto/period-doubling"
},
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
}
],
"sidebar": {
"/suntola/atomic-layer-deposition": {
"base": "",
"items": [
{
"text": "Physics Foundations Soc.",
"link": "/",
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
}
]
}
]
},
"/suntola/renewable-energy": {
"base": "",
"items": [
{
"text": "Physics Foundations Soc.",
"link": "/",
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
}
]
}
]
},
"/suntola/dynamic-universe": {
"base": "",
"items": [
{
"text": "Physics Foundations Soc.",
"link": "/",
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
}
]
}
]
},
"/suntola/": {
"base": "",
"items": [
{
"text": "Members",
"collapsed": false,
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
},
{
"text": "Ari Lehto",
"link": "/lehto/",
"items": [
{
"text": "Period Doubling",
"link": "/lehto/period-doubling"
}
]
},
{
"text": "Heikki Sipilä",
"link": "/sipilä/",
"items": [
{
"text": "Zero-Energy Principle",
"link": "/sipilä/zero-energy-principle"
}
]
},
{
"text": "Tarja Kallio-Tamminen",
"link": "/kallio-tamminen/"
},
{
"text": "Avril Styrman",
"link": "/styrman"
},
{
"text": "Petri Lievonen",
"link": "/lievonen/",
"items": [
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
},
{
"text": "Natural Modeling Process",
"link": "/lievonen/cyber/"
}
]
},
{
"text": "Marja-Liisa Kakkuri-Knuuttila",
"link": "/kakkuri-knuuttila"
},
{
"text": "More members and collaborators",
"link": "/members-and-collaborators"
}
]
}
]
},
"/lehto/period-doubling": {
"base": "",
"items": [
{
"text": "Physics Foundations Soc.",
"link": "/",
"items": [
{
"text": "Ari Lehto",
"link": "/lehto/",
"items": [
{
"text": "Period Doubling",
"link": "/lehto/period-doubling"
}
]
}
]
}
]
},
"/lehto/": {
"base": "",
"items": [
{
"text": "Members",
"collapsed": false,
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
},
{
"text": "Ari Lehto",
"link": "/lehto/",
"items": [
{
"text": "Period Doubling",
"link": "/lehto/period-doubling"
}
]
},
{
"text": "Heikki Sipilä",
"link": "/sipilä/",
"items": [
{
"text": "Zero-Energy Principle",
"link": "/sipilä/zero-energy-principle"
}
]
},
{
"text": "Tarja Kallio-Tamminen",
"link": "/kallio-tamminen/"
},
{
"text": "Avril Styrman",
"link": "/styrman"
},
{
"text": "Petri Lievonen",
"link": "/lievonen/",
"items": [
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
},
{
"text": "Natural Modeling Process",
"link": "/lievonen/cyber/"
}
]
},
{
"text": "Marja-Liisa Kakkuri-Knuuttila",
"link": "/kakkuri-knuuttila"
},
{
"text": "More members and collaborators",
"link": "/members-and-collaborators"
}
]
}
]
},
"/sipilä/": {
"base": "",
"items": [
{
"text": "Members",
"collapsed": false,
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
},
{
"text": "Ari Lehto",
"link": "/lehto/",
"items": [
{
"text": "Period Doubling",
"link": "/lehto/period-doubling"
}
]
},
{
"text": "Heikki Sipilä",
"link": "/sipilä/",
"items": [
{
"text": "Zero-Energy Principle",
"link": "/sipilä/zero-energy-principle"
}
]
},
{
"text": "Tarja Kallio-Tamminen",
"link": "/kallio-tamminen/"
},
{
"text": "Avril Styrman",
"link": "/styrman"
},
{
"text": "Petri Lievonen",
"link": "/lievonen/",
"items": [
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
},
{
"text": "Natural Modeling Process",
"link": "/lievonen/cyber/"
}
]
},
{
"text": "Marja-Liisa Kakkuri-Knuuttila",
"link": "/kakkuri-knuuttila"
},
{
"text": "More members and collaborators",
"link": "/members-and-collaborators"
}
]
}
]
},
"/kallio-tamminen/": {
"base": "",
"items": [
{
"text": "Members",
"collapsed": false,
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
},
{
"text": "Ari Lehto",
"link": "/lehto/",
"items": [
{
"text": "Period Doubling",
"link": "/lehto/period-doubling"
}
]
},
{
"text": "Heikki Sipilä",
"link": "/sipilä/",
"items": [
{
"text": "Zero-Energy Principle",
"link": "/sipilä/zero-energy-principle"
}
]
},
{
"text": "Tarja Kallio-Tamminen",
"link": "/kallio-tamminen/"
},
{
"text": "Avril Styrman",
"link": "/styrman"
},
{
"text": "Petri Lievonen",
"link": "/lievonen/",
"items": [
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
},
{
"text": "Natural Modeling Process",
"link": "/lievonen/cyber/"
}
]
},
{
"text": "Marja-Liisa Kakkuri-Knuuttila",
"link": "/kakkuri-knuuttila"
},
{
"text": "More members and collaborators",
"link": "/members-and-collaborators"
}
]
}
]
},
"/styrman": {
"base": "",
"items": [
{
"text": "Members",
"collapsed": false,
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
},
{
"text": "Ari Lehto",
"link": "/lehto/",
"items": [
{
"text": "Period Doubling",
"link": "/lehto/period-doubling"
}
]
},
{
"text": "Heikki Sipilä",
"link": "/sipilä/",
"items": [
{
"text": "Zero-Energy Principle",
"link": "/sipilä/zero-energy-principle"
}
]
},
{
"text": "Tarja Kallio-Tamminen",
"link": "/kallio-tamminen/"
},
{
"text": "Avril Styrman",
"link": "/styrman"
},
{
"text": "Petri Lievonen",
"link": "/lievonen/",
"items": [
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
},
{
"text": "Natural Modeling Process",
"link": "/lievonen/cyber/"
}
]
},
{
"text": "Marja-Liisa Kakkuri-Knuuttila",
"link": "/kakkuri-knuuttila"
},
{
"text": "More members and collaborators",
"link": "/members-and-collaborators"
}
]
}
]
},
"/lievonen/visual/": {
"base": "",
"items": [
{
"text": "Physics Foundations Soc.",
"link": "/",
"items": [
{
"text": "Petri Lievonen",
"link": "/lievonen/",
"items": [
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
},
{
"text": "Natural Modeling Process",
"link": "/lievonen/cyber/"
}
]
}
]
}
]
},
"/lievonen/cyber/": {
"base": "",
"items": [
{
"text": "Physics Foundations Soc.",
"link": "/",
"items": [
{
"text": "Petri Lievonen",
"link": "/lievonen/",
"items": [
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
},
{
"text": "Natural Modeling Process",
"link": "/lievonen/cyber/"
}
]
}
]
}
]
},
"/lievonen/": {
"base": "",
"items": [
{
"text": "Members",
"collapsed": false,
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
},
{
"text": "Ari Lehto",
"link": "/lehto/",
"items": [
{
"text": "Period Doubling",
"link": "/lehto/period-doubling"
}
]
},
{
"text": "Heikki Sipilä",
"link": "/sipilä/",
"items": [
{
"text": "Zero-Energy Principle",
"link": "/sipilä/zero-energy-principle"
}
]
},
{
"text": "Tarja Kallio-Tamminen",
"link": "/kallio-tamminen/"
},
{
"text": "Avril Styrman",
"link": "/styrman"
},
{
"text": "Petri Lievonen",
"link": "/lievonen/",
"items": [
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
},
{
"text": "Natural Modeling Process",
"link": "/lievonen/cyber/"
}
]
},
{
"text": "Marja-Liisa Kakkuri-Knuuttila",
"link": "/kakkuri-knuuttila"
},
{
"text": "More members and collaborators",
"link": "/members-and-collaborators"
}
]
}
]
},
"/kakkuri-knuuttila": {
"base": "",
"items": [
{
"text": "Members",
"collapsed": false,
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
},
{
"text": "Ari Lehto",
"link": "/lehto/",
"items": [
{
"text": "Period Doubling",
"link": "/lehto/period-doubling"
}
]
},
{
"text": "Heikki Sipilä",
"link": "/sipilä/",
"items": [
{
"text": "Zero-Energy Principle",
"link": "/sipilä/zero-energy-principle"
}
]
},
{
"text": "Tarja Kallio-Tamminen",
"link": "/kallio-tamminen/"
},
{
"text": "Avril Styrman",
"link": "/styrman"
},
{
"text": "Petri Lievonen",
"link": "/lievonen/",
"items": [
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
},
{
"text": "Natural Modeling Process",
"link": "/lievonen/cyber/"
}
]
},
{
"text": "Marja-Liisa Kakkuri-Knuuttila",
"link": "/kakkuri-knuuttila"
},
{
"text": "More members and collaborators",
"link": "/members-and-collaborators"
}
]
}
]
},
"/members-and-collaborators": {
"base": "",
"items": [
{
"text": "Members",
"collapsed": false,
"items": [
{
"text": "Tuomo Suntola",
"link": "/suntola/",
"items": [
{
"text": "Atomic Layer Deposition",
"link": "/suntola/atomic-layer-deposition"
},
{
"text": "Renewable Energy",
"link": "/suntola/renewable-energy"
},
{
"text": "Dynamic Universe",
"link": "/suntola/dynamic-universe"
}
]
},
{
"text": "Ari Lehto",
"link": "/lehto/",
"items": [
{
"text": "Period Doubling",
"link": "/lehto/period-doubling"
}
]
},
{
"text": "Heikki Sipilä",
"link": "/sipilä/",
"items": [
{
"text": "Zero-Energy Principle",
"link": "/sipilä/zero-energy-principle"
}
]
},
{
"text": "Tarja Kallio-Tamminen",
"link": "/kallio-tamminen/"
},
{
"text": "Avril Styrman",
"link": "/styrman"
},
{
"text": "Petri Lievonen",
"link": "/lievonen/",
"items": [
{
"text": "Mathematical Visualizations",
"link": "/lievonen/visual/"
},
{
"text": "Natural Modeling Process",
"link": "/lievonen/cyber/"
}
]
},
{
"text": "Marja-Liisa Kakkuri-Knuuttila",
"link": "/kakkuri-knuuttila"
},
{
"text": "More members and collaborators",
"link": "/members-and-collaborators"
}
]
}
]
}
},
"editLink": {
"pattern": "https://github.com/physicsfoundations/physicsfoundations.org/edit/main/docs/:path",
"text": "Edit this page on GitHub"
},
"footer": {
"message": "Email: <a href=\"mailto:[email protected]\">[email protected]</a>",
"copyright": "Copyright © 2024–present Physics Foundations Society ry. ID 3066327-8"
}
}Page Data
{
"title": "Runtime API Examples",
"description": "",
"frontmatter": {
"outline": "deep"
},
"headers": [],
"relativePath": "api-examples.md",
"filePath": "api-examples.md",
"lastUpdated": 1764534210000
}Page Frontmatter
{
"outline": "deep"
}More
Check out the documentation for the full list of runtime APIs.