Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

notion-md-fetcher

Script to fetch pages from Notion database and convert it to Markdown using official Notion API.

How to use

script.py --content CONTENT_FOLDER --static STATIC_FOLDER --url STATIC_URL --db NOTION_DB_ID --key NOTION_API_KEY [--hugo]

CONTENT_FOLDER path where the pages will be saved

STATIC_FOLDER path where the static files will be saved

STATIC_URL URL from which the static files will be accessible from the Markdown file

NOTION_DB_ID Notion database id where the pages to fetch are located

NOTION_API_KEY Notion API key

To get NOTION_DB_ID and NOTION_API_KEY you can refer to steps 1 to 3 of this article.

Use it for Hugo

This script can be used for Hugo, for that use this database template and add --hugo flag.

It will add the front matter to each page and fetch only published ones.

Features

  • heading
  • divider
  • image
  • code block
  • inline annotation (link, code, bold, italic, strikethrough, underline, highlight)
  • bulleted list
  • numbered list
  • to do list
  • quote
  • block children

For Hugo

  • convert page properties to front matter
  • only fetch published pages

About

Fetch pages from Notion database and convert it to Markdown

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages