feat: allow custom outline title (#689) (#690)

close #689
pull/731/head
Divyansh Singh 2 years ago committed by GitHub
parent ce17f5035c
commit a8a16237cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,7 +7,7 @@ import {
useActiveAnchor
} from '../composables/outline'
const { page, frontmatter } = useData()
const { page, frontmatter, theme } = useData()
const { hasOutline } = useOutline()
@ -32,7 +32,9 @@ function handleClick({ target: el }: Event) {
<div class="content">
<div class="outline-marker" ref="marker" />
<div class="outline-title">On this page</div>
<div class="outline-title">
{{ theme.outlineTitle || 'On this page' }}
</div>
<nav aria-labelledby="doc-outline-aria-label">
<span class="visually-hidden" id="doc-outline-aria-label">

@ -13,6 +13,13 @@ export namespace DefaultTheme {
*/
siteTitle?: string | false
/**
* Custom outline title in the aside component.
*
* @default 'On this page'
*/
outlineTitle?: string
/**
* The nav items.
*/

Loading…
Cancel
Save