Theme Configuration
About 5260 words
Overview
Theme configuration is used to customize various features of the theme and control its behavior. You can configure it in either .vuepress/config.ts or .vuepress/plume.config.ts.
When a field description includes the following statement, it indicates that the field is not supported for configuration in .vuepress/plume.config.ts:
This field is not supported for configuration in the Theme Config File plume.config.ts.
For fields without the above declaration, you can configure them in either .vuepress/config.ts or .vuepress/plume.config.ts. It is generally recommended to configure them in .vuepress/plume.config.ts.
Avoid reconfiguring a field that has already been configured in one configuration file within another configuration file.
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
// Theme configuration
})
})import { defineThemeConfig } from 'vuepress-theme-plume'
export default defineThemeConfig({
// Theme configuration
})Basic Configuration
configFile
Type:
stringDefault:
''Details:
Custom path to the theme configuration file.
Refer to Theme Config File
plume.config.tsfor more information.This field is not supported for configuration in the Theme Config File
plume.config.ts.
plugins
Type:
ThemeBuiltinPluginsDefault:
{}Details:
Custom configuration for plugins used internally by the theme.
The plugins used by the theme are configured by default. In most cases, modification is not required. For detailed customization, please refer to this documentation.
This field is not supported for configuration in the Theme Config File
plume.config.ts.
encrypt
Type:
EncryptOptions({ global?: boolean; admin?: string | string[]; rules?: Record<string, string | string[]> })Default:
undefinedDetails:
Site encryption configuration, supporting full-site encryption and article-level encryption.
When not configured, no encryption is enabled. When
globalistrue, the whole site is encrypted;adminis the super-permission password;rulesspecifies article passwords keyed by the file relative path, page access path, or directory path, and when a key starts with^, it is matched as a regular expression.This field supports configuration and hot reload in the Theme Config File
plume.config.ts.
markdown 1.0.0-rc.136 +
Type:
MarkdownOptionsDefault:
{}Details:
Markdown feature configuration. Refer to this documentation.
This field is not supported for configuration in the Theme Config File
plume.config.ts.
codeHighlighter 1.0.0-rc.136 +
Type:
false | (ShikiPluginOptions & { renderIndentGuides?: boolean | object; colorizedBrackets?: boolean | object })Default:
{}Details:
Code highlighting configuration. Refer to this documentation.
In addition to the options of @vuepress/plugin-shiki, it also supports two theme-extension options:
renderIndentGuides(indent guides) andcolorizedBrackets(colorized brackets).This field is not supported for configuration in the Theme Config File
plume.config.ts.
components
Type:
MarkdownPowerPluginOptions['components']Default:
undefinedDetails:
Automatic component import configuration. The theme uses unplugin-vue-components to implement automatic component import, inheriting all of its configuration options (except
includeandexclude)..vuepress/plume.config.tsimport path from 'node:path' import { defineThemeConfig } from 'vuepress-theme-plume' export default defineThemeConfig({ components: { dirs: [path.resolve(import.meta.dirname, 'components')], }, })This field is not supported for configuration in the Theme Config File
plume.config.ts.
search 1.0.0-rc.136 +
Type:
boolean | SearchOptionsDefault:
{ provider: 'local' }Details:
Search configuration. Refer to this documentation.
trueis equivalent to{ provider: 'local' };falsedisables search.This field is not supported for configuration in the Theme Config File
plume.config.ts.
comment 1.0.0-rc.136 +
Type:
false | CommentPluginOptionsDefault:
falseDetails:
Comment configuration. Refer to this documentation.
This field is not supported for configuration in the Theme Config File
plume.config.ts.
watermark 1.0.0-rc.136 +
Type:
boolean | (WatermarkPluginOptions & { fullPage?: boolean })Default:
falseDetails:
Watermark configuration. Refer to this documentation.
In addition to the options of @vuepress/plugin-watermark, the theme additionally supports
fullPage(defaulttrue): whentrue, the watermark covers the entire page; whenfalse, it only covers the article content area.This field is not supported for configuration in the Theme Config File
plume.config.ts.
readingTime 1.0.0-rc.136 +
Type:
false | ReadingTimePluginOptionsDefault:
falseDetails:
Reading time configuration. Refer to this documentation.
This field is not supported for configuration in the Theme Config File
plume.config.ts.
copyCode 1.0.0-rc.136 +
Type:
false | CopyCodePluginOptionsDefault:
{}Details:
Copy code configuration. Refer to this documentation.
Enabled by default
This feature is on by default and works without any configuration (the source checks
copyCode !== false). Configure it only to customise behaviour, or set it tofalseto disable it entirely.This field is not supported for configuration in the Theme Config File
plume.config.ts.
replaceAssets 1.0.0-rc.139 +
Type:
false | ReplaceAssetsPluginOptionsDefault:
falseDetails:
Replace assets configuration. Refer to this documentation.
This field is not supported for configuration in the Theme Config File
plume.config.ts.
llmstxt
Type:
boolean | LlmsPluginOptionsDefault:
falseDetails:
Whether to generate
llms.txtandllms-full.txtto provide site content to large language models. This feature only takes effect during a production build (vuepress build).Refer to this documentation.
This field is not supported for configuration in the Theme Config File
plume.config.ts.
hostname
Type:
stringDefault:
''Details:
Deployment site domain name.
When
hostnameis configured to a valid domain, the theme will generatesitemapand SEO-related content.This field is not supported for configuration in the Theme Config File
plume.config.ts.
feed
Type:
boolean | FeedOptionsDefault:
falseDetails:
Generate RSS 2.0 / Atom 1.0 / JSON Feed 1.1 subscription files. This feature only takes effect during a production build (
vuepress build).Warning
hostnameis required to generate absolute links;basemust match the deployment path of the site (/by default), otherwise the subscription URLs will point to the wrong location.Option Type Default Description perCollectionbooleanfalseGenerate a dedicated channel for every eligible collection includeDocCollectionsbooleanfalseInclude doccollections in the global channelcontent'excerpt' | 'full''excerpt'Entry content mode: summary or full content limitnumber20Max entries per channel (1–200) excerptLengthnumber240Max summary length, 0disables the summaryformatsFeedFormat[]['rss']Output formats, rss/atom/jsonfilenameFeedFilenamessee below Output filenames channelFeedChannelOptions— Channel metadata (title, description, author, icon…) linkTagbooleantrueInject <link rel="alternate">into page<head>debugbooleanfalsePrint per-channel details in the build log Default filenames:
feed.xml(RSS),atom.xml(Atom),feed.json(JSON Feed).export default defineUserConfig({ theme: plumeTheme({ hostname: 'https://example.com', feed: { perCollection: true, formats: ['rss', 'atom', 'json'], }, }), })
autoFrontmatter
Type:
false | AutoFrontmatterOptionsDefault: Enabled by default, equivalent to
{ title: true, createTime: true, permalink: true }Details:
Whether to automatically add frontmatter configuration to markdown files. The feature is disabled only when it is explicitly set to
false.interface AutoFrontmatterOptions { /** * Whether to automatically generate permalink * * @default true * - true: auto generate permalink * - false: do not generate permalink * - 'filepath': generate permalink based on file path */ permalink?: boolean | 'filepath' /** * Whether to automatically generate createTime * * Reads file creation time by default. `createTime` is more precise (to the second) than the default VuePress `date` field. */ createTime?: boolean /** * Whether to automatically generate title * * Uses the filename as the title by default. */ title?: boolean }
cache
Type:
false | 'memory' | 'filesystem'Default:
filesystemDetails:
Whether to enable compilation cache, or configure the caching method.
This configuration item addresses the slow startup speed of VuePress. It caches the compilation results during the first service start. On subsequent starts, it reads the cache directly, skipping compilation to speed up startup.
false: Disable cache.'memory': Use memory cache. This method provides faster startup speed but increases memory usage as the number of project files grows. Suitable for projects with fewer articles.'filesystem': Use filesystem cache. This method provides a relatively fast and stable startup speed, more suitable for projects with substantial content.
Warning
This field is not supported for configuration in the Theme Config File
plume.config.ts.For the cache to take effect, you should remove the
--clean-cacheparameter from thevuepress devdevelopment server startup script in yourpackage.json.
docsRepo
- Type:
string - Default:
'' - Details: Documentation repository configuration, used to generate the
Edit this pagelink.
docsBranch
- Type:
string - Default:
'' - Details: Documentation repository branch configuration, used to generate the
Edit this pagelink.
docsDir
- Type:
string - Default:
'' - Details: Documentation repository directory configuration, used to generate the
Edit this pagelink.
editLink
Type:
booleanDefault:
trueDetails: Whether to enable the edit link.
This field is not supported for configuration in the Theme Config File
plume.config.ts.
lastUpdated
- Type:
false | LastUpdatedOptions - Default:
{ formatOptions: { dateStyle: 'short', timeStyle: 'short' } } - Details: Last updated time.
interface LastUpdatedOptions {
/**
* Options to set the format of the last updated time.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options
*
* @default
* { dateStyle: 'short', timeStyle: 'short' }
*/
formatOptions?: Intl.DateTimeFormatOptions & { forceLocale?: boolean }
}This field is not supported for configuration in the Theme Config File plume.config.ts.
contributors
Type:
boolean | (ContributorsOptions & { mode?: 'inline' | 'block' })Default:
trueDetails: Whether to display contributors.
When passing an object, you can use the
ContributorsOptionsof @vuepress/plugin-git, as well as the theme extensionmode?: 'inline' | 'block'(the display mode of contributors).For more configuration, please refer to this documentation.
This field is not supported for configuration in the Theme Config File
plume.config.ts.
changelog
Type:
boolean | ChangelogOptionsDefault:
falseDetails: Whether to display page change history.
For more configuration, please refer to this documentation.
This field is not supported for configuration in the Theme Config File
plume.config.ts.
locales
Type:
Record<string, ThemeLocaleData>Default:
{}Details: Multi-language configuration.
Text configuration for different languages. Refer to this documentation.
The multi-language configuration supports all configuration options under the following Locale to control theme behavior in different languages.
Locale Configuration
All the following fields are also basic configuration fields and can be configured at the same level as fields like locales.
home
- Type:
false | string - Default:
/ - Details: The path to the home page. It will be used for:
- The logo link in the navbar;
- The Back to Home link on the 404 page;
logo
- Type:
false | string - Default:
false - Details: Logo in the navbar.
logoDark
- Type:
false | string - Default:
false - Details: Logo in the navbar for Dark mode.
appearance
- Type:
boolean | 'dark' | 'force-dark' - Default:
true
Whether to enable dark mode.
- If this option is set to
true, the default theme will be determined by the user's preferred color scheme. - If this option is set to
dark, the theme will be dark by default unless the user manually toggles it. - If this option is set to
false, the user will not be able to switch themes. - If this option is set to
force-dark, the user will not be able to switch themes, and the theme will be forced to dark.
This option injects an inline script that restores user settings from local storage. This ensures [data-theme="dark"] is applied before the page is rendered to avoid flashing.
profile
- Type:
ProfileOptions - Default:
undefined
Configure the blogger's profile, displayed in the right sidebar of the blog.
import { defineThemeConfig } from 'vuepress-theme-plume'
export default defineThemeConfig({
profile: {
avatar: '/avatar.png',
name: 'Your Name',
description: 'Your description',
circle: true,
location: 'Hangzhou, China',
organization: 'Your Company',
layout: 'right',
},
})avatar
- Type:
string - Default:
undefined
Avatar image link, supports local paths or network URLs.
name
- Type:
string - Default:
undefined
Blogger name, displayed below the avatar.
description
- Type:
string - Default:
undefined
Personal description or signature, displayed below the name.
circle
- Type:
boolean - Default:
false
Whether to display the avatar with circular cropping.
location
- Type:
string - Default:
undefined
Geographic location information, displayed in the profile.
organization
- Type:
string - Default:
undefined
Organization or company information, displayed in the profile.
layout
- Type:
'left' | 'right' - Default:
'right'
Layout position of the profile. 'right' displays in the right sidebar, 'left' displays in the left sidebar.
social
- Type:
SocialLink[] - Default:
[]
Configure social account links, displayed in the profile area. Supports 30+ built-in icons (e.g., github, twitter, discord, weibo, bilibili, zhihu, etc.), and also supports custom SVG icons.
import { defineThemeConfig } from 'vuepress-theme-plume'
export default defineThemeConfig({
social: [
{ icon: 'github', link: 'https://github.com/your-username' },
{ icon: 'twitter', link: 'https://twitter.com/your-username' },
{ icon: 'weibo', link: 'https://weibo.com/your-username' },
// Custom SVG icon
{ icon: { svg: '<svg>...</svg>', name: 'custom' }, link: 'https://example.com' },
],
})icon
- Type:
string | { svg: string, name?: string } - Required
Social icon. Can be a built-in icon name (e.g., github, twitter, discord, facebook, instagram, linkedin, mastodon, npm, slack, youtube, qq, weibo, bilibili, gitlab, docker, juejin, zhihu, douban, steam, stackoverflow, xbox, tiktok, kuaishou, bytedance, xiaohongshu, bluesky, gmail, etc.), or a custom icon object containing svg and an optional name.
link
- Type:
string - Required
Social link URL.
ariaLabel
- Type:
string - Default:
undefined
Accessibility label for screen readers. If not set, it will be automatically generated based on the icon name.
navbarSocialInclude
- Type:
string[] - Default:
['github', 'twitter', 'discord', 'facebook']
Controls which social links are also displayed in the navbar. Only social links configured in social whose icon is in this list will be displayed on the right side of the navbar.
import { defineThemeConfig } from 'vuepress-theme-plume'
export default defineThemeConfig({
social: [
{ icon: 'github', link: 'https://github.com/your-username' },
{ icon: 'twitter', link: 'https://twitter.com/your-username' },
{ icon: 'weibo', link: 'https://weibo.com/your-username' },
],
navbarSocialInclude: ['github', 'weibo'], // Only github and weibo are displayed in the navbar
})navbar
Type:
NavItem[]Default:
[](but a runtime fallback applies, see below)Details: Navbar configuration.
An empty navbar is not an empty navbar
When
navbaris empty, the theme injects a fallback with Home / Posts (or the firstpostcollection) / Tags / Archives, derived from the current collection (seetheme/src/node/config/resolveThemeData.ts). Pass an explicit array to fully override it.To configure navbar elements, you can set it to a navbar array, where each element is a
stringor aNavItemobject.- A
NavItemobject should have atextfield and alinkfield, with an optionalactiveMatchfield. - A
stringrepresents a page file path or a page access path.
- A
type NavItem = string | {
text: string
link: string
/**
* The page prefix for the current group.
*/
prefix?: string
/**
* Navigation items under this group.
*/
items?: NavItem[]
/**
* Supports iconify icons. Use the iconify name directly and it will be loaded automatically.
*
* @see https://icon-sets.iconify.design/
*/
icon: string
/**
* Controls when the element is active.
*/
activeMatch?: string
}Example 1:
export default defineUserConfig({ theme: plumeTheme({ navbar: [ // NavbarItem { text: 'Foo', link: '/foo/' }, // NavbarGroup { text: 'Group', prefix: '/group/', items: ['foo/', 'bar/'], }, // String - page file path '/bar', // The `.md` extension can be omitted directly. ], }), })Example 2:
export default defineUserConfig({ theme: plumeTheme({ navbar: [ // Nested Group - maximum depth is 2 { text: 'Group', items: [ { text: 'SubGroup', items: ['/group/sub/', '/group/sub/bar/'], }, ], }, // Control when the element is active { text: 'Group 2', items: [ { text: 'Always active', link: '/', // This element will always be active activeMatch: '/', }, { text: 'Active on /foo/', link: '/not-foo/', // This element is active when the current route path starts with /foo/ // Supports regular expressions activeMatch: '^/foo/', }, ], }, ], }), })
collections
Type:
ThemeCollectionItem[]Default:
[]Details: Documentation collections configuration.
sidebar
Type:
false | SidebarMultiDetails:
Sidebar configuration. The theme recommends configuring the sidebar in collections configuration.
The
keyof the configuration object is the common access path prefix for the sidebar.For
value:'auto'means automatically generate the sidebar based on the directory structure.stringrepresents the page file path corresponding to the sidebar.SidebarItemrepresents a single sidebar item configuration.
type ThemeIcon = string | { svg: string }
type SidebarMulti = Record<
string,
| 'auto'
| (string | SidebarItem)[]
| { items: 'auto' | (string | SidebarItem)[], prefix?: string }
>
interface SidebarItem {
/**
* Sidebar text.
*/
text?: string
/**
* Sidebar link.
*/
link?: string
/**
* Sidebar icon.
*/
icon?: ThemeIcon
/**
* Nested sidebar group.
*/
items?: 'auto' | (string | SidebarItem)[]
/**
* If not specified, the group is not collapsible.
* If `true`, the group is collapsible and collapsed by default.
* If `false`, the group is collapsible but expanded by default.
*/
collapsed?: boolean
/**
* Link prefix for the current group.
*/
prefix?: string
rel?: string
target?: string
}sidebarScrollbar
Type:
booleanDefault:
trueDetails: Whether to show the sidebar scrollbar.
When set to
false, only the scrollbar is hidden, but the scrolling behavior remains unchanged.
aside
Type:
boolean | 'left'Default:
trueDetails:
Whether to display the aside (right sidebar).
falsedisables the right aside.trueenables the right aside.'left'moves the right aside to the left side of the article content, to the right of the main sidebar.
Each page can override this global configuration via frontmatter aside.
outline
Type:
false | number | [number, number] | 'deep'Default:
[2, 3]Details:
The heading levels to display.
A single number means only display headings of that level.
If a tuple is passed, the first number is the minimum level and the second is the maximum level.
'deep'is the same as[2, 6], which displays all headings from<h2>to<h6>.When aside is disabled,
outlineis also disabled.Each page can override this global configuration via frontmatter outline.
transition
- Type:
boolean | TransitionOptions - Default:
true
Whether to enable transition animations. Set to false to completely disable all transition animations. Pass an object to control each type of animation separately.
import { defineThemeConfig } from 'vuepress-theme-plume'
export default defineThemeConfig({
transition: {
page: true,
postList: true,
appearance: 'fade',
},
})page
- Type:
boolean - Default:
true
Whether to enable page transition animations.
postList
- Type:
boolean - Default:
true
Whether to enable blog post list transition animations.
appearance
- Type:
boolean | 'fade' | 'circle-clip' | 'horizontal-clip' | 'vertical-clip' | 'skew-clip' | 'blinds-vertical' | 'blinds-horizontal' | 'soft-blur-fade' | 'diamond-reveal' - Default:
'fade'
Transition animation for dark/light mode switching. Set it to false to disable only this animation without affecting page or postList.
Supports the following 9 animation effects:
fade: Fade in/out (default)circle-clip: Circular cliphorizontal-clip: Horizontal clipvertical-clip: Vertical clipskew-clip: Skew clipblinds-vertical: Vertical blindsblinds-horizontal: Horizontal blindssoft-blur-fade: Soft blur fadediamond-reveal: Diamond reveal
readAid
Deprecated
The reading aid is part of readerPreferences.readAid now, and can be switched in the client panel. This option still works, but only as the default when readerPreferences.readAid is not configured.
- Type:
boolean | 'mask' | 'left' | 'right' - Default:
false - Details: Whether to show reading guide lines (the guide lines help users visually focus on the area where the mouse is located)
false- Do not showtrue/'left'- Show left guide line'mask'- Show mask'right'- Show right guide line
readerPreferences
Type:
boolean | ReaderPreferencesOptionsDefault:
falseDetails: Configure the reader preferences: resume reading, content width, reading background, reading aid and focus mode.
true- enable every sub-feature with the default optionsfalse- disable everythingReaderPreferencesOptions- enable and toggle each sub-feature
The option is per locale, so it can be configured separately in
locales.Option Type Default Description widthfalse | { presets }trueContent width presets, defaults to ['narrow', 'wide', 'full']themefalse | { presets }trueBackground palettes, defaults to ['default', 'warm', 'sepia']brandfalse | { presets }falseBrand palettes, applied to --vp-c-brand-*readAidfalse | 'mask' | 'left' | 'right' | { modes, default }trueReading aid, off by default, switchable in the panel focusModebooleantrueEnable the focus mode resumefalse | ReaderResumeOptionstrueContinue reading storagePrefixstring'plume'localStoragekey prefixWidth, reading aid and focus mode are desktop-only: below a
768pxviewport they are disabled and hidden from the panel (their defaults apply), while the reading background keeps working. See Small screens.ReaderResumeOptions:Option Type Default Description promptbooleantruefalseonly records the position without promptingttlnumber90Record TTL in days, clamped to 1–365 maxnumber300Max records kept, clamped to 10–1000 minPercentnumber0.05Don't prompt below this progress, 0–1The standard preset produces no CSS at all:
standardforwidthanddefaultforthemeboth mean "write no attribute", so the default output is pixel-identical to the previous version.The actual widths are narrow ≈ 640px, standard = whatever the theme already uses, wide ≈ 1000px, full = the viewport width.
wideis not just a releasedmax-width: with a sidebar and an outline the page is capped by--vp-layout-max-width(1440px) and the text column can only reach about 864px, barely above the 788px ofstandard. The wide preset therefore trims the page paddings and the outline column, relaxes the shell to 1680px, and caps the column at 1000px. Override themax-widthofhtml[data-reader-width="wide"] .vp-doc-container .content-containerto customize it.full releases the shell cap entirely, so the text width follows the viewport: about 1344px on a 1920px screen with a sidebar and an outline, about 1616px on a plain article page. It targets large screens that accept long lines and behaves like
wideon smaller ones. Drop it frompresetsto hide the option:export default defineUserConfig({ theme: plumeTheme({ readerPreferences: { width: { presets: ['narrow', 'wide'] }, }, }), })Both groups accept custom palettes: a palette is a group of CSS custom properties applied together, rendered as a solid swatch in the panel, where
default(slashed swatch) means "keep the theme tokens". Keys oftokensmay omit the--prefix:export default defineUserConfig({ theme: plumeTheme({ readerPreferences: { theme: { presets: [ 'default', 'warm', { name: 'forest', label: 'Forest', tokens: { 'vp-c-bg': '#eef5ec', 'vp-c-bg-alt': '#e6efe3', 'vp-c-text-1': '#2b3529', }, }, ], }, brand: { presets: [ { name: 'ocean', label: 'Ocean', tokens: { 'vp-c-brand-1': '#0e7490', 'vp-c-brand-2': '#0891b2', 'vp-c-brand-3': '#06b6d4', }, }, ], }, }, }), })nameis limited to letters, digits,-and_, it becomes thehtml[data-reader-theme="<name>"]value;labelis the swatch tooltip and accessible name,nameis used when omitted;coloris the swatch color, defaults to--vp-c-bg(background) or--vp-c-brand-1(brand) fromtokens;- the reading background stays disabled in dark mode, brand palettes work in both modes;
- custom palettes are inlined into
<head>at build time (no first-paint flash); the dev server injects them on the client.
Localizing
label: there is no need to repeat the wholetokensin every locale. Locale levelpresetsmerge with the theme level byname— an entry with the same name only overrides the fields it declares (usually justlabel), whiletokensare inherited; names that only exist in the locale are appended to the end of the list.export default defineUserConfig({ theme: plumeTheme({ // theme level: the colors live here, once readerPreferences: { theme: { presets: [ { name: 'forest', tokens: { 'vp-c-bg': '#eef5ec', 'vp-c-bg-alt': '#e6efe3' }, }, ], }, }, locales: { '/en/': { // locale level: just the label readerPreferences: { theme: { presets: [{ name: 'forest', label: 'Forest' }] }, }, }, }, }), })Tips
Locale level
presetsonly override, they cannot remove presets; adjust the theme level list to narrow it.The reading aid highlights the block under the mouse:
maskdraws a mask,left/rightdraw a guide line. It is off by default and only takes effect once the reader picks it in the panel; passing a bare mode string (e.g.'left') makes that mode the default. Use the object form to restrict the offered modes:export default defineUserConfig({ theme: plumeTheme({ readerPreferences: { readAid: { modes: ['mask', 'left'], default: 'mask' }, }, }), })The legacy theme / collection level
readAidstill works, as the default whenreaderPreferences.readAidis not configured.Example: enable everything
export default defineUserConfig({ theme: plumeTheme({ readerPreferences: true, }), })Example: only width and background
export default defineUserConfig({ theme: plumeTheme({ readerPreferences: { width: { presets: ['wide'] }, theme: true, focusMode: false, resume: false, }, }), })Example: only continue reading
export default defineUserConfig({ theme: plumeTheme({ readerPreferences: { width: false, theme: false, readAid: false, focusMode: false, resume: { ttl: 30, minPercent: 0.1 }, }, }), })See Reader for more.
relatedPosts
Type:
boolean | RelatedPostsOptionsDefault:
falseDetails: Whether to show related posts at the bottom of article and doc pages.
true- Enable it with the default configuration (same as{})false- Disable itRelatedPostsOptions- Enable it with a custom configuration
Collection level options (
collections[].relatedPosts) take precedence over this one.The result is computed at build time (TF-IDF + cosine similarity) and written into the page data, so there is no runtime cost on the client. Pages are only recommended within the same collection and the same locale by default.
Option Type Default Description limitnumber4Max number of related posts (1–12) minScorenumber0.12Similarity threshold, lower candidates are dropped weightsobjectsee below Weight of each signal recencynumber0Recency decay half-life in years: the score halves after recencyyears,0disables itdiversitynumber0.3Diversity of the result (0–1), 0keeps the pure relevance orderscope'collection' | 'locale''collection'Candidate scope contentLimitnumber2000Max characters of the body used for scoring, 0disables itcjk'segmenter' | 'bigram''segmenter'CJK tokenizer strategy showExcerptbooleanfalseWhether to show an excerpt in each item excerptLengthnumber80Max length of the excerpt titlestringtheme locale text Title of the block excludestring[][]Paths to exclude, glob supported seriesBoostnumber1Score multiplier of the same series pages, 0drops them and values above1prefer themseriesNextBoostnumber0Score multiplier of the next chapter, 0stops repeating the block already shown abovedebugbooleanfalsePrint scores in the build log The default
weightsis{ tags: 3, category: 2, title: 2, headings: 1.5, content: 1 }.When a page joins a series through
frontmatter.series, the series relation becomes an extra signal:seriesBoostmultiplies the score of the same series pages andseriesNextBoostthe one of the next chapter. Both apply to the final score, sominScoreis a threshold on the adjusted score. See Related Posts - Series integration.
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
relatedPosts: {
limit: 4,
minScore: 0.12,
weights: { tags: 3, category: 2, title: 2, content: 1 },
},
}),
})import { defineThemeConfig } from 'vuepress-theme-plume'
export default defineThemeConfig({
relatedPosts: {
limit: 4,
diversity: 0.3,
},
})See Related Posts for more details.
series
Type:
boolean | SeriesOptionsDefault:
falseDetails: Whether to enable series.
true- Enable it with the default configurationfalse- Disable itSeriesOptions- Enable it with a custom configuration
A series is a cross-collection content dimension: it does not change URLs or routes and does not add a collection type. Pages join a series with the
seriesfrontmatter field; the order and numbering are resolved at build time, and two links are rendered above and below the content ("This post is part of …" and "Next: …").A series never takes over the "Previous / Next page" pager of a doc page.
Option Type Default Description pagebooleantrueGenerate the landing page linkPrefixstring'/series/'Path prefix of landing pages (the locale prefix is always prepended) indexbooleanfalseGenerate the series overview page at the root of linkPrefix(e.g./series/)autoCreatebooleantrueCreate a series automatically when its id is not declared order'auto' | 'order' | 'time''auto'Sorting strategy navbooleantrueRender the in-page links itemsRecord<string, SeriesItemOptions>{}Series definitions keyed by id SeriesItemOptions:Option Type Default Description titlestringseries id Series title descriptionstring- Series description, used by the landing page and the SEO description coverstring- Cover image of the landing page linkstringlinkPrefix + idLanding page path, can point at a page you maintain pagebooleantrueGenerate the landing page order'auto' | 'order' | 'time'global orderSorting strategy of this series navbooleanglobal navWhether to render the in-page links ordersemantics:'auto': sort byseriesOrderwhen every chapter declares it, otherwise sort by create time (and warn)'order': always sort byseriesOrder, chapters without one go last (and warn)'time': sort by create time
index: truegenerates a series overview page at the root oflinkPrefix(e.g./series/,/en/series/) listing every series of the locale. It is independent of the landing pages: withpage: falseyou can keep the overview and pointitems[id].linkat pages you maintain.
import { defineUserConfig } from 'vuepress'
import { plumeTheme } from 'vuepress-theme-plume'
export default defineUserConfig({
theme: plumeTheme({
series: {
linkPrefix: '/collections/',
items: {
'vue3-in-depth': {
title: 'Vue 3 in depth',
description: 'From reactivity to the compiler in 12 posts',
order: 'order',
},
},
},
}),
})import { defineThemeConfig } from 'vuepress-theme-plume'
export default defineThemeConfig({
series: true,
})See Series for more details.
linkPreview
Type:
boolean | LinkPreviewOptionsDefault:
falseDetails: Whether to enable hover previews for internal links in the content. Hovering a link shows the title, excerpt, tags and last updated date of the target page.
true- Enable it with the default configuration.false- Disable itLinkPreviewOptions- Enable it with a custom configuration
Preview data is generated at build time and written into the page data.
Option Type Default Description delaynumber150Hover-intent delay in ms focusDelaynumber0Delay after keyboard focus, in ms selectorstring'.vp-doc a[href]'Selector of the trigger links showExcerptbooleantrueWhether to show the excerpt excerptLengthnumber120Max excerpt length, 0means unlimitedshowHeadingsbooleanfalseWhether to show the first headings of the target page headingsLimitnumber3Max headings (1–6) showTagsbooleantrueWhether to show the tags showUpdatedTimebooleantrueWhether to show the last updated date (requires the git plugin) maxWidthnumber360Max card width in px excludestring[][]Excluded target paths, glob supported The option is resolved per locale, so it can be disabled for one language in
locales. A single page can opt out withlinkPreview: falsein its frontmatter.See Link Preview for more details.
footer
Type:
false | { message: string; copyright?: string }Default:
{ message: 'Powered by VuePress & vuepress-theme-plume' }Details: Footer configuration.
The default is not "hidden"
Even without configuring
footer, the theme renders a default footer linking to the VuePress and theme websites (see the default above). To hide it completely, set it tofalseexplicitly:theme: plumeTheme({ footer: false })
bulletin
Type:
boolean | BulletinOptionsDefault:
falseDetails: Bulletin board configuration.
For details, please refer to Bulletin Board.
editLinkPattern
Type:
stringDefault:
''Details: Regular expression for the edit link.
Example:
':repo/edit/:branch/:path'
externalLinkIcon
- Type:
boolean - Default:
true - Details: Whether to display an external link icon after external links.
copyright
Type:
boolean | CopyrightLicense | CopyrightOptionsDefault:
falseDetails: Copyright configuration.
For details, please refer to Copyright.
prevPage
- Type:
boolean - Default:
true - Details: Whether to show the previous page link.
nextPage
- Type:
boolean - Default:
true - Details: Whether to show the next page link.
createTime
Type:
boolean | 'only-posts'Default:
trueDetails: Whether to display the creation time.
false- Do not display.'only-posts'- Only display on blog post list pages.true- Display on all article pages.
Contributors
Changelog
86311-feat(theme): related-posts for series (#1089)on357ff-feat(theme): add series support (#1087)on89a89-feat(theme): add reader preferences support (#1086)on56dda-feat(theme): add link preview support (#1085)on02fc6-feat(theme): add feed support (#1084)on5eccb-feat(theme): add related posts support (#1082)one4dae-docs: improve docs (#1071)on60619-docs: improve docs (#1069)on93a8c-chore: tweakon1d04d-feat: add builtin auto-import-components (#932)on
