Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update your github README with data fetched from a notion database

License

NotificationsYou must be signed in to change notification settings

Devorein/github-readme-learn-section-notion

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Logo

Github Readme Learn Section -Github Action

Automatically update your github README with data fetched from a notion database

Configuration

OptionDescriptionRequiredDefault
database_idSet this to the id of your remote notion databasetrue-
token_v2Set this to your notiontoken_v2 (Required only for private databases)false-

Usage

In Repository File

1. Add the following content to yourREADME.md

##What I know so far<!--START_SECTION:learn--><!--END_SECTION:learn-->

2. Configure the workflow

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.

In your notion account

1. Create a full page database

Notion Full Page Database

NOTE: Your database must maintain the following structure/schema

NameTypeRequiredDefaultDescriptionValueExample
Nametitletrue-The name of the item you've learntMust be a valid icon fromhttps://simple-icons.github.io/simple-icons-websiteReact, Typescript
Categoryselecttrue-The category under which the item fallsAny stringLanguage, Library
ColortextfalseblackBackground Color of the badgeAny keyword color or hex value without alpha and #red,00ff00
Base64textfalse""Custom base64 of the svg logoAny base64 encoded svgdata:image/svg%2bxml;base64,PHN2ZyB4b...

2. Get the id of the database

Notion Full Page Database Id

3. Add it in workflow file

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

To make your database public

  1. Navigate to the database in your notion account
  2. Click on Share at the top right corner
  3. Click on Share to Web button.

1. Get your notiontoken_v2

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:

  1. Open up the devtools of your preferred browser.
  2. Go to the Application > Cookies section.
  3. There you'll find atoken_v2 cookie.

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.

2. Create a github secret to storetoken_v2

  1. navigate to the urlhttps://github.com/<USERNAME>/<REPO-NAME>/settings/secrets/actions
  2. Click onNew repository secret
  3. You can name your secret as anything you want
  4. Paste thetoken_v2 value in theValue textarea
  5. Use the secret in your workflow file
with:token_v2:${{ secrets.NOTION_TOKEN_V2 }}# The secret was named NOTION_TOKEN_V2

Outcome

If you follow all the steps properly your readme should look something like this.

Github Readme Learn Section

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

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp