egoist / docute

📚 Effortless documentation, done right.
https://docute.egoist.dev
MIT License
3.8k stars 427 forks source link

npm dist: absolute path will break website served from subfolder #255

Open noraj opened 5 years ago

noraj commented 5 years ago

In the npm package if I do npm i docute there is a dist folder whic contains:

The link href is /docute.css and the script src is /docute.js. But adding a front / will break the app if it is served from a subfolder, eg. https://example.org/site/index.html because https://example.org/docute.js won't exist, it will be https://example.org/site/docute.js.

So I suggest to just put src="docute.js" and same for the css.