{"id":18952534,"url":"https://github.com/jdan/notes","last_synced_at":"2025-10-27T12:03:23.501Z","repository":{"id":44147153,"uuid":"405710726","full_name":"jdan/notes","owner":"jdan","description":"Static site generator from a Notion DB","archived":false,"fork":false,"pushed_at":"2024-05-04T22:41:06.000Z","size":905,"stargazers_count":71,"open_issues_count":2,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T05:12:16.562Z","etag":null,"topics":["notion","notion-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-12T17:39:10.000Z","updated_at":"2025-02-19T00:38:17.000Z","dependencies_parsed_at":"2024-05-04T23:26:29.845Z","dependency_job_id":"b64a1778-fb76-43e4-86f8-27d867c770e5","html_url":"https://github.com/jdan/notes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdan%2Fnotes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdan%2Fnotes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdan%2Fnotes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdan%2Fnotes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdan","download_url":"https://codeload.github.com/jdan/notes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249182568,"owners_count":21226091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notion","notion-api"],"created_at":"2024-11-08T13:33:51.993Z","updated_at":"2025-10-14T07:08:31.240Z","avatar_url":"https://github.com/jdan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## cards\n\nTurn a [Notion](https://notion.so) database into a deck of cards. @jdan uses this to power [notes.jordanscales.com](https://notes.jordanscales.com).\n\n\u003cimg width=\"1381\" alt=\"a desktop with notion open on the left and a rendered notion page using this library on the right\" src=\"https://user-images.githubusercontent.com/287268/144431224-ac4673ba-e432-47d7-94c5-c82ecbadb986.png\"\u003e\n\n### usage\n\nAs a heads up, this barely works at all. It may not handle HTML escaping correctly. Do not run on untrusted input.\n\n1. [Create a new Notion integration](https://developers.notion.com/docs/getting-started#step-1-create-an-integration)\n1. Create a new database and note it's ID from the address bar\n\n   - `https://www.notion.so/[username]/[your database ID, copy this!]?v=[ignore this]`\n   - Add a column called \"Filename\" to set the output filename for a card. This is required for an `index.html`.\n\n1. [Share that database with your new integration](https://developers.notion.com/docs/getting-started#step-2-share-a-database-with-your-integration)\n1. Run the script\n\n```sh\ngit clone https://github.com/jdan/cards.git\nnpm i\nNOTION_SECRET=[your token here] NOTION_DATABASE_ID=[your id here] TWITTER_HANDLE=yourHandle  node index.js\nnpx serve build   # build/ contains everything you need\n# localhost:5000 now shows your cards\n```\n\n### config\n\nConfiguration is provided via environment variables, a [`.env` file, or a config file in the `.env` format](https://github.com/motdotla/dotenv#what-rules-does-the-parsing-engine-follow). To specify a config file, set the `CONFIG=path/to/your/file.env` env var. Here's an example:\n\n```shell\n# recipes.env\nTWITTER_HANDLE=jitl\nOG_IMAGE=https://jake.tl/images/jake-pleasant.jpg\nBASE_URL=/recipes\nNOTION_SECRET=secret_XXXXXXX\nNOTION_DATABASE_ID=a3aa29a6b2f242d1b4cf86fb578a5eea\n```\n\nThen to use the config, run:\n\n```shell\nCONFIG=./recipes.env node index.js\n```\n\nTake a look at the top 100 lines or so of index.js to see what env vars are available.\n\n### developing\n\nIf you're working on improving this software, consider using `npm run watch`,\nwhich will re-build your site whenever any of this source code changes.\n\n```shell\nCONFIG=./recipes.env npm run watch\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdan%2Fnotes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdan%2Fnotes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdan%2Fnotes/lists"}