-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploying static site to GitHub pages needs .nojekyll file #2029
Comments
@benhjames I think we should go with |
@arunoda @benhjames having a problem with github pages.
https://conciergeauctions.github.io/styled-material-components/ https://github.com/ConciergeAuctions/styled-material-components |
@brad-decker I believe the best way to serve it is through a See how I do it here! https://github.com/benhjames/benjames.me/ And better instructions here: https://gist.github.com/cobyism/4730490 |
@benhjames the actual issue here is jekyll/jekyll#332 this ... it looks like _config.yml can set the base path for the site, however if we have a .nojekyll file does that mean that it'll ignore _config.yml? Is there a next.js way to set a base path? |
Having the I don't think there's currently support for exporting a site that you want to host within a folder, but I may well be wrong! |
@benhjames the base path for my site is the paths added for the build are relative urls that hit /_next/ that would resolve to Am i doing something wrong with my export setup? @benhjames @arunoda |
@benhjames your site works due to custom cname/domain |
Which i suppose is a totally fine workaround if nothing else works :P |
Ahhh sorry I see, I assumed it was a GitHub user page rather than a project page! Yeah I can't really see a way to make that work right now other than via custom domain...! |
Do you think a configuration option for custom root path url would be something usable? that would get appended ahead of /_next/ and static resources inside the index.html file? |
Yeah I can see that being useful - @arunoda what do you think? Then you could host a static site with its root at e.g. https://mycoolsite.com/subfolder instead of being restricted to using https://mycoolsite.com |
If this is something that'd be useful i'd like to take a stab at it. Would love to get involved with next.js contributing. |
Something I noticed deploying to GitHub pages is that the
_next
folder is by default not served by GitHub (404s) as mentioned here (underscored folders are ignored): https://github.com/blog/572-bypassing-jekyll-on-github-pagesWould it be possible for the
_next
folder to not begin with an underscore, or instead to add a note to the README mentioning this behaviour and the fact you need to add a blank.nojekyll
file to theout
dir otherwise?The text was updated successfully, but these errors were encountered: