V
This plugin adds a back to top button to your site. The button appears in the bottom right corner when scrolling down and scrolls the page to the top when clicked. This plugin has been integrated into the default theme (@vuepress/theme-default). Usage npm i -D @vuepress/plugin-back-to-top@next .vuepress/config.ts import { backToTopPlugin } from '@vuepress/plugin-back-to-top' export default { plugins: [backToTopPlugin()], } Options threshold number Default 100 Scroll threshold distance to…
V
This plugin will provide a table-of-contents (TOC) component. Usage npm i -D @vuepress/plugin-toc@next .vuepress/config.ts import { tocPlugin } from '@vuepress/plugin-toc' export default { plugins: [ tocPlugin({ // options }), ], } Differences with Markdown TOC Syntax Similar to the Table of Contents Markdown Syntax, the TOC component provided by this plugin can be used in your markdown content directly: <!-- markdown toc syntax --> [[toc]] <!-- vue toc component --> <Toc /> Both of them can be…
V
Provide client data for your theme, with VuePress i18n support. This plugin is mainly used to develop themes, and has been integrated into the default theme. You won't need to use it directly in most cases. For theme authors, this plugin will help you use the same i18n mechanism as VuePress and the default theme. However, if you don't want to provide i18n support, or you want to implement your own approach, you don't need this plugin. Usage npm i -D @vuepress/plugin-theme-data@next…
V
Provide advanced styling capabilities for plugin and theme developers, based on @vuepress/plugin-palette. Compared to the palette plugin, it offers: Derived styles: generate related styles based on the user config. Theme-like customization: allow plugins to provide style customization similar to themes. Style isolation and sharing: group the style system of plugins and themes with the id option. Dependencies You should manually install these deps in your project: When using Vite bundler:…
V
This plugin sets text direction to RTL on configured locales. Usage npm i -D @vuepress/plugin-rtl@next .vuepress/config.ts import { rtlPlugin } from '@vuepress/plugin-rtl' export default { plugins: [ rtlPlugin({ // options locales: ['/ar/'], }), ], } Demo Options locales string[] Default ['/'] RTL locale paths to enable RTL layout. selector SelectorOptions Default { 'html': { dir: 'rtl' } } Selector configuration to enable RTL layout. The default settings mean that the dir attribute of the html…
V
This plugin analyzes your page content to generate word counts and estimated reading times. Usage npm i -D @vuepress/plugin-reading-time@next .vuepress/config.ts import { readingTimePlugin } from '@vuepress/plugin-reading-time' export default { plugins: [ readingTimePlugin({ // options }), ], } Page Data (Node.js Side) The plugin calculates statistics for every page and injects them into the page.data.readingTime property. This object contains: minutes: The estimated reading time in minutes…
V
Provide palette support for your theme. This plugin is primarily designed for theme development, so you typically won't need to use it directly. The default theme does not use it: it exposes its CSS variables for overriding through the .vuepress/styles/index.css user style entry, and you can register this plugin when your own theme needs a Sass palette. For theme authors, this plugin provides users with the ability to customize styles. Usage npm i -D @vuepress/plugin-palette@next…
V
This plugin collects Git information for your pages, including creation and update timestamps, contributor lists, and changelogs. The lastUpdated and contributors features of the theme are powered by this plugin. This plugin is primarily intended for theme development. In most cases, you will not need to use it directly. Usage npm i -D @vuepress/plugin-git@next .vuepress/config.ts import { gitPlugin } from '@vuepress/plugin-git' export default { plugins: [ gitPlugin({ // options }), ], } Git…
V
This plugin will listen to page scroll event. When the page scrolls to a certain header anchor, this plugin will change the route hash to that header anchor if there is a corresponding header link. This plugin is mainly used to develop themes, and has been integrated into the default theme. You won't need to use it directly in most cases. Usage npm i -D @vuepress/plugin-active-header-links@next .vuepress/config.ts import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links'…
V
Generate feeds for your VuePress site. Usage npm i -D @vuepress/plugin-feed@next .vuepress/config.ts import { feedPlugin } from '@vuepress/plugin-feed' export default { plugins: [ feedPlugin({ hostname: 'https://example.com', atom: true, }), ], } The plugin can generate the following formats. Enable the ones you need: Atom 1.0: atom JSON 1.1: json RSS 2.0: rss The hostname option is required, as the feed links are generated from it. Readable Preview Atom and RSS feeds include XSL templates, so…
V
Blog plugin for VuePress, providing article collection, categorization, type filtering, and excerpt generation. Usage npm i -D @vuepress/plugin-blog@next .vuepress/config.ts import { blogPlugin } from '@vuepress/plugin-blog' export default { plugins: [ blogPlugin({ // options }), ], } Guide Article Collection The filter option determines which pages are treated as blog articles. By default, all pages generated from a Markdown file are articles, except the homepage. Gathering Info The getInfo…
V
Seamlessly integrate Umami Analytics—a privacy-focused, open-source web analytics solution—into your VuePress site. Usage npm i -D @vuepress/plugin-umami-analytics@next .vuepress/config.ts import { umamiAnalyticsPlugin } from '@vuepress/plugin-umami-analytics' export default { plugins: [ umamiAnalyticsPlugin({ // options }), ], } This plugin supports both Umami Cloud and Self-hosted instances. Guide Reporting Events Out of the box, the plugin automatically captures page view events during…
V
Seamlessly integrate Google Analytics 4 (GA4) into your VuePress site. This plugin leverages the Global Site Tag (gtag.js) to enable robust traffic analysis and user tracking. Usage npm i -D @vuepress/plugin-google-analytics@next .vuepress/config.ts import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics' export default { plugins: [ googleAnalyticsPlugin({ // options id: 'G-XXXXXXXXXX', }), ], } Guide Reporting Events Google Analytics 4 automatically collects a wide range of…
V
Seamlessly integrate Microsoft Clarity into your VuePress project. Usage npm i -D @vuepress/plugin-clarity-analytics@next .vuepress/config.ts import { clarityAnalyticsPlugin } from '@vuepress/plugin-clarity-analytics' export default { plugins: [ clarityAnalyticsPlugin({ // options }), ], } Guide Features Microsoft Clarity is a behavioral analysis tool that helps you understand how users interact with your website. This plugin simplifies the setup process, enabling you to capture actionable…
V
This plugin integrates Baidu Analytics (Baidu Tongji) into your VuePress site, allowing you to track visitor traffic and user interactions. Tips Please disable the SPA mode in your Baidu Analytics settings. This plugin automatically handles page view reporting on route changes. Enabling Baidu's built-in SPA mode may result in duplicate data or incorrect statistics. Usage npm i -D @vuepress/plugin-baidu-analytics@next .vuepress/config.ts import { baiduAnalyticsPlugin } from…
V
Add llms.txt to your site to provide LLM-friendly content. Usage npm i -D @vuepress/plugin-llms@next .vuepress/config.ts import { llmsPlugin } from '@vuepress/plugin-llms' export default { plugins: [ llmsPlugin({ // options }), ], } Why llms.txt? Large Language Models (LLMs) increasingly rely on web-based documentation to answer user queries and write code. However, standard websites present significant challenges: context windows are limited, and raw HTML—cluttered with navigation, scripts,…
V
To avoid theme developers and users setting unneeded options, we have a set of guidelines that should be followed when creating a theme. DOM Structure A theme must implement the following DOM structure: Container: An element which contains the entire theme. This element should have an attribute vp-container. Content: An element which holds markdown render results. This element should have an attribute vp-content. A theme may have the following optional elements: Navbar: Navbar of the site. This…
V
Every official plugin ships built-in locale data, so its texts are translated out of the box for the languages listed below. The locales option is only needed when you want to change a built-in text, or to translate a language that has no built-in data. Supported Languages English (United States) (en-US) Simplified Chinese (zh-CN) Traditional Chinese (zh-TW) German (de-DE) German (Austria) (de-AT) Vietnamese (vi-VN) Ukrainian (uk-UA) Russian (ru-RU) Portuguese (pt) Portuguese (Brazil) (pt-BR)…