I had recently posted a question about the deployment of my blogdown
based website here. I was not exactly following the instructions in the blogdown
book, but I got the issue resolved - thanks to the answer by Yihui.
I am trying to load my website exactly as instructed in the documentation. So, I have now the entire project in my git repo and I am using the options in netlify
as mentioned in the documentation, i.e., Build command:
option set to hugo
, Publish directory:
set to public
and HUGO_VERSION
set to 0.30
in deploy settings.
I am getting successful deployment (in netlify
) and the site shows fine up at
https://typesetter-signs-43683.netlify.com/
but, my earlier url (from github pages)
https://sn248.github.io/
shows a 404
,file not found
error.
netlify
does not give any deployment error and github page settings says that site is published
. I get the favicon of the theme but nothing else, and I find this very perplexing!
I am suspecting, there is yet another crucial step that I am missing. Any pointers here would be very helpful!
Thanks, SN248
The site you built on Netlify is published on Netlify, and the address https://sn248.github.io/ only shows content published on GitHub.
GitHub Pages publishes the contents of your GitHub repo. If you have a Jekyll config file in there, it will build a Jekyll site based on that config, but otherwise it won't run any other builds. Without the build, there are no html files to host. For example, when you go to https://sn248.github.io/, GitHub pages looks for an index.html file in the root of your repo. It returns a 404, because the file is indeed not found.
The easiest solution is to stop using the sn248.github.io address, and use a Netlify address instead. You can change your current address to sn248.netlify.com by going to the site Settings > Site information and clicking the Change site name button. Then enter sn248
in the box and save.
If you want to keep using sn248.github.io, you'll have to build your site on GitHub. The is a more complex process than what you've done so far, but the blogdown docs do have fairly detailed instructions on how to do it, either by building locally, or by setting up Travis CI to build for you.
One last option is to request an Rbind address like sn248.rbind.io. The blogdown docs explain how this works, and link to full instructions in the Rbind support site. Basically, you start by filing an issue in the Rbind support repo to request an address.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With