trungpq163 / docu-notion-sample-site

Demonstrates using notion-pull, docusaurus, and github pages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repo creates https://sillsdev.github.io/docu-notion-sample-site/.

The GitHub Action associated with this repo does these things:

  1. uses docu-notion to grab content from this set of Notion pages and convert them into Docusaurus-friendly markdown pages,
  2. runs these through Docusaurus, and then
  3. publishes the result to Github Pages here.

Getting Started

If you already have a Docusaurus site, or are using a different system, then you should use docu-notion directly. But if you're just getting started, you can save some time be forking this repo or using it as a template for your own Docusaurus documentation project that uses Notion for editing.

Instructions

  1. Fork or click the "Use this template" button.

  2. In Notion, duplicate this root documentation page to your own account. You can rename it anything you like.

  3. In order for docu-notion to read your site via Notion's API, you need to create what Notion calls an "integration". Follow these instructions to make an integration and get your token. Limit your integration to "READ" access.

  4. To test locally, define two environment variables:

  • DOCU_NOTION_INTEGRATION_TOKEN
  • DOCU_NOTION_SAMPLE_ROOT_PAGE (this is the ID part of the share link too your root page. It will look like 0e668b32da3c47edad0f61a25b49818b)
  1. yarn node-pull should pull your Notion pages into your docs/ directory. Then do yarn start to test the site locally.

  2. To build you site using a Github Action, go to your new github repo > Settings > Secrets > Actions and add three "Repository Secrets":

  • DOCU_NOTION_INTEGRATION_TOKEN
  • DOCU_NOTION_ROOT_PAGE (this is the ID part of the share link too your root page. It will look like 0e668b32da3c47edad0f61a25b49818b)
  • PERSON_ACCESS_TOKEN_FOR_PUSH_TO_GH_PAGES_BRANCH (instructions Give it "repo" permissions).
  1. Under "Actions", you should be able to manually launch a new "release" of your site.

  2. For information on adding pages, see the docu-notion instructions.

About

Demonstrates using notion-pull, docusaurus, and github pages

License:MIT License


Languages

Language:JavaScript 54.5%Language:CSS 45.5%