VuePress EcosystemVuePress Ecosystem
  • Theme Guidelines
  • theme-default
  • Hope Theme
  • Plume Theme
  • Reco Theme
  • Feature Plugins
  • Markdown Plugins
  • Search Plugins
  • Blog Plugins
  • PWA Plugins
  • Analytics Plugins
  • SEO Plugins
  • Development Plugins
  • Tool Plugins
  • AI Plugins
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • Theme Guidelines
  • theme-default
  • Hope Theme
  • Plume Theme
  • Reco Theme
  • Feature Plugins
  • Markdown Plugins
  • Search Plugins
  • Blog Plugins
  • PWA Plugins
  • Analytics Plugins
  • SEO Plugins
  • Development Plugins
  • Tool Plugins
  • AI Plugins
  • @vuepress/helper
  • English
  • 简体中文
GitHub
  • append-date
  • markdown-chart
    • markdown-chart
    • Chart.js
    • ECharts
    • Flowchart
    • Markmap
    • Mermaid
    • PlantUML
  • markdown-container
  • markdown-ext
  • markdown-field
  • markdown-file-tree
  • markdown-image
  • markdown-include
  • markdown-hint
  • markdown-math
  • markdown-preview
  • markdown-stylize
  • markdown-tab
  • links-check
  • prismjs
  • revealjs
    • revealjs
    • Slide Demo
    • Reveal.js Themes
  • shiki

links-check

@vuepress/plugin-links-check

This plugin checks for dead links in your markdown files.

This plugin has been integrated into the default theme.

Usage

npm i -D @vuepress/plugin-links-check@next
.vuepress/config.ts
import { linksCheckPlugin } from '@vuepress/plugin-links-check'

export default {
  plugins: [
    linksCheckPlugin({
      // options
    }),
  ],
}

Options

devboolean
Defaulttrue

Whether to check dead links in markdown in dev server.

buildboolean | 'error'
Defaulttrue

Whether to check dead links in markdown during build. If set to 'error', the build will fail when dead links are found.

exclude(string | RegExp)[] | ((link: string, isDev: boolean) => boolean)

Links to exclude from checking. You can use a list of strings or regular expressions, or a function that returns a boolean.

.vuepress/config.ts
import { linksCheckPlugin } from '@vuepress/plugin-links-check'

export default {
  plugins: [
    linksCheckPlugin({
      exclude: [
        // exclude links by string
        '/exclude-link',
        // exclude links by regex
        /\/exclude-link-regex/,
      ],

      // or exclude links by function
      exclude: (link, isDev) => {
        if (isDev) {
          return link.startsWith('/exclude-link-dev')
        }
        return link.startsWith('/exclude-link-build')
      },
    }),
  ],
}
Edit this page on GitHub
Last Updated: 9/28/26, 4:40 AM
Contributors: Mister-Hope
Prev
markdown-tab
Next
prismjs