|
7 | 7 |
|
8 | 8 | ## Overview |
9 | 9 |
|
10 | | -GitHub Action that generates an always-fresh preview banner for your project and keeps it at the top of your |
11 | | -`README.md`. The action detects your package manager, builds a light/dark banner, replaces any previous preview block, |
12 | | -commits the change in a dedicated branch, and opens a pull request with optional assignees and labels. |
| 10 | +[banners.beyondco.de](https://banners.beyondco.de) is a service that generates beautiful social preview banners for |
| 11 | +GitHub projects. The image at the top of this README is an example of such a banner. |
| 12 | + |
| 13 | +The problem is that each banner URL must be manually crafted — you have to fill in the project title, description, |
| 14 | +package manager install command, icon, and other parameters by hand, then keep the URL up to date whenever any of |
| 15 | +those details change. |
| 16 | + |
| 17 | +**GitHub Preview Updater** is a GitHub Action that automates all of that. It reads your repository metadata |
| 18 | +(name, description, package manager), builds the correct banner URL automatically, and keeps the |
| 19 | +`<picture>` block in your `README.md` up to date — creating a pull request whenever the banner changes. |
| 20 | + |
| 21 | +### What gets inserted into your README |
| 22 | + |
| 23 | +After the first heading (`# My Project`) the action inserts (or replaces) the following block: |
| 24 | + |
| 25 | +```html |
| 26 | +<picture> |
| 27 | + <source media="(prefers-color-scheme: dark)" srcset="https://banners.beyondco.de/My%20Project.png?...&theme=dark"> |
| 28 | + <img src="https://banners.beyondco.de/My%20Project.png?...&theme=light" alt="My Project"> |
| 29 | +</picture> |
| 30 | +``` |
| 31 | + |
| 32 | +Both a light-theme and a dark-theme variant of the banner are generated automatically. |
| 33 | + |
| 34 | +### How it works |
| 35 | + |
| 36 | +1. The action reads your `composer.json` / `package.json` to detect the package manager, package name, and description. |
| 37 | +2. It builds the banner URL for [banners.beyondco.de](https://banners.beyondco.de) using the collected data. |
| 38 | +3. It replaces the `<picture>` block in your `README.md` with the freshly generated URLs. |
| 39 | +4. If the file changed, it commits the update to a new branch and opens a pull request. |
13 | 40 |
|
14 | 41 | ## Quick start |
15 | 42 |
|
|
0 commit comments