Theme Layout Options
The following options control theme layout.
Navbar Related
navbar Recommended
- Type: NavbarOptions | false
- Default: false
- Details:
Navbar config.
navbarLayout
- Type: - NavbarLayoutOptions- /** * Built-in Navbar component */ type NavbarComponent = | "Brand" | "Links" | "Language" | "Search" | "Outlook" | "Repo"; /** * Navbar layout options */ interface NavbarLayoutOptions { start?: (NavbarComponent | string)[]; center?: (NavbarComponent | string)[]; end?: (NavbarComponent | string)[]; }
- Default: - { start: ["Brand"], center: ["Links"], end: ["Language", "Repo", "Outlook", "Search"] }
- Details: 
Customize navbar layout.
logo Recommended
- Type: string
- Required: No
- Details:
Navbar logo, should be absolute path relative to .vuepress/public folder.
logoDark
- Type: string
- Default: logo
- Details:
Navbar logo in dark mode, should be absolute path relative to .vuepress/public folder.
navbarTitle
- Type: string
- Default: $siteLocale.title
Navbar title, you can set it to an empty string to hide it.
repo
- Type: string
- Required: No
- Details:
Repository link
repoDisplay
- Type: boolean
- Default: true
- Details:
Whether display repo link in navbar.
repoLabel
- Type: string
- Required: No
- Details:
Repository aria label of navbar.
Note
The theme can recognize links of GitHub, Gitlab, Gitee and Bitbucket.
navbarAutoHide
- Type: "always" | "mobile" | "none"
- Default: "mobile"
Whether to hide navbar when scrolling down.
hideSiteNameOnMobile
- Type: boolean
- Default: true
Whether hide site title on mobile.
Sidebar Related
For guide, see Layout → Sidebar.
sidebar Recommended
- Type: SSidebarOptions
- Default: "structure"
Sidebar Config.
sidebarSorter Root only
- Type: - SidebarSorter- import type { ThemeNormalPageFrontmatter, ThemePageData, } from "vuepress-theme-hope"; interface SidebarFileInfo {type: "file";filename: string;title: string;order: number | null;path?: string | null;frontmatter: ThemeNormalPageFrontmatter;pageData: ThemePageData; } interface SidebarDirInfo {type: "dir";dirname: string;children:SidebarInfo[];title: string;order: number | null;groupInfo: {icon?: string;collapsible?: boolean;link?: string; };frontmatter: ThemeNormalPageFrontmatter | null;pageData: ThemePageData | null; } typeSidebarInfo= SidebarFileInfo | SidebarDirInfo; typeSidebarSorterKeyword= | "readme" | "order" | "date" | "date-desc" | "filename" | "title"; typeSidebarSorterFunction= (infoA:SidebarInfo,infoB:SidebarInfo, ) => number; typeSidebarSorter= |SidebarSorterFunction|SidebarSorterFunction[] |SidebarSorterKeyword|SidebarSorterKeyword[];
- Default: - ["readme", "order", "title", "filename"]
Structure sidebar sorter.
You can:
- fill in a custom function
- provide one sorter keyword
- provide an array of custom function or sorter keyword
Available keywords are:
- readme:- README.mdor- readme.mdfirst
- order: positive order first with its value ascending, negative order last with its value descending
- date: sort by date ascending
- date-desc: sort by date descending
- title: alphabetically sort by title
- filename: alphabetically sort by filename
Route Navigation
breadcrumb
- Type: boolean
- Default: true
Whether enable route navigation globally.
breadcrumbIcon
- Type: boolean
- Default: true
Whether show icons in route navigation
prevLink
- Type: boolean
- Default: true
Whether show prevLink in bottom.
nextLink
- Type: boolean
- Default: true
Whether show nextLink in bottom.
Page Meta
titleIcon
- Type: boolean
- Default: true
Whether to display an icon beside the page title.
pageInfo
- Type: ArticleInfo[] | false
- Default: ["Author", "Original", "Date", "Category", "Tag", "ReadingTime"]
Article information. The order of the items decides the display order. Fill in false to disable it.
Available items in ArticleInfo:
- "Author": author
- "Date": writing date
- "Original": is original
- "Category": category
- "Tag": tags
- "ReadingTime": expect reading time
- "Word": word number for the article
- "PageView": pageviews
lastUpdated
- Type: boolean
- Default: true
Whether to show "Last Updated" or not.
contributors
- Type: "content" | "meta" | boolean
- Default: "meta"
Whether to show "Contributors" or not.
- "content": show as content in main text
- "meta": show as meta info at the bottom of content
- true: same as- "meta"
- false: disable it
changelog
- Type: boolean
- Default: false
Whether to show changelog.
editLink
- Type: boolean
- Default: true
Whether to show "Edit this page" or not.
editLinkPattern
- Type: string
Pattern of edit link. While :repo :branch :path will be automatically replaced by docsRepo docsBranch and docsDir + filePath。
Note
The theme provides built-in support for GitHub, Gitlab, Gitee and Bitbucket.
docsRepo
- Type: string
- Default: repo
The repo of your docs
docsBranch
- Type: string
- Default: "main"
The branch of your docs
docsDir
- Type: string
- Default: ""
Docs dir location in repo
Footer
footer
- Type: string
- Required: No
The default content for the footer, can accept HTMLString.
copyright
- Type: string | false
- Default: "Copyright © <author>"
The default copyright info, set it to false to disable it by default.
displayFooter
- Type: boolean
- Default: false
Whether to display footer by default.
Others
home
- Type: string
- Default: Key of current locale
Home path of current locale, used as the link of back-to-home and navbar logo.
rtl
- Type: boolean
- Default: false
Whether to use RTL layout.
toc
- Type: - GetHeadersOptions | boolean- export interface GetHeadersOptions { /** * The selector of the headers. * * @default "#markdown-content > h1, #markdown-content > h2, #markdown-content > h3, #markdown-content > h4, #markdown-content > h5, #markdown-content > h6, [vp-content] > h2" */ selector?: string; /** * Ignore specific elements within the header, should be an array of `CSS Selector` * * @default [".vp-badge", ".vp-icon"] */ ignore?: string[]; /** * The levels of the headers. * * `1` to `6` for `<h1>` to `<h6>` * * - `false`: No headers. * - `number`: only headings of that level will be displayed. * - `[number, number]: headings level tuple, where the first number should be less than the second number, for example, `[2, 4]` which means all headings from `<h2>` to `<h4>` will be displayed. * - `deep`: same as `[2, 6]`, which means all headings from `<h2>` to `<h6>` will be displayed. * * @default "deep" */ levels?: HeaderLevels; }
- Default: value in theme options 
- Default: - true
Whether show toc list.
Changelog
- e12a3-on
- 9a004-on
- 12a7b-on
- 9f5ef-on
- 1e314-on
- 76d91-on
- 4a9b3-on
- f91f0-on
- b1230-on
- d58b6-on
- 73f6e-on
- 41639-on
- a8a07-on
- d8aeb-on
- 794f9-on
- dc56d-on
- c2ba2-on
- 2a306-on
- 04f3a-on
- e9f26-on
- 13ace-on
- 78b3c-on
- 11463-on
- edf2d-on
- 8174c-on
- aafa6-on
- 6f20f-on
- 5a6f8-on
- b81ad-on
- 9df60-on
- 5f9be-on
- 7d314-on
- 2243a-on
- 3e996-on
- 3d007-on
- 636cc-on
- 9856d-on
- ad023-on
- f852c-on
- db823-on
- aae8c-on
- 35972-on
- fd395-on
- 1eb77-on
- bcf02-on
- de367-on
- 2e966-on
- 3f0c3-on
- e2478-on
- babc9-on
- 0c093-on
- f6ff0-on
- 6c43f-on
- 892cc-on
- 3c199-on