Generate a list of all hugo-fixit theme components.
action-component-list | FixIt
This is a GitHub Action to generate a list of all hugo-fixit theme components.
How to use
You can reference different stable versions of this action. For more information, see Versioning in the GitHub Actions toolkit.
To include the action in a workflow in another repository, you can use the
uses syntax with the @ symbol to reference a specific branch, tag, or commit
hash.
Star this repository 😉
Go to your repository
Add the following section to your README.md file, you can give whatever title you want. Just make sure that you use
<!-- HUGO_FIXIT_COMPONENTS:START --><!-- HUGO_FIXIT_COMPONENTS:END -->in your readme. The workflow will replace this comment with the actual blog post list:1 2 3 4# Hugo FixIt Components <!-- HUGO_FIXIT_COMPONENTS:START --> <!-- HUGO_FIXIT_COMPONENTS:END -->Create a folder named
.githuband create aworkflowsfolder inside it, if it doesn’t exist.Create a new file named
fixit-component-list.ymlwith the following contents inside the workflows folder:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37name: Generate hugo-fixit component list on: schedule: # Run workflow automatically - cron: '0 0 * * *' # Runs every day at 00:00 UTC workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly permissions: contents: write # To write the generated contents to the readme jobs: generate-component-list: name: Update this repo's README with the list of hugo-fixit theme components runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v6 - name: Generate hugo-fixit component list id: test-action uses: hugo-fixit/action-component-list@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: comment_tag_name: HUGO_FIXIT_COMPONENTS template: '- [{$repo.name}]({$repo.html_url}): {$repo.description}' - name: Print Output id: output run: echo "${{ steps.test-action.outputs.repos }}" - name: Create Pull Request uses: peter-evans/create-pull-request@v8 with: title: Update hugo-fixit component list commit-message: 'docs(readme): update hugo-fixit component list' body: This PR updates the hugo-fixit component list in the README. base: main branch: update-component-list labels: documentation # reviewers: LruihaoGo to repository settings, Click on Actions > General. Update the “Workflow permissions” to “Read and write permissions”. Click on save.
Wait for it to run automatically, or you can also trigger it manually to see the result instantly.
Inputs
| Name | Description | Default |
|---|---|---|
comment_tag_name | The tag name to look for in the readme file | HUGO_FIXIT_COMPONENTS |
readme_path | Comma separated paths of the readme files you want to update | ./README.md |
exclude_repos | Comma separated list of repos to exclude from the list | |
template | Template to use while creating the list of hugo-fixit theme components. It can contain {$repo.name} etc. as variables | - [{$repo.name}]({$repo.html_url}): {$repo.description} |
Outputs
| Name | Description |
|---|---|
repos | The list of hugo-fixit theme components repos that were updated. |
Example
Insert the following code block in your Markdown file to display the list of hugo-fixit components.
| |
The list of hugo-fixit components will be displayed here.
- fixit-bundle
🌲 Bundles the FixIt core theme and all hugo-fixit components into a single component. - cmpt-flyfish
🐟 A canvas implemented animation effect of small fish swimming. - cmpt-mdevtools
Mobile devtools component powered by vConsole and eruda. - cmpt-santa-hat
A Christmas Easter Egg by JavaScript. - cmpt-translate
🌐 A component for site automatic translation. - component-projects
🐙 Display your GitHub projects in the FixIt theme and generate blog posts from readme. - hugo-atom-feed
Hugo theme component for ATOM feed custom Output Format. - hugo-json-feed
Hugo theme component for JSON feed custom Output Format. - shortcode-asciinema
A Hugo theme component with asciinema-embed shortcode. - shortcode-caniuse
A Hugo theme component with caniuse shortcode. - shortcode-docs-bookmark
🔖 Embed bookmark of FixIt Docs. - shortcode-missing-translation
A Hugo theme component with missing-translation shortcode. - shortcode-mmt-netease
🎶 A Hugo theme component with a NetEase Cloud random comment shortcode. - shortcode-rewards
A Hugo theme component with reward-log or sponsor-log shortcode.
支付宝
微信