c8r / x0

Document & develop React components without breaking a sweat
https://compositor.io/x0/
MIT License
1.71k stars 65 forks source link

Build creates wrong links #111

Closed ipa-swk closed 5 years ago

ipa-swk commented 5 years ago

I have a docs folder including multiple md, mdx and js files which are linked from the index.md file. When I build the docs folder on Windows x0 build docs, it creates a dist folder including multiple folders for each file together with an index.html file. When I open index.html , I see all links but they do not work since they are pointing to wrong location. If there is an echo.md file, then the location of the link is creates as:

file:///C:/echo

jxnblk commented 5 years ago

You’ll need to run a local dev server to test the dist folder locally

ipa-swk commented 5 years ago

Thanks for help. These steps solved my issue:

npm install -g http-server
cd \local-path-to-dist
http-server

Open your browser and go to the address http://localhost:8080