{"id":21961755,"url":"https://github.com/devorein/github-readme-learn-section-notion","last_synced_at":"2025-04-23T20:21:10.329Z","repository":{"id":65158376,"uuid":"363654040","full_name":"Devorein/github-readme-learn-section-notion","owner":"Devorein","description":"Update your github README with data fetched from a notion database","archived":false,"fork":false,"pushed_at":"2022-01-22T07:17:30.000Z","size":832,"stargazers_count":33,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T17:58:13.624Z","etag":null,"topics":["github-actions","github-readme","notion","notion-database"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/github-readme-learn-section-notion","language":"TypeScript","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/Devorein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-02T13:10:43.000Z","updated_at":"2024-11-26T13:02:31.000Z","dependencies_parsed_at":"2023-01-05T05:02:47.313Z","dependency_job_id":null,"html_url":"https://github.com/Devorein/github-readme-learn-section-notion","commit_stats":{"total_commits":73,"total_committers":1,"mean_commits":73.0,"dds":0.0,"last_synced_commit":"f523364bf0b18514fedc2d19894d731ac131554a"},"previous_names":["devorein/github-readme-learn-section-notion","reinforz/github-readme-learn-section-notion"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fgithub-readme-learn-section-notion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fgithub-readme-learn-section-notion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fgithub-readme-learn-section-notion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fgithub-readme-learn-section-notion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devorein","download_url":"https://codeload.github.com/Devorein/github-readme-learn-section-notion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250506536,"owners_count":21441793,"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":["github-actions","github-readme","notion","notion-database"],"created_at":"2024-11-29T10:17:51.007Z","updated_at":"2025-04-23T20:21:10.307Z","avatar_url":"https://github.com/Devorein.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\u003ca href=\"/\" rel=\"noopener noreferrer\"\u003e\u003cimg width=\"500px\" src=\"https://raw.githubusercontent.com/Devorein/github-readme-learn-section-notion/master/media/Logo.png\" alt=\"Logo\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eGithub Readme Learn Section - \u003ci\u003eGithub Action\u003c/i\u003e\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\u003cb\u003eAutomatically update your github README with data fetched from a notion database\u003c/b\u003e\u003c/div\u003e\n\u003c/br\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://app.codecov.io/gh/Devorein/github-readme-learn-section-notion/branch/master\"\u003e\u003cimg src=\"https://codecov.io/gh/Devorein/github-readme-learn-section-notion/branch/master/graph/badge.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Devorein/github-readme-learn-section-notion/actions/workflows/build.yml\"\u003e\u003cimg src=\"https://github.com/devorein/github-readme-learn-section-notion/actions/workflows/build.yml/badge.svg\"/\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/github/repo-size/devorein/github-readme-learn-section-notion?style=flat-square\u0026color=orange\"/\u003e\n  \u003cimg src=\"https://img.shields.io/github/contributors/devorein/github-readme-learn-section-notion?label=contributors\u0026color=red\"/\u003e\n\u003c/p\u003e\n\n## Configuration\n\n|    Option     |                               Description                                | Required | Default |\n| :-----------: | :----------------------------------------------------------------------: | :------: | :-----: |\n| `database_id` |            Set this to the id of your remote notion database             |   true   |    -    |\n|  `token_v2`   | Set this to your notion `token_v2` (Required only for private databases) |  false   |    -    |\n\n## Usage\n\n### In Repository File\n\n#### 1. Add the following content to your `README.md`\n\n```markdown\n## What I know so far\n\n\u003c!--START_SECTION:learn--\u003e\n\u003c!--END_SECTION:learn--\u003e\n```\n\n#### 2. Configure the workflow\n\n```yaml\nname: 'Github Readme Updater'\non:\n  workflow_dispatch:\n  schedule:\n    - cron: '0 0 * * *' # Runs Every Day\njobs:\n  update_learn:\n    name: 'Update learn section'\n    runs-on: ubuntu-latest\n    steps:\n      - name: 'Fetching Repository Contents'\n        uses: actions/checkout@main\n      - name: 'Learn Section Updater'\n        uses: 'devorein/github-readme-learn-section-notion@master'\n        with:\n          database_id: '6626c1ebc5a44db78e3f2fe285171ab7'\n          token_v2: ${{ secrets.NOTION_TOKEN_V2 }} # Required only if your database is private\n```\n\n**TIP**: You can test out using [this template](https://www.notion.so/devorein/6c46c1ebc5a44db78e3f5fe285071ab6?v=0bc36e7c59e54f34b0838956e35b4490) that I've created, or [this repo](https://github.com/Devorein/test-github-action).\n\n### In your notion account\n\n#### 1. Create a full page database\n\n![Notion Full Page Database](./media/notion_full_page_db.png)\n\n**NOTE**: Your database must maintain the following structure/schema\n\n|   Name   |  Type  | Required | Default |               Description               |                                      Value                                      |                 Example                  |\n| :------: | :----: | :------: | :-----: | :-------------------------------------: | :-----------------------------------------------------------------------------: | :--------------------------------------: |\n|   Name   | title  |   true   |    -    |   The name of the item you've learnt    | Must be a valid icon from `https://simple-icons.github.io/simple-icons-website` |            React, Typescript             |\n| Category | select |   true   |    -    | The category under which the item falls |                                   Any string                                    |            Language, Library             |\n|  Color   |  text  |  false   |  black  |      Background Color of the badge      |               Any keyword color or hex value without alpha and #                |                red,00ff00                |\n|  Base64  |  text  |  false   |   \"\"    |      Custom base64 of the svg logo      |                             Any base64 encoded svg                              | data:image/svg%2bxml;base64,PHN2ZyB4b... |\n\n#### 2. Get the id of the database\n\n![Notion Full Page Database Id](./media/notion_full_page_db_id.png)\n\n#### 3. Add it in workflow file\n\n```yaml\nwith:\n  database_id: '6626c1ebc5a44db78e3f2fe285171ab7'\n```\n\nFollow the rest of the steps only if your database is not public, if its public you don't need to set the token_v2\n\n#### To make your database public\n\n1. Navigate to the database in your notion account\n2. Click on Share at the top right corner\n3. Click on Share to Web button.\n\n#### 1. Get your notion `token_v2`\n\n**NOTE**: By no means should you share or expose your notion `token_v2`. If you feel like you've done so accidentally, immediately log out from that account in all of your devices.\n\nFollow the steps below to obtain your `token_v2`:\n\n1. Open up the devtools of your preferred browser.\n2. Go to the Application \u003e Cookies section.\n3. There you'll find a `token_v2` cookie.\n\n**NOTE**: Its highly recommended to store your `token_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.\n\n#### 2. Create a github secret to store `token_v2`\n\n1. navigate to the url `https://github.com/\u003cUSERNAME\u003e/\u003cREPO-NAME\u003e/settings/secrets/actions`\n2. Click on `New repository secret`\n3. You can name your secret as anything you want\n4. Paste the `token_v2` value in the `Value` textarea\n5. Use the secret in your workflow file\n\n```yaml\nwith:\n  token_v2: ${{ secrets.NOTION_TOKEN_V2 }} # The secret was named NOTION_TOKEN_V2\n```\n\n### Outcome\n\nIf you follow all the steps properly your readme should look something like this.\n\n![Github Readme Learn Section](./media/github_readme_learn_section.png)\n\nFeel free to submit a pull request or open a new issue, contributions are more than welcome !!!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevorein%2Fgithub-readme-learn-section-notion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevorein%2Fgithub-readme-learn-section-notion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevorein%2Fgithub-readme-learn-section-notion/lists"}