XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

VuePress Ecosystem

VuePress official themes and plugins

meilisearch

Integrate MeiliSearch into VuePress, which can provide search to your documentation site. Guide Setup MeiliSearch To use MeiliSearch for free, you need to self-host it on your own server, otherwise you need to pay for MeiliSearch Cloud. MeiliSearch Cloud To use MeiliSearch Cloud, you need to create an account and set up a new instance. You can find the instructions in the MeiliSearch Cloud documentation. Starting MeiliSearch Tips In this section, we use Docker to self-host Meilisearch, see…

Search Plugin Guidelines

To make VuePress theme support search plugins out of box, we have a set of guidelines that should be followed when creating a search plugin. Component Name If a search plugin provides a search box that is suitable to display in navbar or sidebars, it shall be named SearchBox and registered globally. If a search plugin provides a complex search result component with input and result list that is suitable to display in a single page, it shall be named SearchPanel and registered globally. The…

docsearch

Integrate Algolia DocSearch into VuePress to provide a full-text search experience for your documentation site. Usage npm i -D @vuepress/plugin-docsearch@next .vuepress/config.ts import { docsearchPlugin } from '@vuepress/plugin-docsearch' export default { plugins: [ docsearchPlugin({ // options appId: '<APP_ID>', apiKey: '<API_KEY>', indices: ['<INDEX_NAME>'], }), ], } Guide Get Search Index Before using this plugin, you need to prepare your search index. There are two ways to achieve this:…

shiki

This plugin enables syntax highlighting for markdown code fence with Shiki. Tips Shiki is the syntax highlighter used by VSCode. It provides higher fidelity highlighting but may be slower than Prism.js, especially when processing many code blocks. Usage npm i -D @vuepress/plugin-shiki@next .vuepress/config.ts import { shikiPlugin } from '@vuepress/plugin-shiki' export default { plugins: [ shikiPlugin({ // options langs: ['ts', 'json', 'vue', 'md', 'bash', 'diff'], }), ], } Guide Shiki Themes…

prismjs

This plugin enables syntax highlighting for markdown code fences with Prism.js. The default theme uses Shiki for syntax highlighting instead of this plugin. To use Prism.js, set themePlugins: { shiki: false } in the theme options and register this plugin. Usage npm i -D @vuepress/plugin-prismjs@next .vuepress/config.ts import { prismjsPlugin } from '@vuepress/plugin-prismjs' export default { plugins: [ prismjsPlugin({ // options }), ], } Guide Prism.js Themes Prism.js themes are applied to the…

markdown-tab

Add tabs and code tabs to your VuePress site. This plugin has been integrated into the default theme. Usage npm i -D @vuepress/plugin-markdown-tab@next .vuepress/config.ts import { markdownTabPlugin } from '@vuepress/plugin-markdown-tab' export default { plugins: [ markdownTabPlugin({ // Enable code tabs codeTabs: true, // Enable tabs tabs: true, }), ], } Tabs Guide You need to wrap your tabs in tabs container. You can add an id suffix in tabs container, which will be used as tab id. All tabs…

markdown-stylize

Stylizing content in your VuePress site. Usage npm i -D @vuepress/plugin-markdown-stylize@next .vuepress/config.ts import { markdownStylizePlugin } from '@vuepress/plugin-markdown-stylize' export default { plugins: [ markdownStylizePlugin({ // options }), ], } Syntax Align Content You can use left center right justify to align text. Appending Attributes You can use {attrs} to add attrs to Markdown content. For example, if you want a heading2 "Hello World" with an id "say-hello-world", you can…

markdown-preview

Support preview contents in VuePress site. Usage npm i -D @vuepress/plugin-markdown-preview@next .vuepress/config.ts import { markdownPreviewPlugin } from '@vuepress/plugin-markdown-preview' export default { plugins: [markdownPreviewPlugin()], } Guide The plugin provides a preview container and VPPreview component to preview contents in VuePress site. You can use the preview container in markdown files like this: ::: preview Optional Title Preview Contents ::: It will be rendered as a preview…

markdown-math

Add math support to your VuePress site. This plugin allows you to use mathjax or katex to render TeX\TeXTE​X in your markdown content. Usage npm i -D @vuepress/plugin-markdown-math@next # install one of the following packages: npm i -D @mathjax/src npm i -D katex .vuepress/config.ts import { markdownMathPlugin } from '@vuepress/plugin-markdown-math' export default { plugins: [ markdownMathPlugin({ // options }), ], } Syntax Inline mode: $xxx$ Display mode: $$xxx$$ $$ xxx $$ Escaping Escaping…

markdown-include

Add markdown include features to your VuePress site. Usage npm i -D @vuepress/plugin-markdown-include@next .vuepress/config.ts import { markdownIncludePlugin } from '@vuepress/plugin-markdown-include' export default { plugins: [ markdownIncludePlugin({ // options }), ], } Syntax Use <!-- @include: filename --> to include a file. To partially import a file, you can specify the range of lines to be included: <!-- @include: filename{start-end} --> <!-- @include: filename{start-} --> <!-- @include:…

markdown-image

Add additional features to your markdown images. Usage npm i -D @vuepress/plugin-markdown-image@next .vuepress/config.ts import { markdownImagePlugin } from '@vuepress/plugin-markdown-image' export default { plugins: [ markdownImagePlugin({ // Enable figure figure: true, // Enable image lazyload lazyload: true, // Enable image mark mark: true, // Enable image size size: true, }), ], } Guide Image Lazyload The plugin will enable image lazyload using native HTML5 features, so it's only working on…

markdown-hint

Add gfm alerts and hint containers to your VuePress site. This plugin has been integrated into the default theme. Usage npm i -D @vuepress/plugin-markdown-hint@next .vuepress/config.ts import { markdownHintPlugin } from '@vuepress/plugin-markdown-hint' export default { plugins: [ markdownHintPlugin({ // Enable hint container, true by default hint: true, // Enable gfm alert alert: true, }), ], } Guide By default, we support important, info, note, tip, warning, caution, details containers with…

markdown-file-tree

This plugin renders a directory structure in Markdown, either from a Markdown unordered list (file tree), or from the code blocks of several files (code tree). Usage npm i -D @vuepress/plugin-markdown-file-tree@next .vuepress/config.ts import { markdownFileTreePlugin } from '@vuepress/plugin-markdown-file-tree' export default { plugins: [ markdownFileTreePlugin({ fileTree: true, codeTree: true, }), ], } File Tree In Markdown, use the ::: file-tree container to display a directory structure with…

markdown-field

Add fields to your VuePress site. Usage npm i -D @vuepress/plugin-markdown-field@next .vuepress/config.ts import { markdownFieldPlugin } from '@vuepress/plugin-markdown-field' export default { plugins: [ markdownFieldPlugin({ // Enable fields fields: true, }), ], } Syntax You can use ::: fields container to describe field information, including field name, type, whether it's required, default value, etc. Inside the container, a line starting with @ followed by an inline code is a field item.…

markdown-ext

Add basic GFM support to VuePress with useful features. Usage npm i -D @vuepress/plugin-markdown-ext@next .vuepress/config.ts import { markdownExtPlugin } from '@vuepress/plugin-markdown-ext' export default { plugins: [ markdownExtPlugin({ // options }), ], } Syntax Footnote Use [^Anchor text] in Markdown to define a footnote Use [^Anchor text]: ... to describe footnote content If there are multiple paragraphs in footnote, the paragraph show be double indented Task list Use - [ ] some text to…

markdown-container

Register markdown custom containers in your VuePress site. This plugin simplifies the use of @mdit/plugin-container, but also retains its original capabilities. Usage npm i -D @vuepress/plugin-markdown-container@next .vuepress/config.ts import { markdownContainerPlugin } from '@vuepress/plugin-markdown-container' export default { plugins: [ markdownContainerPlugin({ // options }), ], } Container Syntax ::: <type> [info] [content] ::: The type is required and should be specified via type option.…

links-check

This plugin checks for dead links in your markdown files. This plugin has been integrated into the default theme (@vuepress/theme-default). Usage npm i -D @vuepress/plugin-links-check@next .vuepress/config.ts import { linksCheckPlugin } from '@vuepress/plugin-links-check' export default { plugins: [ linksCheckPlugin({ // options }), ], } Guide Link Checking The plugin checks every markdown link, and warns for the links whose target file does not exist. Links are checked in both dev server and…

append-date

This plugin will append writing date to frontmatter based on @vuepress/plugin-git. Usage npm i -D @vuepress/plugin-append-date@next .vuepress/config.ts import { appendDatePlugin } from '@vuepress/plugin-append-date' export default { plugins: [appendDatePlugin()], } Options key string Default "date" Frontmatter key to use when appending date. format "date" | "time" | "full" Default "date" Format of the date value when appending date: "date": YYYY-MM-DD format "time": HH:MM:SS format "full":…

watermark

Integrate watermark-js-plus into VuePress. This plugin can add watermarks to pages. You can choose to add watermarks globally or on specific pages. You can also choose to add text watermarks or image watermarks. Usage npm i -D @vuepress/plugin-watermark@next .vuepress/config.ts import { watermarkPlugin } from '@vuepress/plugin-watermark' export default { plugins: [ watermarkPlugin({ enabled: true, watermarkOptions: { content: 'My Site', }, }), ], } Options enabled boolean | ((page: Page) =>…

photo-swipe

This plugin provides image gallery functionality with PhotoSwipe, allowing users to view images in an elegant fullscreen lightbox with zoom, navigation, and sharing capabilities. Usage npm i -D @vuepress/plugin-photo-swipe@next .vuepress/config.ts import { photoSwipePlugin } from '@vuepress/plugin-photo-swipe' export default { plugins: [ photoSwipePlugin({ // options }), ], } Guide Preview Mode In preview mode, you can: Swipe left and right to preview other pictures on the page in order View…

nprogress

Integrate nprogress into VuePress, which provides a progress bar when navigating to another page. This plugin has been integrated into the default theme. Usage npm i -D @vuepress/plugin-nprogress@next .vuepress/config.ts import { nprogressPlugin } from '@vuepress/plugin-nprogress' export default { plugins: [nprogressPlugin()], } Styles You can customize the style of the progress bar via CSS variables: :root { --nprogress-c: var(--vp-c-accent); --nprogress-z-index: 1031; }

notice

Add notice popups to your site with this plugin. Usage npm i -D @vuepress/plugin-notice@next .vuepress/config.ts import { noticePlugin } from '@vuepress/plugin-notice' export default { plugins: [ noticePlugin({ // options }), ], } Here is an example: .vuepress/config.ts import { noticePlugin } from '@vuepress/plugin-notice' import { path } from 'vuepress/utils' export default { plugins: [ noticePlugin({ config: [ { path: '/', title: 'Notice Title', content: 'Notice Content', actions: [ { text:…

medium-zoom

Integrate medium-zoom into VuePress, which can provide the ability to zoom images. This plugin has been integrated into the default theme. Usage npm i -D @vuepress/plugin-medium-zoom@next .vuepress/config.ts import { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom' export default { plugins: [ mediumZoomPlugin({ // options }), ], } Options selector string Default '[vp-content] > img, [vp-content] :not(a) > img' Selector of zoomable images. By default this plugin will make all images…

media

This plugin registers components to embed videos, audio, and PDF documents in your pages. Usage npm i -D @vuepress/plugin-media@next # install the packages of the players you use, all of them are optional npm i -D artplayer # artplayer npm i -D @embedpdf/vue-pdf-viewer # pdf npm i -D @videojs/html # videojs, videojsAudio npm i -D @videojs/hlsjs-video # videojs: 'hlsjs' npm i -D @videojs/dash-video # videojsDash npm i -D @videojs/youtube-video # videojsProviders: ['youtube'] npm i -D…

icon

Provides icon component. Usage npm i -D @vuepress/plugin-icon@next .vuepress/config.ts import { iconPlugin } from '@vuepress/plugin-icon' export default { plugins: [ iconPlugin({ // options }), ], } Guide Icon Syntax In markdown, you can use ::icon decorators... =size /color key=value complex-key="complex value"...:: to insert custom icons. A string starting with = will be treated as a size definition. A string starting with / will be treated as a color definition. Any string which itself is a…

copyright

This plugin can automatically append copyright information when visitors copy content from your site, and can also prohibit site copying or selection. Usage npm i -D @vuepress/plugin-copyright@next .vuepress/config.ts import { copyrightPlugin } from '@vuepress/plugin-copyright' export default { plugins: [ copyrightPlugin({ // options }), ], } Guide Enabling Copyright This plugin is disabled globally by default, you can: Manually enable it by setting copy: true in page frontmatter Set global:…

copy-code

This plugin will automatically add a copy button to the top right corner of each code block on PC devices. This plugin has been integrated into the default theme. Usage npm i -D @vuepress/plugin-copy-code@next .vuepress/config.ts import { copyCodePlugin } from '@vuepress/plugin-copy-code' export default { plugins: [ copyCodePlugin({ // options }), ], } Options selector string[] | string Default '[vp-content] div[class*="language-"] pre' Code block selector. showInMobile boolean Whether to…

catalog

This plugin automatically generates catalog pages and provides catalog components. Usage npm i -D @vuepress/plugin-catalog@next .vuepress/config.ts import { catalogPlugin } from '@vuepress/plugin-catalog' export default { plugins: [ catalogPlugin({ // Your options }), ], } Guide Catalog Info First, you should set catalog info in routeMeta: .vuepress/config.ts import { catalogPlugin } from '@vuepress/plugin-catalog' export default { extendsPage: (page) => { // Set catalog info in routeMeta…