Skip to content

Instantly share code, notes, and snippets.

@nitingupta2
Last active August 15, 2017 00:33
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nitingupta2/c0aa4215dc348eb7782315fe28253de8 to your computer and use it in GitHub Desktop.
Deploy a blogdown website on Netlify

Assuming you have:

  1. A website built using blogdown and Hugo
  2. Hosted on GitHub pages, a.k.a .github.io
  3. Built your blogdown website on your local machine blogdown:::serve_site(), which is generated within the public folder
  4. Sync'd your local public repository to .github.io repository in your github account

You want to deploy your website to Netlify, which supports custom domains with HTTPS:

  1. Sign up on Netlify with your GitHub account.

  2. Under Deploy settings:

  • Repository - Choose .github.io from your GitHub repositories
  • Branch - master
  • Build command -
  • Publish command -

The existing files will be uploaded from .github.io repository to Netlify servers (takes a few minutes). Netlify will generate a site <some-random-name.netlify.com>

  1. Change the site name to something meaningful - e.g. .netlify.com

  2. Configure domain:

  1. Go to the HTTPS tab on Netlify and enable HTTPS
  • Let Netlify generate a certificate.
  • Check Force TLS to direct all traffic to HTTPS
  1. Now your website will be active on both GitHub pages and Netlify. When you update .github.io, the changes will be automatically reflected on your website hosted on Netlify.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment