Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
velsa committed Jan 31, 2024
1 parent cf80a44 commit 64d73f8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .changeset/yellow-dragons-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"notehost": patch
---

Update README
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 😉
<br/>

### Generate your NoteHost worker

---

Go into your working directory and run:

```sh
npx notehost init <domain>
```
Expand Down Expand Up @@ -53,22 +71,6 @@ npm install

<br/>

### 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 😉
<br/>

### Configure your domain

---
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion templates/default/src/site-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 64d73f8

Please sign in to comment.