vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
13.09k stars 2.11k forks source link

Dead links in frontmatter not reported #3039

Open Akryum opened 1 year ago

Akryum commented 1 year ago

Describe the bug

Using the default theme, dead links in the home page frontmatter are not reported.

---
layout: home

title: Home

hero:
  name: Welcome
  actions:
    - theme: brand
      text: Get Started
      link: /some-dead-link.md

features:
  - icon: 📝
    title: Test
    link: /some-dead-link.md
---

Reproduction

https://stackblitz.com/edit/vite-rovscc?file=docs%2Findex.md

Expected behavior

Errors about dead links would be reported

System Info

System:
    OS: Linux 6.5 Fedora Linux 38 (Workstation Edition)
    CPU: (24) x64 AMD Ryzen 9 3900XT 12-Core Processor
    Memory: 40.55 GB / 62.69 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 20.6.1 - ~/.local/share/pnpm/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.1/bin/yarn
    npm: 9.8.1 - ~/.local/share/pnpm/npm
    pnpm: 8.8.0 - ~/.local/share/pnpm/pnpm
    Watchman: 0.0.0 - /usr/bin/watchman
  Browsers:
    Chrome: 117.0.5938.132
  npmPackages:
    vitepress: ^1.0.0-rc.14 => 1.0.0-rc.14

Additional context

No response

Validations

brc-dd commented 1 year ago

We will need to find some way to identify links in frontmatter that works across custom themes as well 👀

Currently only markdown links are extracted. Normal anchor links in markdown aren't processed either.