diff --git a/.changeset/yellow-dragons-admire.md b/.changeset/yellow-dragons-admire.md new file mode 100644 index 0000000..4bc5190 --- /dev/null +++ b/.changeset/yellow-dragons-admire.md @@ -0,0 +1,5 @@ +--- +"notehost": patch +--- + +Update README diff --git a/README.md b/README.md index a43f3a6..d37be01 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,28 @@ ## How to use: +### Setup your Cloudflare account + +--- + +1. Add your domain to Cloudflare. Make sure that DNS doesn't have `A` records for your domain and no `CNAME` alias for `www` +2. Create a new worker on Cloudflare and give it a meaningful name, e.g. `yourdomain-com-notion-proxy` +3. Keep the default example worker code, we will overwrite it anyway during deploy (see below) + +> A bit outdated but detailed description on how to add your domain to Cloudflare and create a worker is [here](https://stephenou.notion.site/stephenou/Fruition-Free-Open-Source-Toolkit-for-Building-Websites-with-Notion-771ef38657244c27b9389734a9cbff44). +> +> Search for "Step 1: Set up your Cloudflare account". +> +> If someone wishes to create an up-to-date tutorial for NoteHost, please submit a pull request 😉 + +
+ ### Generate your NoteHost worker --- +Go into your working directory and run: + ```sh npx notehost init ``` @@ -53,22 +71,6 @@ npm install
-### Setup your Cloudflare account - ---- - -1. Add your domain to Cloudflare. Make sure that DNS doesn't have `A` records for your domain and no `CNAME` alias for `www` -2. Create a new worker on Cloudflare and give it a meaningful name, e.g. `yourdomain-com-notion-proxy` -3. Keep the default example worker code, we will overwrite it anyway during deploy (see below) - -> A bit outdated but detailed description on how to add your domain to Cloudflare and create a worker is [here](https://stephenou.notion.site/stephenou/Fruition-Free-Open-Source-Toolkit-for-Building-Websites-with-Notion-771ef38657244c27b9389734a9cbff44). -> -> Search for "Step 1: Set up your Cloudflare account". -> -> If someone wishes to create an up-to-date tutorial for NoteHost, please submit a pull request 😉 - -
- ### Configure your domain --- @@ -104,6 +106,8 @@ export const SITE_CONFIG: NoteHostSiteConfig = { "": "NOTION_PAGE_ID", about: "NOTION_PAGE_ID", contact: "NOTION_PAGE_ID", + // Hint: you can use '/' in slug name to create subpages + "about/people": "NOTION_PAGE_ID", }, // Subdomain redirects are optional diff --git a/package.json b/package.json index c11f906..e9e194a 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,7 @@ "dev:cli": "npx tsx --inspect src/cli/index.ts init test.com", "build": "tsup src/index.ts --format cjs,esm --dts-resolve --clean --sourcemap --out-dir dist && pnpm run build:cli", "build:cli": "tsup src/cli/index.ts --format cjs,esm --clean --out-dir dist/cli", - "release:prep": "npx changeset", - "release:do": "pnpm run build && changeset publish", + "release": "pnpm run build && changeset publish", "lint": "echo Fix lint!" }, "dependencies": { diff --git a/templates/default/src/site-config.ts b/templates/default/src/site-config.ts index eacc22a..f5e5ca9 100644 --- a/templates/default/src/site-config.ts +++ b/templates/default/src/site-config.ts @@ -17,8 +17,10 @@ export const SITE_CONFIG: NoteHostSiteConfig = { // Empty slug is your main page slugToPage: { "": "<%= mainPageId %>", - about: "NOTION_PAGE_ID", contact: "NOTION_PAGE_ID", + about: "NOTION_PAGE_ID", + // Hint: you can use '/' in slug name to create subpages + "about/people": "NOTION_PAGE_ID", }, // Subdomain redirects are optional