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><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,
"nav": [
{
"text": "Home",
"link": "/"
},
{
"text": "Apresentação",
"link": "/Apresentacao/entrada.md"
},
{
"text": "Receção",
"link": "/Rececao/candidaturas.md"
},
{
"text": "Apoios",
"link": "/markdown-examples"
},
{
"text": "Consultas",
"link": "/markdown-examples"
},
{
"text": "Enquadramentos",
"link": "/markdown-examples"
},
{
"text": "Reportes",
"link": "/markdown-examples"
},
{
"text": "Listagens",
"link": "/markdown-examples"
},
{
"text": "Definições",
"link": "/markdown-examples"
}
],
"logo": "/bpf.svg",
"search": {
"provider": "local"
},
"mermaid": {},
"lastUpdated": {
"text": "Última atualização",
"formatOptions": {
"dateStyle": "full",
"timeStyle": "medium"
}
},
"docFooter": {
"prev": "Página anterior",
"next": "Próxima página"
},
"sidebar": [
{
"text": "Apresentação",
"items": [
{
"text": "Login",
"link": "/Apresentacao/entrada.md"
},
{
"text": "Homepage",
"link": "/Apresentacao/home.md"
}
]
},
{
"text": "Receção",
"items": [
{
"text": "Candidaturas",
"link": "/Rececao/candidaturas.md"
},
{
"text": "Restruturação",
"link": "/Rececao/restruturacoes.md"
},
{
"text": "Incidentes",
"link": "/Rececao/incidentes.md"
},
{
"text": "Pendentes",
"link": "/Rececao/pendentes.md"
}
]
},
{
"text": "Apoios",
"items": [
{
"text": "Registar Apoio",
"link": "/Apoios/registarApoio.md"
},
{
"text": "Resposta Ficheiro AD&C",
"link": "/Apoios/respostaFicheiroADC.md"
},
{
"text": "Consultar AD&C",
"link": "/Apoios/consultarADC.md"
},
{
"text": "Ficheiro de descativação de desistências",
"link": "/Apoios/descativacaoDesistencias.md"
},
{
"text": "Resposta Ficheiro RGIC",
"link": "/Apoios/respostaFicheiroRGIC.md"
}
]
},
{
"text": "Enquadramentos",
"items": [
{
"text": "Candidaturas",
"link": "/Enquadramentos/candidatura.md"
}
]
},
{
"text": "Consultas",
"items": [
{
"text": "Candidatura",
"link": "/Consultas/candidatura.md"
},
{
"text": "Reportes ICs",
"link": "/Consultas/reportesICs.md"
},
{
"text": "Incidentes e Restruturações",
"link": "/Consultas/incidentesRestruturacoes.md"
},
{
"text": "Registo de Apoios",
"link": "/Consultas/registoApoios.md"
},
{
"text": "Serviço Dívida",
"link": "/Consultas/servicoDivida.md"
},
{
"text": "Moratórias",
"link": "/Consultas/moratoria.md"
}
]
},
{
"text": "Reportes",
"items": [
{
"text": "Apresentação",
"link": "/Reportes/geral.md"
},
{
"text": "Contratos",
"link": "/Reportes/contratos.md"
},
{
"text": "Utilizações",
"link": "/Reportes/utilizacoes.md"
},
{
"text": "Amortizações Antecipadas",
"link": "/Reportes/amortizacoesAntecipadas.md"
},
{
"text": "Bonificação de juros",
"link": "/Reportes/bonificacaoJuros.md"
},
{
"text": "Garantias Emitidas",
"link": "/Reportes/garantiasEmitidas.md"
},
{
"text": "Bonificação de Comissões",
"link": "/Reportes/bonificacaoComissoes.md"
},
{
"text": "Data de pagamento",
"link": "/Reportes/dataPagamento.md"
}
]
},
{
"text": "Listagens e Análises",
"items": [
{
"text": "Contratos e utilizações em falta",
"link": "/Reportes/geral.md"
},
{
"text": "N.º trabalhadores SS",
"link": "/Reportes/contratos.md"
},
{
"text": "Listagem CapitalizarMais",
"link": "/Reportes/utilizacoes.md"
},
{
"text": "Listagem utilizações CapitalizarMais",
"link": "/Reportes/amortizacoesAntecipadas.md"
},
{
"text": "Listagem condições de enquadramento",
"link": "/Reportes/bonificacaoJuros.md"
},
{
"text": "Incidentes e Restruturações",
"link": "/Reportes/garantiasEmitidas.md"
},
{
"text": "LCM Bonificação de juro - Bancos",
"link": "/Reportes/bonificacaoComissoes.md"
},
{
"text": "LCM Bonificação de juro - DAF",
"link": "/Reportes/bonificacaoComissoes.md"
},
{
"text": "EGL_DadosSIG",
"link": "/Reportes/dataPagamento.md"
},
{
"text": "EGL_DadosSIG Restruturações",
"link": "/Reportes/dataPagamento.md"
},
{
"text": "Bonificação de comissões de garantia",
"link": "/Reportes/dataPagamento.md"
},
{
"text": "Métricas operacionais",
"link": "/Reportes/dataPagamento.md"
},
{
"text": "Candidaturas abertas por antiguidade",
"link": "/Reportes/dataPagamento.md"
}
]
},
{
"text": "Definições",
"items": [
{
"text": "Utilizadores",
"link": "/Reportes/geral.md"
},
{
"text": "Códigos",
"link": "/Reportes/contratos.md"
},
{
"text": "Templates Email",
"link": "/Reportes/utilizacoes.md"
},
{
"text": "Introduzir Taxas",
"link": "/Reportes/amortizacoesAntecipadas.md"
},
{
"text": "Importar Euribor Banco de Espanha",
"link": "/Reportes/bonificacaoJuros.md"
},
{
"text": "Extrair ficheiro do Dossier Eletrónico",
"link": "/Reportes/garantiasEmitidas.md"
},
{
"text": "Processar PDF SS",
"link": "/Reportes/bonificacaoComissoes.md"
}
]
}
]
}Page Data
{
"title": "Runtime API Examples",
"description": "",
"frontmatter": {
"outline": "deep"
},
"headers": [],
"relativePath": "api-examples.md",
"filePath": "api-examples.md",
"lastUpdated": 1696158960000
}Page Frontmatter
{
"outline": "deep"
}More
Check out the documentation for the full list of runtime APIs.