Hugo

Using Netlify to Deploy

  1. I followed instructions for one-click install using Netlify deploying on GitHub.
  2. The repository shows up in my GitHub account.
  3. I have since purchased a custom domain name on namecheap, repointed it’s nameservers to Netlify’s
    DNS servers and everything seems to be in working order?
  4. Questions are:
    a. Do I edit my website through the repo on GitHub or inside Netlify?
    b. In GitHub do I change the baseURL to the custom domain I have in set up in Netlify or the
    github.io/academic-kickstart repo that was copied to my account. I feel like Github is assigning
    the github page https://username.github.io/academic-kickstart as the baseURL.
    c. Do I need to purchase SSH certificates or CSR codes in Netlify?

4 in short:

a) Edit on GitHub. Every change/commit triggers a new Netlify build.
b) Set the domain in config.toml of your Hugo project, e.g. baseURL = "https://example.org"
c) I assume you mean SSL/HTTPS? There should be a “one click” way to enable that in Netlify, and for free courtesy of Let’s Encrypt.

2 Likes

a) Thanks for the quick reply. I just didn’t realize it was that easy, #mindblown. The last website I deployed straight from GitHub was way more complicated. I already tried customizing a few things through my repo on GitHub and it reflected in new Netlify build.
b) Can you be more specific? When I did one-click install Netlify assigned a random URL for website (which I changed to tempName.netlify.com). Then I linked my custom domain name I purchased from namecheap to Netlify successfully (I just verified it’s linked). Do I used the tempName.netlify.com URL that was given intially or the custom domain name I actually want that’s now linked to the baseURL in config.toml in GitHub?
c) Thanks! I got confused prior when I was researching and thought this was something I had to do still.

I thought I was extremely specific … The thing is, the baseURL in Hugo is a way to get all the links in your site correct. Your Netlify site will always have 2 working URLs, your https://mycooldomain and https://yoursite.netlify.com. I assume that you want people to access the mycool… so put that in your Hugo config.

Thanks! Yes you were clear! I still consider myself novice and just want to be super sure. Thanks for the extra clarification. Def the cooldomainname.

1 Like