[Vuejs]-VuePress builds broken html with invalid adresses to assets

3👍

The paths to the CSS and JS files in index.html are absolute (starts with /), so viewing index.html using the file protocol doesn’t work (you need to host it on a server so the HTTP protocol are used).

0👍

you must run http server to open this file.

open cmd in this folder, and run:

  1. with python: python -m http.server
  2. with nodejs:
  • Install http-server by typing npm install -g http-server
  • Change into your working directory, where yoursome.html lives
  • Start your http server by issuing http-server -c-1

Leave a comment