vuejs / vitepress

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

Markdown files are not rebuilt when their "includes" change #4289

Closed everdimension closed 3 weeks ago

everdimension commented 1 month ago

Describe the bug

I have the following vitepress structure:

docs-vitepress
├── endpoints.md
├── entities.md
├── generated
│   ├── endpoints.md
│   └── entities.md
├── index.md
└── overview.md

enpoints.md simply contains an include of ./generated/endpoints.md:

<!--@include: ./generated/endpoints.md-->

This is done to avoid the /generated/ path segment in the URL.

Problem: When content of /generated/endpoints.md changes, content of /endpoints.md doesn't change

Reproduction

https://github.com/everdimension/vitepress-watch-included-issue

Expected behavior

It's expected that when content of /generated/endpoints.md changes, the updates will be reflected in the build

System Info

OS: macOS 13.5.1
Memory: 16 GiB
Architecture: aarch64

  System:
    OS: macOS 13.5.1
    CPU: (8) x64 Apple M1
    Memory: 25.73 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0
    Yarn: 1.22.19
    npm: 10.2.5
  Browsers:
    Chrome Canary: 131.0.6778.0
    Safari: 16.6
  npmPackages:
    vitepress: ^1.4.1 => 1.4.1

Additional context

No response

Validations

brc-dd commented 1 month ago

https://github.com/vuejs/vitepress/pull/2581

everdimension commented 1 month ago

Awesome, thanks!

I didn't find this in the docs

brc-dd commented 3 weeks ago

Ok this has regressed. Actually you shouldn't be needing any extra config. I just saw my old comment - https://github.com/vuejs/vitepress/issues/117#issuecomment-1732388826

Update: caused by - https://github.com/vuejs/vitepress/commit/c46e4b784ddb9ce3bd1cfcc3de1d1d676535cb5b

brc-dd commented 3 weeks ago

Fixed in latest version. You can remove that additional config. It's not needed.