https://github.com/ivynya/document
Custom-branded documents published using Notion.
https://github.com/ivynya/document
Last synced: 2 months ago
JSON representation
Custom-branded documents published using Notion.
- Host: GitHub
- URL: https://github.com/ivynya/document
- Owner: ivynya
- License: cc0-1.0
- Created: 2022-02-17T06:06:20.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-15T23:33:49.000Z (almost 3 years ago)
- Last Synced: 2025-01-26T09:24:18.332Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# document
Use Notion to publish a document to the web with custom URL and branding, or render embedded documents on other sites.
> ⚠️ Uses unofficial notion-to-md and @notionhq/client packages to allow for Deno Deploy. Will be removed once Deploy supports NPM.
## Deploying
1. Create a Notion integration from the developers console
2. Paste token into `.env` file with format in `.env.example`
3. `docker build -t doc-direct .`
4. `docker run -p 8000:8000 -d doc-direct`
5. Open `localhost:8000` to verify functionality
6. Use an NGINX reverse proxy / etc to deploy on web with your URL
On Deno Deploy, you can fork this repository and just set automatic deployments from the main branch.
## Publishing a Notion page
1. Add your Notion integration to a root page
2. Create a page inside of the root page
3. Copy the link of your new page that looks like this: `https://www.notion.so/ivynya/Hello-05cc30bbbd844528b1558d80e3041a5c`
4. Navigate to `localhost:8000/p/05cc30bbbd844528b1558d80e3041a5c` to view that page
## Embedding Documents on Other Sites
1. Include `` (or the domain you have document hosted on)
2. Get the markdown of your page from `localhost:8000/d/05cc30bbbd844528b1558d80e3041a5c` (/d/ instead of /p/)
3. Place the markdown in a container element with id `id="ivydoc"`
Add additional styling on top per-site as you see fit, or edit `/content/doc.css` to change the styling of both document and all sites that use your document instance's styling.
## Editing branding
Edit the `content/index.html` or `content/doc.css` files with whatever you desire, then redeploy.
## Notable OSS
Deno Oak
Notion to MD
Notion Client