Post

Welcome and how this site is hosted

Welcome and how this site is hosted

Welcome

Hello and welcome to my humble docs site !

Hosting this blog

What better way to kick things off with a simple intro on how this site is hosted.

My requirements as of now are:

  • static site where hosting can be done via a VCS
  • easy to manage via markdown
  • integration with Cloudflare (sunk costs!)

With these laid out, the decided outcome is to

  • Setup a gitlab.io site via Gitlab Pages
  • Use Jekyll as the static site generator

The process is well documented via Gitlab pages_from_scratch

In fact the tricky part comes when trying to add a custom DNS to the page.

  1. Default setting has this set to project members only which would require visitors to login to Gitlab before viewing the site. Hence this needs to be toggled to Everyone with access instead
    20241102_gitlab_pages_setup

  2. Next up, enable the custom DNS option and create the required DNS and TXT records in Cloudflare
    20241102_gitlab_pages_setup
    20241102_cloudflare_gitlab_pages_records

  3. Also, for Cloudflare to perform a traffic encryption to Gitlab (as the origin), generate the Origin Certificates and fill the pem and private key in pages config in Gitlab pages
    20241102_cloudflare_origin_certificates

  4. Lastly, remember to enable the always use HTTPs on Cloudflare settings.
    20241102_cloudflare_always_use_https

And that’s it ! Of course, the bulk of the frustration is learning how to use Jekyll that is not covered here.

This post is licensed under CC BY 4.0 by the author.

Trending Tags