- Notifications
You must be signed in to change notification settings - Fork0
Update your github README with data fetched from a notion database
License
Devorein/github-readme-learn-section-notion
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
| Option | Description | Required | Default |
|---|---|---|---|
database_id | Set this to the id of your remote notion database | true | - |
token_v2 | Set this to your notiontoken_v2 (Required only for private databases) | false | - |
##What I know so far<!--START_SECTION:learn--><!--END_SECTION:learn-->
name:'Github Readme Updater'on:workflow_dispatch:schedule: -cron:'0 0 * * *'# Runs Every Dayjobs:update_learn:name:'Update learn section'runs-on:ubuntu-lateststeps: -name:'Fetching Repository Contents'uses:actions/checkout@main -name:'Learn Section Updater'uses:'devorein/github-readme-learn-section-notion@master'with:database_id:'6626c1ebc5a44db78e3f2fe285171ab7'token_v2:${{ secrets.NOTION_TOKEN_V2 }}# Required only if your database is private
TIP: You can test out usingthis template that I've created, orthis repo.
NOTE: Your database must maintain the following structure/schema
| Name | Type | Required | Default | Description | Value | Example |
|---|---|---|---|---|---|---|
| Name | title | true | - | The name of the item you've learnt | Must be a valid icon fromhttps://simple-icons.github.io/simple-icons-website | React, Typescript |
| Category | select | true | - | The category under which the item falls | Any string | Language, Library |
| Color | text | false | black | Background Color of the badge | Any keyword color or hex value without alpha and # | red,00ff00 |
| Base64 | text | false | "" | Custom base64 of the svg logo | Any base64 encoded svg | data:image/svg%2bxml;base64,PHN2ZyB4b... |
with:database_id:'6626c1ebc5a44db78e3f2fe285171ab7'
Follow the rest of the steps only if your database is not public, if its public you don't need to set the token_v2
- Navigate to the database in your notion account
- Click on Share at the top right corner
- Click on Share to Web button.
NOTE: By no means should you share or expose your notiontoken_v2. If you feel like you've done so accidentally, immediately log out from that account in all of your devices.
Follow the steps below to obtain yourtoken_v2:
- Open up the devtools of your preferred browser.
- Go to the Application > Cookies section.
- There you'll find a
token_v2cookie.
NOTE: Its highly recommended to store yourtoken_v2 as a github secret rather than pasting it in your workflow file. And if you want to embed it in your workflow file make sure unauthorized sources can't access/view it.
- navigate to the url
https://github.com/<USERNAME>/<REPO-NAME>/settings/secrets/actions - Click on
New repository secret - You can name your secret as anything you want
- Paste the
token_v2value in theValuetextarea - Use the secret in your workflow file
with:token_v2:${{ secrets.NOTION_TOKEN_V2 }}# The secret was named NOTION_TOKEN_V2
If you follow all the steps properly your readme should look something like this.
Feel free to submit a pull request or open a new issue, contributions are more than welcome !!!
About
Update your github README with data fetched from a notion database
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.



