Skip to content
This repository was archived by the owner on Aug 24, 2023. It is now read-only.

nexensys/github-readme-blog-post-action

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

Github Readme Blog Post Action

A (somewhat) simple github action that generates a set of cards for recent blog posts.

Here's an example of how it looks given the URLs for DEV Community, JavaScript Weekly, and Echo JS:

DEV Community

The most recent home feed on DEV Community.

Read more

Last updated: Wednesday, August 23, 2023 at 6:36:28 PM

Showing 5 of 12 posts.

Introduction to the Tower library Setting up Bcrypt in your Rails project Interesting Malware Analysis Writeups Agile or not Agile How to mirror GitLab repo to GitHub

JavaScript Weekly

A newsletter of JavaScript articles, news and cool projects

Read more

Last updated: Wednesday, August 23, 2023 at 6:36:32 PM

Showing 4 of 4 posts.

We're taking a few weeks off, but.. Svelte 5 is going to be radical Taking JavaScript into Python Name mangling

Echo JS

Description pending

Read more

Last updated: Wednesday, August 23, 2023 at 6:36:38 PM

Showing 5 of 30 posts.

Error Handling in React: Techniques and Examples GitHub - oslabs-beta/Chronos: 📊 📊 📊 Monitors the health and web traffic of servers, microservices, Kubernetes/Kafka clusters, containers, and AWS services with real-time data monitoring and receive automated notifications over Slack or email. GitHub - codeacme17/examor: For students, scholars, interviewees and lifelong learners React JS Clean Code Guide API with NestJS #121. Many-to-one relationships with PostgreSQL and Kysely

Quick Start

This action runs out-of-the-box, with only one provided input.

Create a .yml file with the desired filename, and paste the following:

on:
  push:
  schedule:
    - cron: "0 */6 * * *"
jobs:
  blog:
    runs-on: ubuntu-latest
    name: Fetch and Generate Blog Posts
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Generate
        uses: ErrorGamer2000/github-readme-blog-post-action@v1
        with:
          feed_urls: FEEDS
      - name: Commit changed files
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: Save Generated Blog Posts
          skip_checkout: true

Replace the FEEDS with a comma-seperated list of RSS feed URLs, add

<!-- blog-post-list:start -->
<!-- blog-post-list:end -->

in the README where you want the list, and BAM! You have yourself an automatic action that runs every 6 hours and when you change any of the files in your readme!

Inputs

Option Name Type Default Value Description
feed_urls string "" A (comma-seperated) list of RSS feed URLs to load posts from. This is the only required input.
max_posts_per_url number 5 The maximum number of posts to show for each feed. If the number of posts is less than this, then all of the posts will be shown.
position_indicator string blog-post-list The text of the comments that the action uses to inject the images into the README file. Everything between the two comments in the form <!-- position_indicator:start --> and <!-- position_indicator:end --> is replaced. Changing this can allow you to use multiple configurations for different feeds by using different markers for each.
show_feed_data boolean true Whether or not to show the generated markdown describing the feed, which includes the title of the feed, the description of the feed, the Read More link, the last updated date, and the post count. Each of these can also be individually toggled with the following options. This will override any of the specific options, so it is better to disable/enable them specifically if you want to remove some elements.
show_feed_title boolean true Whether or not to show the header containing the title of the feed. This will be formatted as an h2 header. An option to customize this header will be in a future update.
show_feed_description boolean true Whether or not to show the title of the feed that is provided by the RSS feed.
show_read_more boolean true Whether or not to show the Read More link under the feed description.
show_last_updated_date boolean true Whether or not to show the date and time of the last update of the list.
show_post_count boolean true Whether or not to show the number of posts shown and the total number of posts provided by the RSS feed.
show_post_date boolean true Whether or not to show the date of each post on the card.
locale string "en" The locale of the project. This is used purely for formatting the dates of the cards and last update.
time_zone string "UTC" A valid time zone to use for the last updated date.
output_dir string "blog-post-list-output" The directory to store the post card images in. Must be in the root directory (i.e. no path separators / or \) and cannot include the characters /\?%*:|"<>.

Usage Notes

  • Make sure that you use an action that will commit changed files to the repository after this action has run, so that the files actually get changed.
  • I am a solo dev, and will get back to you as soon as I can, so expect to wait several weeks depending on how many other issues there are.
  • Enjoy and share! 🤗

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published