Discover the Docus composables.


useDocus() gives access to docus runtime config, all default values and your custom config from app.config.ts

<script setup>const docus = useDocus()</script><template>  <div>    <h1>{{ docus.title }}</h1>    <p>{{ docus.description }}</p>  </div></template>


useCurrentNavigation() gives access to current navigation calculated from @nuxt/content navigation object and features in theme and pages front-matter.

const {  // Navigation object  tree,  // Aside config computed from front-matter and theme config  asideConfig} = useCurrentNavigation()


useMenu() gives access to $menu plugin controlling mobile navigation globally.

const {  // Is menu visible  visible,  // Close menu function  close,  // Open menu function  open,  // Toggle menu function  toggle} = useMenu()


useRepository() gives access to repository informations given by GitHub package.

That can be useful to build UI from live repository informations.

const {  // Repository informations  repository,  // Last release  last} = useRepository()


useScrolspy() is used in docs layout to make the ToC display the currently visible headings.

const {  // Headings on the page  visibleHeadings,  // Active headings (for the current page)  activeHeadings,  // Update headings (an array of DOM nodes)  updateHeadings} = useScrollspy()