vuejs / vitepress

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

Is there a plan to support symlinks to external folders of md files? #3739

Closed flowt-au closed 3 weeks ago

flowt-au commented 3 weeks ago

I see there is some discussion (now closed) about symlinks: #1496

I have a large project with multiple workspaces and I am trying to use Vitepress to create a central documentation repo that pulls the folders of md files from those disparate projects. I would like to be able to search all project's docs from the central Vitepress site.

I created symlinks in my Vitepress site to the docs folder in each external project, but linking to the symlink throws a 404, same as mentioned in #1496.

I also looked at rewrites as per the docs but that didn't help either (possibly me not doing it right).

So, is there a plan to support this or is there a way to handle this use-case?

Thanks, Murray

brc-dd commented 3 weeks ago

Symlinks should work fine with the config I shared on the linked PR - https://github.com/vuejs/vitepress/pull/2780

flowt-au commented 3 weeks ago

Yes, you are right! My mistake. I was using just

    resolve: {
      preserveSymlinks: true
    }

instead of

  vite: {
    resolve: {
      preserveSymlinks: true
    }
  }

All working now. :-)