Appearance
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": false,
"logo": "/gobiz-dark.png",
"footer": {
"message": "© 2021-present GoBiz SaaS. All rights reserved."
},
"search": {
"provider": "local"
},
"nav": [
{
"text": "Home",
"link": "/"
},
{
"text": "Envato",
"link": "https://codecanyon.net/user/nativecode"
},
{
"text": "NativeCode Store",
"link": "https://nativecode.in/"
},
{
"text": "Support",
"link": "https://support.nativecode.in/"
},
{
"text": "Affiliate",
"link": "https://store.nativecode.in/affiliates"
}
],
"sidebar": {
"/gobiz/": [
{
"items": [
{
"text": "Overview",
"link": "/gobiz/"
},
{
"text": "Features",
"collapsed": true,
"items": [
{
"text": "Landing Page",
"link": "/gobiz/features/gobiz_landing-page"
},
{
"text": "Admin Panel",
"link": "/gobiz/features/gobiz-admin-panel"
},
{
"text": "User Panel",
"link": "/gobiz/features/gobiz-user-panel"
}
]
},
{
"text": "Installation Guide",
"collapsed": false,
"items": [
{
"text": "Server Requirements",
"link": "/gobiz/server-requirements"
},
{
"text": "Database Setup",
"link": "/gobiz/database-setup"
},
{
"text": "Installation",
"collapsed": true,
"items": [
{
"text": "Installation Steps",
"link": "/gobiz/installation"
},
{
"text": "Video Tutorial",
"link": "/gobiz/installation-video-tutorial"
}
]
}
]
},
{
"text": "Setup Guide",
"collapsed": true,
"items": [
{
"text": "Languages",
"collapsed": true,
"items": [
{
"text": "Default Language",
"link": "/gobiz/setup/how-to-set-default-language"
},
{
"text": "Remove Languages",
"link": "/gobiz/setup/remove-langs"
},
{
"text": "Add Custom Words",
"link": "/gobiz/setup/how-to-add-new-words"
},
{
"text": "Update Language Translations",
"link": "/gobiz/setup/update-language-translations"
}
]
},
{
"text": "Integrations",
"collapsed": true,
"items": [
{
"text": "Set Up reCAPTCHA",
"link": "/gobiz/setup/how-to-integrate-recaptcha"
},
{
"text": "Pusher Beams",
"link": "/gobiz/setup/how-to-get-pusher-beams-instance-id-and-secret-key"
},
{
"text": "Slack Webhook",
"link": "/gobiz/setup/how-to-get-slack-webhook-url"
}
]
},
{
"text": "Email",
"collapsed": true,
"items": [
{
"text": "Email Settings",
"link": "/gobiz/setup/how-to-configure-email"
},
{
"text": "Mailgun SMTP",
"link": "/gobiz/setup/where-can-I-find-my-API-keys-and-SMTP-credentials"
}
]
},
{
"text": "Domains",
"collapsed": true,
"items": [
{
"text": "Custom Domain",
"link": "/gobiz/setup/how-to-add-custom-domain-to-vcard-or-store"
},
{
"text": "Manage Domains",
"link": "/gobiz/setup/how-to-add-custom-domain-in-your-vcard"
},
{
"text": "Wildcard Subdomain",
"link": "/gobiz/setup/how-to-create-a-wildcard-subdomain"
}
]
},
{
"text": "Payment Gateways",
"collapsed": true,
"items": [
{
"text": "PayPal",
"link": "/gobiz/setup/how-to-configure-paypal"
},
{
"text": "Razorpay",
"link": "/gobiz/setup/how-to-configure-razorpay"
},
{
"text": "PhonePe",
"link": "/gobiz/setup/how-to-configure-phonepe"
},
{
"text": "Stripe",
"link": "/gobiz/setup/how-to-configure-stripe"
},
{
"text": "Paystack",
"link": "/gobiz/setup/how-to-configure-paystack"
},
{
"text": "Mollie",
"link": "/gobiz/setup/how-to-configure-mollie"
},
{
"text": "ToyyibPay",
"link": "/gobiz/setup/how-to-configure-toyyibpay"
},
{
"text": "Flutterwave",
"link": "/gobiz/setup/how-to-configure-flutterwave"
},
{
"text": "Mercado Pago",
"link": "/gobiz/setup/how-to-configure-mercadopago"
},
{
"text": "Paddle",
"link": "/gobiz/setup/how-to-configure-paddle"
},
{
"text": "Xendit",
"link": "/gobiz/setup/how-to-configure-xendit"
}
]
},
{
"text": "System",
"collapsed": true,
"items": [
{
"text": "Currencies",
"link": "/gobiz/setup/how-to-configure-currency"
},
{
"text": "Cron Jobs",
"link": "/gobiz/setup/how-to-configure-cronjob"
},
{
"text": "NFC Cards",
"link": "/gobiz/setup/how-to-manage-nfc-cards"
}
]
}
]
},
{
"text": "Web Templates",
"collapsed": true,
"items": [
{
"text": "GoBiz Original",
"collapsed": true,
"items": [
{
"text": "Folder Structure",
"link": "/gobiz/web-templates/gobiz-original/folder-structure"
}
]
},
{
"text": "GoBiz Modern",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/web-templates/gobiz-modern/installation"
},
{
"text": "Folder Structure",
"link": "/gobiz/web-templates/gobiz-modern/folder-structure"
}
]
},
{
"text": "GoBiz Rich UI",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/web-templates/gobiz-rich-ui/installation"
},
{
"text": "Folder Structure",
"link": "/gobiz/web-templates/gobiz-rich-ui/folder-structure"
}
]
}
]
},
{
"text": "Plugins",
"collapsed": true,
"items": [
{
"text": "Maintenance Mode",
"link": "/gobiz/plugins/how-to-use-maintenance-mode"
},
{
"text": "System Health",
"link": "/gobiz/plugins/system-health-check"
},
{
"text": "Zapier",
"collapsed": true,
"items": [
{
"text": "Overview",
"link": "/gobiz/plugins/zapier/overview"
},
{
"text": "Installation",
"link": "/gobiz/plugins/zapier/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/zapier/configuration"
}
]
},
{
"text": "AI Builder",
"collapsed": true,
"items": [
{
"text": "Plugin Configuration",
"link": "/gobiz/plugins/ai-builder"
},
{
"text": "Plan Configuration",
"link": "/gobiz/plugins/ai-plans"
}
]
},
{
"text": "React Modern User Dashboard",
"link": "/gobiz/plugins/react-modern-user-dashboard"
},
{
"text": "Telegram Notification",
"link": "/gobiz/plugins/telegram-notification"
},
{
"text": "2FA Plugin",
"link": "/gobiz/plugins/2fa"
},
{
"text": "Slack Notification",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/slack"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/slack-configuration"
}
]
},
{
"text": "MSG91 SMS",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/msg91sms"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/msg91sms-configuration"
}
]
},
{
"text": "Google Wallet",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/google-wallet"
},
{
"text": "Configuration",
"link": "gobiz/plugins/google-wallet-configuration"
}
]
},
{
"text": "Stripe Recurring",
"link": "/gobiz/plugins/stripe-recurring"
},
{
"text": "Razorpay Recurring",
"link": "/gobiz/plugins/razorpay-recurring"
},
{
"text": "Google OAuth",
"link": "/gobiz/plugins/google-oauth"
},
{
"text": "MSG91 WhatsApp",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/msg91whatsapp/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/msg91whatsapp/configuration"
}
]
},
{
"text": "Twilio WhatsApp",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/twiliowhatsapp/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/twiliowhatsapp/configuration"
}
]
},
{
"text": "Twilio SMS",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/twiliosms/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/twiliosms/configuration"
}
]
},
{
"text": "Directory",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/directory/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/directory/configuration"
}
]
},
{
"text": "Coinbase",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/coinbase/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/coinbase/configuration"
}
]
},
{
"text": "Moneroo",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/moneroo/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/moneroo/configuration"
}
]
},
{
"text": "Dodo Payments Recurring",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/dodo/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/dodo/configuration"
}
]
},
{
"text": "Paddle Recurring",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/paddle/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/paddle/configuration"
}
]
},
{
"text": "MercadoPago Recurring",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/mercadopago/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/mercadopago/configuration"
}
]
},
{
"text": "Paypal Recurring",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/paypal-recurring/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/paypal-recurring/configuration"
}
]
},
{
"text": "SSLCommerz",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/ssl-commerz/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/ssl-commerz/configuration"
}
]
},
{
"text": "Cashfree Recurring",
"collapsed": true,
"items": [
{
"text": "Installation",
"link": "/gobiz/plugins/cashfree-recurring/installation"
},
{
"text": "Configuration",
"link": "/gobiz/plugins/cashfree-recurring/configuration"
}
]
}
]
},
{
"text": "Software Update",
"link": "gobiz/software-update"
},
{
"text": "Release Notes",
"link": "/gobiz/release-notes.md"
},
{
"text": "Help",
"collapsed": true,
"items": [
{
"text": "Support",
"link": "https://support.nativecode.in"
}
]
},
{
"text": "Customization",
"link": "/gobiz/setup/customization"
}
]
}
],
"/gobiz-mobile-app/": [
{
"items": [
{
"text": "Overview",
"link": "/gobiz-mobile-app/"
},
{
"text": "Features",
"link": "/gobiz-mobile-app/features"
},
{
"text": "Installation Guide",
"collapsed": false,
"items": [
{
"text": "System Requirements",
"link": "/gobiz-mobile-app/system-requirements"
},
{
"text": "Configure and Install",
"link": "/gobiz-mobile-app/plugin-configuration"
},
{
"text": "App Configuration",
"link": "/gobiz-mobile-app/app-configuration"
},
{
"text": "Build App",
"link": "/gobiz-mobile-app/app-build"
},
{
"text": "Publish Signed App",
"link": "/gobiz-mobile-app/publish-app"
}
]
},
{
"text": "Setup in-app purchase",
"collapsed": false,
"items": [
{
"text": "Android",
"collapsed": true,
"items": [
{
"text": "One Time Purchase",
"link": "/gobiz-mobile-app/in-app-purchase/android/android"
},
{
"text": "Recurring Subscription",
"link": "/gobiz-mobile-app/in-app-purchase/android/android-plan-setup.md"
}
]
},
{
"text": "iOS",
"collapsed": true,
"items": [
{
"text": "One Time Purchase",
"link": "/gobiz-mobile-app/in-app-purchase/ios/ios"
},
{
"text": "Recurring Subscription",
"link": "/gobiz-mobile-app/in-app-purchase/ios/set-up-subscription-plans-for-ios.md"
}
]
}
]
},
{
"text": "Plugins",
"collapsed": true,
"items": [
{
"text": "Plugin Installation",
"link": "/gobiz-mobile-app/plugins/plugin-installation"
},
{
"text": "Firebase App Notification",
"collapsed": true,
"items": [
{
"text": "Plugin Configuration",
"link": "/gobiz-mobile-app/plugins/plugin-configuration"
},
{
"text": "App Configuration",
"link": "/gobiz-mobile-app/plugins/app-configuration"
},
{
"text": "Notification Settings",
"link": "/gobiz-mobile-app/plugins/notification-configuration"
}
]
},
{
"text": "WhatsApp Chat Button",
"link": "/gobiz-mobile-app/plugins/whatsapp-chat-button"
},
{
"text": "Google OAuth",
"link": "/gobiz-mobile-app/plugins/google-oauth-mobile"
}
]
},
{
"text": "Release Notes",
"link": "/gobiz-mobile-app/release-notes.md"
},
{
"text": "Help",
"collapsed": true,
"items": [
{
"text": "Support",
"link": "https://support.nativecode.in"
}
]
},
{
"text": "Customization",
"link": "/gobiz-mobile-app/customization.md"
},
{
"text": "App Publishing Service",
"link": "/gobiz-mobile-app/app-publishing-service.md"
}
]
}
]
}
}Page Data
{
"title": "Runtime API Examples",
"description": "",
"frontmatter": {
"outline": "deep"
},
"headers": [],
"relativePath": "api-examples.md",
"filePath": "api-examples.md"
}Page Frontmatter
{
"outline": "deep"
}More
Check out the documentation for the full list of runtime APIs.
