vitepress
vitepress copied to clipboard
virtual modules are blocked in github pages
Describe the bug
I done some plugins for vitepress that uses virtual modules.. but as those start with _ github pages block them.. I fount this issue for vite but didn't manage to implement the solution!
you can check the behavior in Mermaid Plugin

Reproduction
use virtual modules...
Expected behavior
the output should not generate files starting with _
System Info
System:
OS: Windows 10 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Memory: 5.68 GB / 15.92 GB
Binaries:
Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.1.3 - ~\AppData\Roaming\npm\npm.CMD
Browsers:
Chrome: 105.0.5195.127
Edge: Spartan (44.22621.598.0), Chromium (105.0.1343.42)
Internet Explorer: 11.0.22621.1
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
You can emit a .nojekyll file from your plugin to outDir?
We can fix this here too. Custom sanitizeFileName function should work. We probably can borrow the default one and remove leading underscores. PRs are welcome.
You can emit a
.nojekyllfile from your plugin to outDir?
it worked when I placed this file inside Public folder. Maybe the docs should warn about that, not sure if in vitepress or vite docs but one of the 2?