Skip to content

How to add snowpack gh pages? #1423

Answered by stramel
markfirmware asked this question in Q&A
Oct 27, 2020 · 8 comments · 23 replies
Discussion options

You must be logged in to vote

@markfirmware

So the solution here is:

  1. Update snowpack.config.js with buildOptions.baseUrl: '/gh-pages-svelte'
  2. Update all file references in public/index.html to be prefixed with %PUBLIC_URL% (ie. %PUBLIC_URL%_dist_/index.js). Alternatively, you can utilize <base href="%PUBLIC_URL%" /> and remove the leading / on all file references.
  3. Add an empty .nojekyll file to the docs folder. (This disables Jekyll which ignores all folders with leading _)

Here is the working fork of your original repo:https://github.com/stramel/gh-pages-svelte (https://stramel.github.io/gh-pages-svelte/)

Also, note, you will need to change the /logo.svg path. https://www.snowpack.dev/#import-images-%26-other-assets

Replies: 8 comments 23 replies

Comment options

You must be logged in to vote
1 reply
@FredKSchott
Comment options

Comment options

You must be logged in to vote
3 replies
@markfirmware
Comment options

@FredKSchott
Comment options

@stramel
Comment options

Comment options

You must be logged in to vote
13 replies
@cheersmas
Comment options

@jcuenod
Comment options

@stramel
Comment options

@jcuenod
Comment options

@stramel
Comment options

Answer selected by markfirmware
Comment options

You must be logged in to vote
3 replies
@Kevin-Carlos
Comment options

@markfirmware
Comment options

@Kevin-Carlos
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@nojaf
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@hesusruiz
Comment options

@stramel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet