Write articles for your static gen blog in Notion.
Notoma is available via Pip or Homebrew:
# Installing with pip, use this if you plan using Notoma as a python library.
pip install notoma
Installing with Homebrew on Mac OS.
brew install nategadzhi/notoma/notoma
Notoma provides commands to:
Basic usage example: this command will convert only published posts from a Notion blog database to the ./posts/ directory
.
notoma convert --dest ./posts/
This example assumes that you have a .env
config file with authentication and blog url parameters in it.
Notoma uses an internal Notion API, and that, unfortunately, requires you to provide an authentication token token_v2
that you can find in your notion.so cookes.
You can provide token_v2
option to every command line call, or store it in your environment, or .env
config file.
Notoma has very few expectations about how your Notion is structured. Here's a public example database.
Notoma requires that your Notion blog database has the following properties:
Notoma tries to parse other properties and add them as front matter into the resulting Markdown articles:
categories
front matter key, so it's expected to be a multiple choice propery.