Skip to content

mrothko2/notion-custom-domain2

 
 

Repository files navigation

Notion Custom Domain

Custom domains for your public Notion pages. You can publish your page to your own domain instead of notion.site.

Notion Custom Domain

Getting Started

Install dependencies:

yarn

Then deploy to Vercel with specifiying your public Notion page:

PAGE_URL=https://<your-domain>.notion.site/<Your-Page-ID> \
yarn deploy:prod

For example:

PAGE_URL=https://notion.notion.site/Notion-Official-83715d7703ee4b8699b5e659a4712dd8 \
yarn deploy:prod

Finally, set up a custom domain for the deployment on the Vercel Dashboard. See Custom Domains – Vercel Docs

Development

Run locally with vercel dev

PAGE_URL=https://<your-domain>.notion.site/<Your-Page-ID> \
yarn develop

Then open http://localhost:3000.

Debug with Node Inspector

yarn debug

Then open http://localhost:3000.

Google Analytics Support

Deploying with GA_TRACKING_ID environment variable injects the tracking code into your public Notion page:

PAGE_URL=https://<your-domain>.notion.site/<Your-Page-ID> \
GA_TRACKING_ID=UA-XXXXXXXXX-X \
yarn deploy:prod

Using Environment Variables on the Vercel Dashboard

You can use environment variables on the Vercel Dashboard. In this case, you can simply run yarn develop, yarn deploy or yarn deploy:prod without setting environment variables.

License

MIT

About

📝 Custom domains for your public Notion pages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%