{"id":19205473,"url":"https://github.com/zwacky/twitter-header-blog-posts-action","last_synced_at":"2025-08-25T12:28:01.828Z","repository":{"id":144883529,"uuid":"432244057","full_name":"zwacky/twitter-header-blog-posts-action","owner":"zwacky","description":"Automatically update your Twitter header with your latest blog posts—among arbitrary text and images.","archived":false,"fork":false,"pushed_at":"2021-12-24T13:59:12.000Z","size":667,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-23T12:34:08.603Z","etag":null,"topics":["githubactions","twitter"],"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/zwacky.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,"zenodo":null}},"created_at":"2021-11-26T16:44:26.000Z","updated_at":"2023-08-22T11:40:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5d99296-c85f-49e2-bc7f-2b6d3c7ce5f0","html_url":"https://github.com/zwacky/twitter-header-blog-posts-action","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zwacky/twitter-header-blog-posts-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwacky%2Ftwitter-header-blog-posts-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwacky%2Ftwitter-header-blog-posts-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwacky%2Ftwitter-header-blog-posts-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwacky%2Ftwitter-header-blog-posts-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zwacky","download_url":"https://codeload.github.com/zwacky/twitter-header-blog-posts-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwacky%2Ftwitter-header-blog-posts-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272064112,"owners_count":24866873,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["githubactions","twitter"],"created_at":"2024-11-09T13:12:58.882Z","updated_at":"2025-08-25T12:28:01.819Z","avatar_url":"https://github.com/zwacky.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter header blog posts action\n\nAutomatically update your Twitter header with your latest blog posts—among arbitrary text and images.\n\n![twitter-header-uploader-v1](https://user-images.githubusercontent.com/1093032/143890106-3bd64985-c962-49f1-8dbf-014a53971fae.png)\n\n# How to use\n\n1. Go to a GitHub repository of yours (e.g. github.com/{username}/{username})\n2. Create a folder named `.github` and create a `workflows` folder inside it if it doesn't exist\n3. Create a new file named `twitter-header-blog-posts-workflow.yml` with the following content:\n\n```yml\nname: Update Twitter header with latest blog posts\non:\n  # Run workflow automatically\n  schedule:\n    # This will make it run once a day (18:00)\n    - cron: \"0 18 * * *\"\n  # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly\n  workflow_dispatch:\njobs:\n  udpate-twitter-blog-posts:\n    name: Update Twitter header with latest blog posts\n    runs-on: ubuntu-latest\n    steps:\n      - uses: zwacky/twitter-header-blog-posts-action@main\n        with:\n          # replace this with your blog RSS url (see further below for supported blog platforms)\n          BLOG_RSS: \"https://dev.to/feed/zwacky\"\n          DRAW_TEXTS: '[[\"h1\", \"Hey, I''m Simon\", 125, 100], [\"h1\", \"My latest blog posts\", 835, 70], [\"h1\", \"Follow   and say hi!\", 545, 390], [\"p\", \"I tweet about webperf, javascript,\", 125, 177], [\"p\", \"my learnings and books.\", 125, 212]]'\n        env:\n          # ⚠️ don't check in your API credentials ⚠️\n          # see further below how to setup GitHub secrets so nobody except you can see them\n          TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}\n          TWITTER_API_SECRET: ${{ secrets.TWITTER_API_SECRET }}\n          TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}\n          TWITTER_ACCESS_SECRET: ${{ secrets.TWITTER_ACCESS_SECRET }}\n```\n\n4. Get your Twitter credentials by creating a Twitter App (follow [these steps](#setup-twitter-app))\n5. Save your Twitter credentials as secrets in your repository from bullet point 1 (follow [these steps](#setup-twitter-credentials-as-repo-secrets))\n6. Replace the above `BLOG_RSS` with your blog RSS url (check Inputs.BLOG_RSS for supported blog platforms)\n7. Replace the above `DRAW_TEXTS` with your name and description. Mind escaping single quotes `'` with `''`.\n8. Commit and wait for it to run automatically or you can also trigger it manually to see the result instantly. To trigger the workflow manually check out [this blog post](https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/) by GitHub.\n\n# Inputs\n\nHere are all the inputs you can change in your `twitter-header-blog-posts-workflow.yml` file under `steps[*].with`:\n\n| Option | Default Value | Description | Required |\n|--------|--------|--------|--------|\n| BLOG_RSS | \"\" | Your blog RSS url.\u003cbr\u003e\u003cbr\u003eSupported blog platforms with example:\u003cbr\u003e\u003cbr\u003e\u003cul\u003e\u003cli\u003eDev.to: https://dev.to/feed/zwacky\u003c/li\u003e\u003cli\u003eMedium: https://medium.com/feed/@zwacky\u003c/li\u003e\u003cli\u003eHashnode: https://zwacky.hashnode.dev/rss.xml\u003c/li\u003e\u003c/ul\u003e | Yes |\n| MAX_TEXT_LENGTH | \"40\" | Max length of blog post title before it gets cut off with an ellipsis (...) | No |\n| BLOG_POSTS_AMOUNT | \"3\" | How many latest blog post titles are drawn | No |\n| DRAW_BLOGTITLES_X | \"835\" | X coordinate where blog post titles are drawn | No |\n| DRAW_BLOGTITLES_Y | \"150\" | Y coordinate where blog post titles are drawn | No |\n| DRAW_BLOGTITLES_LINEHEIGHT | \"55\" | Height in pixel for each blog post title | No |\n| DRAW_BACKGROUNDCOLOR | \"#00252d\" | Background color of banner | No |\n| DRAW_TEXTS | \"[\u003cbr\u003e\u0026nbsp;\u0026nbsp;[\"h1\", \"Hey, I'm Simon\", 125, 100],\u003cbr\u003e\u0026nbsp;\u0026nbsp;[\"h1\", \"My latest blog posts\", 835, 70],\u003cbr\u003e\u0026nbsp;\u0026nbsp;[\"h1\", \"Follow   and say hi!\", 545, 390],\u003cbr\u003e\u0026nbsp;\u0026nbsp;[\"p\", \"I tweet about webperf, javascript,\", 125, 177],\u003cbr\u003e\u0026nbsp;\u0026nbsp;[\"p\", \"my learnings and books.\", 125, 212]\u003cbr\u003e]\" | Text elements that are drawn onto the banner. Needs to be a valid JSON.\u003cbr\u003e\u003cbr\u003eFormat: `[ [ font_type, text, x, y ], ... ]`\u003cbr\u003e\u003cbr\u003e\u003cul\u003e\u003cli\u003e`font_type`: \"h1\" for heading, \"p\" for paragraph\u003c/li\u003e\u003cli\u003e`text`: Any text\u003c/li\u003e\u003cli\u003e`x`: X coordinate on banner\u003c/li\u003e\u003cli\u003e`y`: Y coordinate on banner\u003c/li\u003e\u003c/ul\u003e | No |\n| DRAW_IMAGES | \"[\u003cbr\u003e\u0026nbsp;\u0026nbsp;[\"./assets/images/underscore.png\", 310, 145],\u003cbr\u003e\u0026nbsp;\u0026nbsp;[\"./assets/images/bullets.png\", 725, 132],\u003cbr\u003e\u0026nbsp;\u0026nbsp;[\"./assets/images/curl.png\", 505, 350]\u003cbr\u003e]\" | Image elements that are drawn onto the banner. Needs to be a valid JSON.\u003cbr\u003e\u003cbr\u003eFormat: `[ [ source, x, y ], ... ]`\u003cbr\u003e\u003cbr\u003e\u003cul\u003e\u003cli\u003e`source`: Source of any image. Sources starting with \"./\" point so [GitHub Action repo's /dist folder](https://github.com/zwacky/twitter-header-blog-posts-action/tree/main/dist)\u003c/li\u003e\u003cli\u003e`x`: Y coordinate on banner\u003c/li\u003e\u003cli\u003e`y`: Y coordinate on banner\u003c/li\u003e\u003c/ul\u003e | No |\n\n# Twitter API credentials\n\n## Setup Twitter App\n\nIn order to update your own Twitter header, we need to create a Twitter app. We need the following credentials:\n- API_KEY\n- API_SECRET\n- ACCESS_TOKEN\n- ACCESS_SECRET\n\nFollow these steps to obtain the above credentials:\n\n1. Go to developer.twitter.com \u003e [Create new Twitter App](https://developer.twitter.com/en/portal/apps/new)\n2. Copy **API Key and Secret**\n3. Go to the newly created Twitter App's **Settings**\n4. change App permission from `Read` to `Read and write`\n5. Go to **Keys and tokens** \u003e **Authenticated Tokens** \u003e **Generate Access Token and Secret**\n\n## Setup Twitter credentials as repo secrets\n\n1. Go to a GitHub repository of yours (e.g. github.com/{username}/{username})\n2. Go to **Settings** \u003e **Secrets**\n3. **New repository secret** for all 4 Twitter app credentials\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzwacky%2Ftwitter-header-blog-posts-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzwacky%2Ftwitter-header-blog-posts-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzwacky%2Ftwitter-header-blog-posts-action/lists"}