This is my fork of cards. Jordan's is better. Go buy some jordancoin.
Some notable changes:
- config.json file
- use nunjucks for HTML templating
- use the git-rev-sync dependency instead of calling childprocess
- creates a pages.json file in the build directory with source content artifacts (just in case Notion disappears)
- emoji alt text
- rough callout support
- link_to_page support
- tweet embeds (with or without twitter styling/tracking) (caches to build/tweets.json)
- footer backlink de-duplication (in case you link to the same page twice)
- creates logical redirects (eg canonical_id_with_dashes.html always, short_id.html when a different pagename is used, etc.)
Turn a Notion database into a deck of cards. I use this to power cards.jordanscales.com.
As a heads up, this barely works at all. It works even less with Will's changes.
- Create a new Notion integration
- Create a new database and note it's ID from the address bar
https://www.notion.so/[username]/[your database ID, copy this!]?v=[ignore this]
- Share that database with your new integration
- Run the script
git clone https://github.com/jdan/cards.git
npm i
mv config.example.json config.json
# edit config.json with your notion secret + DB id
npx serve build # build/ contains everything you need
# localhost:5000 now shows your cards
- create a Notion property called "Filename"
- set that property to index.html