useDocsRoute
useDocsRoute() checks the route against the current locale's docsRoot. The default header uses it to decide whether to show the section bar and reading progress.
Usage
<script setup lang="ts">
const isDocsRoute = useDocsRoute()
</script>
<template>
<span v-if="isDocsRoute">Docs</span>
</template>
Signature
function useDocsRoute(): ComputedRef<boolean>
Return Value
| Name | Type | Description |
|---|---|---|
| (return value) | ComputedRef<boolean> | true when the current path starts with ${docsRoot}/ |
Notes
The docs root itself (/docs) does not start with /docs/, so it returns false; that path is usually redirected to the first page.
Changelog
useTheme
The state and actions behind the theme picker - primary color, neutral color, radius, icon set, black as primary and color mode. Visitor choices persist in localStorage and can be exported as app.config or CSS. Use it for a custom theme picker or to switch themes from a page.
useDocsFilterConfig
Config, visibility check and filter function behind the sidebar navigation filter, mapped to aside.filter in app.config. Use them in a custom sidebar top or sidebar body component to keep the default filtering behavior.