Rohith's Blog

I write about tech.

15 May 2020

Blogging using Notion Pages

I’ve set up a sub-blog at https://notionso.rkpblog.tech, that’s directly published from a public Notion Page in my Notion account.

There is no need to self-manage the site, or even git commit/pull everytime I make an update, as was the case with the previous implementation of a similar sub-blog at https://notion.rkpblog.tech

Get Started


On a high level, we are utilizing Cloudflare Workers to rewrite traffic. The solution is inspired by this script (thank you Mayne!), and I added my own features like pretty links.

  • Step 0: Prerequisite

    1. Enable Public Access on your desired pages through Notion’s Share menu, and Allow Search Engines.
    2. Purchase your desired domain with a registrar like Namecheap, or use your existing domain or subdomain.
  • Step 1: Set up your Cloudflare account (5 mins)

    1. Sign up for an account: https://dash.cloudflare.com/sign-up

    1. Enter your custom domain name. If you would like to use a subdomain, you should still entire your root domain name here.

    1. Select the Free plan

    1. If you don’t have any A records imported, add one with your root domain as the Name and 1.1.1.1 as the Content. Otherwise, click Continue on the DNS Record page.

      • If you are using a subdomain and don’t have any CNAME records imported, add one with your subdomain as the Name and 1.1.1.1 as the Content.

    1. Copy the 2 nameservers, which end with .ns.cloudflare.com

    1. Paste the nameservers in the domain setting page at your registrar (Namecheap in my case). Make sure you save the setting.

    1. Wait for a minute, then click Done, check nameservers

    1. Select Flexible SSL/TLS encryption mode

    1. Turn on Always Use HTTPS, Auto Minify, and Brotli (all 3 optional but recommended)

    1. Select Done

    1. You should see this screen. If Cloudflare hasn’t detected your site, click Re-check your site, and refresh the page.

    1. Select the Workers page (one of the blue boxes) and then click Manage Workers

    1. Choose any available subdomain for your worker (it doesn’t really matter what you pick)

    1. Click Set Up and then click Confirm

    1. Choose the Free plan

      • If your site gets a lot of visitors, you can change to the paid Unlimited plan later.

    1. Verify your email if you haven’t, then go back to the Manage Workers page (see #12)

    1. Click Create a Worker

  • Step 2: Customize and generate the script (2 mins)

  • Step 3: Paste the script in Cloudflare (1 min)

    1. Delete the existing code, and paste the code you copied

    1. Click Save and Deploy

    1. After saving, click on your site name on the top of the page

    1. Go to the Workers page and select Add Route

    1. Type yourdomain.com/* (or [subdomain.yourdomain.com/*](http://subdomain.yourdomain.com/*) if you would like to use a subdomain) as the Route and select the Worker you just created

    1. Hit save, and you’re done! You can now visit your site. 🎉

Courtesy: fruitionsite

comments powered by Disqus