Sync pages from Notion to GitHub to be used as a static website (JAM)

Overview

notion-jam

GitHub Action: View on Marketplace Version Downloads CodeFactor Node LICENSE

Sync pages from Notion to GitHub to be used as a static website (JAM)


Usage

Quick Start

  1. Create a new Notion Integration

    notion secret

  2. Add Notion secret to GitHub repository

    1. Go to github.com/{user}/{repo}/settings/secrets/actions

    2. Set NOTION_SECRET of Notion to your repository secret.

      add notion secret to github

  3. Share the Database with the integration

    add perm

  4. Create a workflow in .github/workflows/**.yml of your repository

    Example Workflow

    # This is a basic workflow to help you get started with Actions
    
    name: NotionJAM
    
    # Controls when the workflow will run
    on:
      schedule:
        - cron: "0 21 * * *" # daily
      push:
        branches: [master, main]
    
      # Allows you to run this workflow manually from the Actions tab
      workflow_dispatch:
    
    # A workflow run is made up of one or more jobs that can run sequentially or in parallel
    jobs:
      # This workflow contains a single job called "build"
      build:
        # The type of runner that the job will run on
        runs-on: ubuntu-latest
    
        # Steps represent a sequence of tasks that will be executed as part of the job
        steps:
          # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
          - uses: actions/checkout@v3
    
          - name: notion-jam
            uses: victornpb/[email protected]
            with:
              NOTION_SECRET: ${{ secrets.NOTION_SECRET }}
              NOTION_DATABASE: https://www.notion.so/9e34cee9f5bd4c4aaf0d2eaf73ead47b
              FILTER_PROP: Status
              FILTER_VALUES: Published
              CONVERT_PROP_CASE: snake
              ARTICLE_PATH: content/posts/{title}/README.md
              ASSETS_PATH: ./
              PARALLEL_PAGES: 25
              PARALLEL_DOWNLOADS_PER_PAGE: 3
              DOWNLOAD_IMAGE_TIMEOUT: 30
              SKIP_DOWNLOADED_IMAGES: true
              DOWNLOAD_FRONTMATTER_IMAGES: true
          
          - name: Save changes
            uses: stefanzweifel/git-auto-commit-action@v4
            with:
              commit_message: Commit changes

Configuration

Parameters

Name Description Required Default
NOTION_SECRET Notion API Token secret
NOTION_DATABASE Notion Database URL or ID (example: https://notion.so/00112233445566778899aabbccddeeff)
FILTER_PROP Property on the database used to query pages Status
FILTER_VALUES Return pages with the FILTER_PROP is equal this list of values Ready,Published
CONVERT_PROP_CASE Convert the database property names before adding to the frontmatter (camel,pascal,kebab,snake,none) snake
ARTICLE_PATH Path template to where to save markdown files posts/{title}/README.md
ASSETS_PATH Path to save images, if started with . will be relative to ARTICLE_PATH, otherwise absolute ./
PARALLEL_PAGES Fetch this amount of pages in parallel 25
PARALLEL_DOWNLOADS_PER_PAGE Number of images to download in parallel for each page 3
DOWNLOAD_IMAGE_TIMEOUT Timeout in seconds for each image download 30
SKIP_DOWNLOADED_IMAGES Skip downloading images if they already exist in the path true
DOWNLOAD_FRONTMATTER_IMAGES Downloads image urls in the frontmatter true
You might also like...

Minimal, SEO-focused website starter kit powered by Notion, GitHub, and Vercel.

Minimal, SEO-focused website starter kit powered by Notion, GitHub, and Vercel.

wr8 wr8 lets you create a website in Notion with better SEO. It is a customized version of nextjs-notion-starter-kit, based on NotionX. Introduction T

Dec 22, 2022

Gofiber with NextJS Static HTML is a small Go program to showcase for bundling a static HTML export of a Next.js app

Gofiber and NextJS Static HTML Gofiber with NextJS Static HTML is a small Go program to showcase for bundling a static HTML export of a Next.js app. R

Jan 22, 2022

End-to-End sync Linear.app and GitHub

End-to-End sync Linear.app and GitHub

Initially created by Spacedrive, now maintained by Cal.com and Neat.run Linear to GitHub Sync This is a system to synchronize Linear issues to GitHub

Jan 3, 2023

this is a single-page web application. we built a book website where the user can add , remove and display books. we used modules to implement these functionalities. also, we used the Date class to display the date and time.

Awsome Books In this Project, we have built A Books websites. Built With 🔨 HTML CSS javascript Git & Github Live Demo Here you can find the live Demo

Aug 3, 2022

JavaScript Express.js app serving static vanilla JS. This sample app is used in Microsoft Docs to demonstrate how to integrate Azure Storage, Azure Cosmos DB, and Azure Active Directory.

JavaScript on Azure Learn Path - Module 2 - Deploying a basic app to Azure This Learn module requires the following Azure resources to deploy correctl

Dec 31, 2022

Live demo using Angular, github.dev, codespaces, copilot, azure static web apps, and devcontainers

Live demo using Angular, github.dev, codespaces, copilot, azure static web apps, and devcontainers

One More Change! @ NgConf 2022 This is a quick project template for demoing github.dev, Codespaces, Copilot, Azure Static Web Apps, and Visual Studio

Dec 15, 2022

Live demo using Angular, github.dev, codespaces, copilot, azure static web apps, and devcontainers

Live demo using Angular, github.dev, codespaces, copilot, azure static web apps, and devcontainers

Cloud Computing with Codespaces First seen in the presentation One More Change! @ NgConf 2022 This is a quick project template for demoing github.dev,

Sep 13, 2022

A serverless guestbook hosted on Github Pages. Powered for free by Google.

A serverless guestbook hosted on Github Pages. Powered for free by Google.

Serverless-Guestbook Features: 100% free, pure CSS form validation, profanity filter, lightweight, easy to setup & easy to use! Don't forget to check

Dec 20, 2022
Comments
  • CVE-2007-4559 Patch

    CVE-2007-4559 Patch

    Patching CVE-2007-4559

    Hi, we are security researchers from the Advanced Research Center at Trellix. We have began a campaign to patch a widespread bug named CVE-2007-4559. CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using extract() or extractall() on a tarfile object without sanitizing input, a maliciously crafted .tar file could perform a directory path traversal attack. We found at least one unsantized extractall() in your codebase and are providing a patch for you via pull request. The patch essentially checks to see if all tarfile members will be extracted safely and throws an exception otherwise. We encourage you to use this patch or your own solution to secure against CVE-2007-4559. Further technical information about the vulnerability can be found in this blog.

    If you have further questions you may contact us through this projects lead researcher Kasimir Schulz.

    opened by TrellixVulnTeam 0
Releases(v0.0.13)
  • v0.0.13(May 29, 2022)

    • build e8e5287e
    • using forked version of notion-to-md cd09ce1c
    • Support using image links from image captions
    • Update README.md 454edfef

    https://github.com/victornpb/notion-jam/compare/v0.0.12...v0.0.13

    Source code(tar.gz)
    Source code(zip)
  • v0.0.12(May 22, 2022)

    • updated packages 9a28186f
    • fixed markdown tables f5c31339
    • Update README.md 1cc020aa

    https://github.com/victornpb/notion-jam/compare/v0.0.11...v0.0.12

    Source code(tar.gz)
    Source code(zip)
  • v0.0.11(May 16, 2022)

    • parameters doc ddc0d62c
    • images 5473da72
    • handle uploaded cover 7c965e4a
    • Update README.md 95721817
    • readme 42df8e70

    https://github.com/victornpb/notion-jam/compare/v0.0.10...v0.0.11

    Source code(tar.gz)
    Source code(zip)
  • v0.0.10(May 16, 2022)

    • np didnt work again 633512c6
    • thumbnail detector c07ab715
    • fix select prop serializer 16147c12

    https://github.com/victornpb/notion-jam/compare/v0.0.9...v0.0.10

    Source code(tar.gz)
    Source code(zip)
  • v0.0.9(May 15, 2022)

    • change script 8877de9d
    • increase parallelism by default eb8952c4
    • fix empty array bug 1500264c

    https://github.com/victornpb/notion-jam/compare/v0.0.8...v0.0.9

    Source code(tar.gz)
    Source code(zip)
  • v0.0.8(May 15, 2022)

    • build a05dd625
    • convert database property case to camel,pascal,kebab,snake 386ac0e0

    https://github.com/victornpb/notion-jam/compare/v0.0.7...v0.0.8

    Source code(tar.gz)
    Source code(zip)
  • v0.0.7(May 15, 2022)

  • v0.0.6(May 15, 2022)

  • v0.0.5(May 15, 2022)

    • disabling example 00fdffb5
    • build 019741d8
    • build cdac2838
    • refactor download images frontmatter 28ddda79
    • accept external file url c0679aa8
    • download frontmatter images abac847d
    • workflow example 7de3a38e

    https://github.com/victornpb/notion-jam/compare/v0.0.4...v0.0.5

    Source code(tar.gz)
    Source code(zip)
  • v0.0.4(May 15, 2022)

    • node_modules 3a7f4b3a
    • commit node_modules bc9ac312
    • commit node_modules 409d3e6d
    • changes 5ec64d7b
    • bump deps 05b0b0e9

    https://github.com/victornpb/notion-jam/compare/v0.0.3...v0.0.4

    Source code(tar.gz)
    Source code(zip)
  • v0.0.3(May 15, 2022)

    • Merge branch 'main' of https://github.com/victornpb/notion-jam 60e3067
    • need to commit dist to use as action cd25fd1
    • Update action.yml e82b70d

    https://github.com/victornpb/notion-jam/compare/v0.0.2...v0.0.3

    Source code(tar.gz)
    Source code(zip)
  • v0.0.2(May 15, 2022)

  • v0.0.1(May 15, 2022)

    • build after version bump b82ec69
    • lint 838462b
    • renaming stuff 6a28d64
    • action 526734e
    • types 3cbad87
    • default env f781bc3
    • renamed params 2bff64d
    • cast options bb0f495
    • allow path template f142312
    • renamed variables 3252231
    • allow notion database as url or id 612231f
    • blank readme 20b89ef
    • working ccli 7f8ea9e
    • removed plugin f332fe7
    • transform markdown module 46e9677
    • parallel module 52e3d47
    • download image plugin 0b38b96
    • download and rewrite images to local imports 7e7c80c
    • add front matter to md 9f75675
    • log and skip untitled 486a78e
    • replace unsafe characters from filename bf80a99
    • env example d56067b
    • launch 629ae8d
    • temp packagejson 3f8df50

    https://github.com/victornpb/notion-jam/compare/470ae77fa78b78362f3a40da0b1fe1e8499d2e94...v0.0.1

    Full Changelog: https://github.com/victornpb/notion-jam/commits/v0.0.1

    Source code(tar.gz)
    Source code(zip)
Owner
Victor
Loves open source, web standards, always bet on Javascript. AKA Vitim
Victor
A CloudFlare Worker / script / bot to sync Notion pages publicly as GitHub Discussions.

notion-github-sync This bot syncs public Notion pages as GitHub Discussions/Issues. It's done periodically, based on the pages shared with the Notion

The Guild 20 Dec 22, 2022
🍎 A simple application which enables you to sync readings from your Withings scale to a Notion page.

weight-logger weight-logger is a simple application which enables you to sync readings from your Withings scale to a Notion page. Preview Installation

Juri Adams 2 Jan 14, 2022
A Docusaurus website deployed to GitHub Pages using GitHub Actions.

Deploy Docusaurus website to GitHub Pages using GitHub Actions This repository is an example of deploying a Docusaurus website to GitHub Pages using G

Lars Gyrup Brink Nielsen 18 Dec 26, 2022
Automatically sync your leetcode solutions to your github account - top 5 trending GitHub repository

LeetHub - Automatically sync your code to GitHub. Top 5 Trending JavaScript Repositories Available on: What is LeetHub? A chrome extension that automa

Qasim Wani 2.8k Dec 31, 2022
Global Game Jam Protopotes - Team Distanciel

SCHRODINGER'S ESCAPE - 2022 Global Game Jam project Game resume Pr. Erwin Schrödinger really did his cat's experiment ! But, the cat found the craft b

null 4 Dec 14, 2022
js13kgames 2022 game jam entry.

DEATH RIDER DEATH rides out to collect souls in the cemetery. BEWARE!!! Crosses crosses your way and bats try to bat you! Collect as many juicy souls

Csaba Csecskedi 5 Nov 4, 2022
Github Actions를 사용해 Github issue와 Notion 데이터베이스를 동기화하여 Notion에서 팀원들과 진행상황을 쉽게 공유해보세요🥳

Github Actions x notion-sdk-js x docker Demo Abstract notion-sdk-js는 Notion 데이터베이스와 Github의 issue의 를 동기화시켜주는 Node-JS application 입니다. 이를 사용하기 위해선 사용자가

SeungHyun-Hong 58 Nov 27, 2022
Download Notion pages as markdown and image files, preserving hierarchy and enabling workflow properties. Works with Docusaurus.

notion-pull notion-pull lets you use Notion as your editor for markdown-based static site generators like Docusaurus. Using Notion instead of raw mark

SIL LSDev 46 Jan 7, 2023
A Cloudflare Workers service that fetches and renders Notion pages as HTML, Markdown, or JSON.

notion-fetch A Cloudflare Workers service that fetches and renders Notion pages as HTML, Markdown, or JSON. Powered by Durable Objects and R2. Usage P

Heyang Zhou 7 Jan 6, 2023
Show floating sticky outline (table of contents) for Notion pages, powered by nbundle.

Notion Outline Show floating sticky outline (table of contents) for Notion pages, powered by nbundle. This is an nbundle-powered Notion app bootstrapp

nbundle 11 Nov 10, 2022