egoist / docute

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

Usage with parcel #197

Open Tom-Julux opened 5 years ago

vercel[bot] commented 5 years ago

This pull request is automatically deployed with Now. To access deployments, click Details below or on the icon next to each push.

egoist commented 5 years ago

How does Parcel serve the static files? Docute will load .md files from root path by default.

jthegedus commented 5 years ago

@tom-julux people in the Parcel issue you link to recommend this https://github.com/elwin013/parcel-plugin-static-files-copy#readme which seems to be in high use now for copying static assets.

@egoist Parcel doesn't serve any static files. So it will only bundle your index.html and index.js into a dist/ dir. So if you were to deploy the dist/ folder you would first need to copy over your .md files to the dist/ dir for Docute to be able to serve them locally, unless you used the sourcePath with a full URL to the .md files.

It's handy if you want to separate the config and customisation of Docute into one folder and have content in another served statically from your repo, but not very intuitive IMO.