{"id":28259531,"url":"https://github.com/ambersun1234/autogen-og-image","last_synced_at":"2026-04-28T18:02:49.115Z","repository":{"id":224365977,"uuid":"760048166","full_name":"ambersun1234/autogen-og-image","owner":"ambersun1234","description":"Automatically generate open graph image based on the content you have","archived":false,"fork":false,"pushed_at":"2025-03-29T12:58:40.000Z","size":3971,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T03:12:30.477Z","etag":null,"topics":["continuous-integration","github-actions","javascript","minimal-mistakes-theme","open-graph-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ambersun1234.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":"2024-02-19T17:27:04.000Z","updated_at":"2025-03-29T12:58:42.000Z","dependencies_parsed_at":"2024-05-07T19:31:50.146Z","dependency_job_id":null,"html_url":"https://github.com/ambersun1234/autogen-og-image","commit_stats":null,"previous_names":["ambersun1234/autogen-og-image"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ambersun1234/autogen-og-image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambersun1234%2Fautogen-og-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambersun1234%2Fautogen-og-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambersun1234%2Fautogen-og-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambersun1234%2Fautogen-og-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ambersun1234","download_url":"https://codeload.github.com/ambersun1234/autogen-og-image/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambersun1234%2Fautogen-og-image/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260022352,"owners_count":22947140,"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":["continuous-integration","github-actions","javascript","minimal-mistakes-theme","open-graph-generator"],"created_at":"2025-05-20T03:12:16.812Z","updated_at":"2026-04-28T18:02:49.024Z","avatar_url":"https://github.com/ambersun1234.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# autogen-og-image\nautogen-og-image is a highly customizable [Open Graph](https://ogp.me/) image generator for your blog, specifically for [mmistakes/minimal-mistakes](https://github.com/mmistakes/minimal-mistakes)\n\n\n## Description\n![](./example.png)\n\nThis tool will generate the [Open Graph](https://ogp.me/) image based on the `frontmatter` section in your markdown article\n\nWhat is a frontmatter?\n```\n---\ntitle: Random Article Title\ndescription: Random article description\n---\n```\n\n\u003chr\u003e\n\nFor this tool, the `frontmatter` will take the following attributes\n\n|Required|`title`|`description`|`date`|\n|:--:|:--:|:--:|:--:|\n|Optional|`author`|`avatar`||\n\n## GitHub Action\nCreate an action file `.github/workflows/ci.yaml` and fill in following content\n```yaml\nname: Build and Deploy to Github Pages\n\non:\n  push:\n    branches:\n      - master # Here source code branch is `master`, it could be other branch\n\njobs:\n  autogen_og_image:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: mujo-code/puppeteer-headful@16.6.0\n      # Install the corresponding font on system if needed\n      - name: Install Chinese Font\n        run: |\n          sudo apt update\n          sudo apt install -y fonts-noto\n      - uses: ambersun1234/autogen-og-image@v1.0.0\n        # Change author and avatar to your own(optionally)\n        with:\n          input_dir: ${{ github.workspace }}/_posts\n          output_dir: ${{ github.workspace }}/assets/img/og\n          author: \"Shawn Hsu\"\n          avatar: \"https://avatars.githubusercontent.com/u/13270428?v=4\"\n      - name: Commit og image and Push\n        # Change the user.name and user.email to your own\n        run: |\n          git config --local user.name 'Shawn Hsu'\n          git config --local user.email 'ambersun1234@users.noreply.github.com'\n          if [ -z \"$(git status --porcelain)\" ]; then\n            echo \"Working directory clean. Nothing to commit.\"\n            exit 0\n          fi\n          git add .\n          git commit -m \"Update og image\"\n          git push\n```\n\nFor more customizable options(e.g. font size, font color), please refer to [action.yml](./action.yml)\n\n## Environment Variable\nThis tool also support environment variable as input\\\nYou can find various config in [.env.example](./.env.example)\n\nJust copy to a new file `.env` and make some changes, you're good to go\n```shell\n$ cp .env.example .env\n```\n\n## Run\n```shell\n$ npm run build\n$ node ./dist/main.js\n```\n\n## References\n+ [A framework for building Open Graph images](https://github.blog/2021-06-22-framework-building-open-graph-images/)\n+ [agneym/generate-og-image](https://github.com/agneym/generate-og-image)\n\n## License\nThis project is licensed under GNU General Public License v3.0 License - see the [LICENSE](./LICENSE) file for detail\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fambersun1234%2Fautogen-og-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fambersun1234%2Fautogen-og-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fambersun1234%2Fautogen-og-image/lists"}