Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ragdata/jekyll-ghpages-tagging

🔖 A tag management GitHub Action for Jekyll sites on GitHub Pages
https://github.com/ragdata/jekyll-ghpages-tagging

blogging gh-pages github-actions github-pages jekyll ragdata redeyed-software tagging

Last synced: about 1 month ago
JSON representation

🔖 A tag management GitHub Action for Jekyll sites on GitHub Pages

Awesome Lists containing this project

README

        

[![Pre-Release](https://img.shields.io/badge/Status-Pre--Release-d20000?labelColor=31383f)](https://github.com/Ragdata/Ragdata/blob/master/docs/badges.md)
[![MegaLinter](https://github.com/Ragdata/jekyll-ghpages-tagging/actions/workflows/mega-linter.yml/badge.svg)](https://github.com/Ragdata/jekyll-ghpages-tagging/actions/workflows/mega-linter.yml)

Jekyll GH-Pages Tagging Script

[Jekyll GH-Pages Tagging
GitHub Action](https://github.com/ragdata/jekyll-ghpages-tagging)


Issues
🔸
Releases




![GitHub issues](https://img.shields.io/github/issues-raw/ragdata/jekyll-ghpages-tagging?style=for-the-badge&logo=github)
![Last Commit](https://img.shields.io/github/last-commit/ragdata/jekyll-ghpages-tagging/master?logo=github&style=for-the-badge)
![MIT](https://img.shields.io/badge/License-MIT-gold?style=for-the-badge)

#### _Elapsed Project Time_

[![wakatime](https://wakatime.com/badge/user/7e04d9d4-3a44-495e-b622-69fdbafd036c/project/2c53b1bc-c305-48bf-b332-445274a3f6e6.svg?style=for-the-badge)](https://wakatime.com/badge/user/7e04d9d4-3a44-495e-b622-69fdbafd036c/project/2c53b1bc-c305-48bf-b332-445274a3f6e6)

If you like this repository, please give it a ⭐ (it really does help)

GitHub repository stars

## ⭐ [Project Overview](#top)

> An article tagging solution for Jekyll that is 100% compatible with GH-Pages

If you're using GitHub Pages in SAFE mode, then you already know that most plugins are disabled and only a small number of plugins are whitelisted. One of the plugins you **can't** use is [jekyll-tagging](https://github.com/pattex/jekyll-tagging) - which makes managing tags for your blog articles difficult.

This project provides a fully-automated solution for Jekyll tag management that is 100% compatible with GitHub Pages by doing the work through GitHub Actions instead of a Jekyll plugin. Like most of my projects, this one was inspired by my own need for the solution.

> If you've got an idea you'd like to see implemented, submit a [feature request](https://github.com/Ragdata/jekyll-ghpages-tagging/issues/new?assignees=Ragdata&labels=request%2CNEW&projects=&template=feature-request.yml&title=%5BREQUEST%5D%3A+%3Ctitle%3E) and it will be considered for inclusion in an upcoming release.

## ❓ [What Does It Do?](#top)

1. Scans the `posts_dir` for a list of blog articles
2. Extracts a list of tags used in those articles
3. Creates config files in `tags_dir` for new tags
* _Optionally creates config files in `feeds_dir` for new tags also_
4. Deletes config files for tags & feeds which are no longer in use
5. Commits changes to git and pushes to repo

`Tag Files` - form a Jekyll Collection which can be used to index blog articles according to their associated tag(s).

`Feed Files` - allow you distribute your articles in ATOM (RSS) format and curate your feeds according to their associated tag(s).

## 📂 [Usage](#top)

### Inputs
```yaml
posts_dir:
description: "Path to '_posts' directory from root"
required: true
default: "_posts"
tags_dir:
description: "Path to '_tags' directory from root"
required: true
default: "_tags"
tags_layout:
description: "Layout used by tag files"
required: true
default: "tags"
feeds_dir:
description: "Path to '_feeds' directory from root"
required: false
default: "_feeds"
feeds_layout:
description: "Layout used by feed files"
required: false
default: "feed"
prune_tags:
description: "Remove unused tags"
required: false
default: "true"
```
### Example Workflows

```yaml
name: Jekyll GH-Pages Tagging Workflow

on:
# Trigger when Markdown files pushed to docs/_posts on the master branch
push:
branches:
- master
paths:
- 'docs/_posts/*.md'
# Allows this workflow to be triggered manually
workflow_dispatch:

jobs:
generate_tags:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate Tags
uses: ragdata/jekyll-ghpages-tagging@master
with:
posts_dir: "docs/_posts"
tags_dir: "docs/_tags"
tags_layout: "tags"
feeds_dir: "docs/_feeds"
feeds_layout: "feed"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

You can find a copies of a [standalone workflow](https://github.com/Ragdata/workflow-templates/blob/master/templates/jekyll-ghpages-tagging.flow.yml), [reusable workflow](https://github.com/Ragdata/workflow-templates/blob/master/templates/jekyll-ghpages-tagging.reuse.yml) and [caller](https://github.com/Ragdata/workflow-templates/blob/master/templates/jekyll-ghpages-tagging.call.yml) using this GitHub Action in my [**Workflow Templates**](https://github.com/Ragdata/workflow-templates) repository.

[`^ Top`](#top)

## ❤ī¸ [Project Supporters](#top)

Click here to find out about available sponsorship opportunities!

If sponsorship isn't right for you, but you have found my work to be useful in some way,
would you please consider buying me a coffee to help keep me going?

Buy Me A Coffee

[`^ Top`](#top)

## 🚧 [Author / Maintainer](#top)

[![Ragdata](https://img.shields.io/badge/-Darren_"Ragdata"_Poulton-d20000?style=for-the-badge&labelColor=555555&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAgEAYAAACz+d94AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAZAAAAGQBeJH1SwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAnKSURBVFiFtVlrbFTVE/+du7t3a7t3u7vdPhb6pyjFankUiSYWm1gTCsHEWBOpEhEViG9RawXCB1GpNUKaKAFqNFowFkVQxMgj4W2hjRRMlwYQpAil72633W633e7ee8//w3BY+oK2sfPl9JwzZ2Z+M3PmzN6Cc845B8ZrrKkBgOzss2cBoLq6uhoA5s8fb70SxonOnmWMseXLOQeAw4dpNSNDkgBg3z6xP176xw1YIAAAZWUEbNMmsU7zsjKjEQB+/HG89DMRutGS280YYxMnMgYAn35KY1SUpgHAyy/PmsU5552dgv/8ecYYS09PT+ec8/PnxfrFi4wxpiihEABs2UK22Gy6DgBvvUVyrl4dN2CVlYwxdtddFgsAvP8+ra5aRWN0dH/uc+dkGQAyMx96SFEmTnS5GJNlVX3jDc5DIaNx8+aqKr+/oaGpiQBVVtK5adP6y+npofGzz7q7AWDDhsxMzjnv7R0zMPKwLFMEXnqJVtesoXHSpKHF/fbbmTMmk8m0du2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P5PPqHVnTuprB84MJz9g+7YIOQSALzzDgGsqTl+vLOztdXvz8qy2RITjx+vqjKZZDk7u6SEunbRQYyUTp40mcxm4PRpq1WWgQcfpIeZ6OjR8vLOzpaWYJD0z55NsZk+/Y5234mBqs316yT4+efJ6E2bqJktKSHDdH20gAaSOE/yNC02VtfD4c2bSe/GjSR78eKMjMgnhtvRqL9SUW/28cc0i4nJyrLbExNdLpKxaNHtzg71aWBo+v77ioqOjpaW9naS6/XS1RB670yj/q5IVejDD2mWlFRYGAj4fHv30jVvbh6tvAjRa7huXXe3z3fwIAGKiyN9hYWjlTaGD6ZUhf7+GwCWLMnODoWCwczM9HRV7evbsoV4Blep25Om3XuvpoVCX3zx2GPhcDCYmdneDtDXsaGr3p1ozF+CFy7knHNNI4Bvv/3VV11dnZ2aFh3Nua5v3TpSOcRfWrp1q8/X0QFcvAgAb76Znc055yP/HTiI/ut/Bhw6BBiNc+c6HHZ7QkJ5uaLY7YmJnCuK3Z6Q4HaLOe0fP/7HHwDw5JP/tR3j9t+Od981m63W1FSr1WZLSiKACQlut9VqtycmVlYuXaooipKWNl76xw2YGJ1Op9PpdLkUJS7O5dq9Oz4+Pj4+PilpvPX+H9FzAjWyi5ldAAAAAElFTkSuQmCC)](https://github.com/Ragdata)

[//]: # (### [Join me in the RedEyed Community!](https://discord.gg/s6gZZUc67y))

[//]: # ()
[//]: # (Facebook)

[//]: # (SubStack)

[//]: # (Dev.to)

[//]: # (Reddit)

[//]: # (Twitter)

[//]: # ()
[//]: # ([![Discord](https://img.shields.io/discord/1067204348251230298?labelColor=5865F2&label=RedEyed%20Software%20&logo=discord&logoColor=white&style=for-the-badge)](https://discord.gg/s6gZZUc67y))

[`^ Top`](#top)

## 🔐 [Security](#top)

While I always good security practices, 100% security can never be guaranteed in any software package. The `Jekyll GH-Pages Tagging Action` is provided AS IS, and without warranty. You can find more details in the [LICENSE](LICENSE) file included with this repository.

If you discover any issue regarding the security of this project, please disclose that information responsibly by sending a [security advisory][advisory]. **PLEASE DO NOT CREATE AN ISSUE OR DISCUSSION TOPIC.** You can read more about this project's security policies [HERE][security]

[`^ Top`](#top)

## Šī¸ [Copyright & Attributions](#top)

This project incorporates ideas and / or code crafted by the following talented individuals:

* [**Article: How do I tag posts in Jekyll? Jekyll tagging made simple**](https://www.untangled.dev/2020/06/02/tag-management-jekyll/)

Copyright Š 2020 - [Joseph Zammit](https://github.com/jvzammit) @ [Untangled Development](https://www.untangled.dev/)

> "We see much further, and reach much higher,
only because we stand upon the shoulders of giants"

[`^ Top`](#top)

## 📖 [Resources](#top)

* [Jekyll Website](https://jekyllrb.com/)
* [GitHub Pages Dependencies](https://pages.github.com/versions/) (list of plugins supported by gh-pages)
* [Ragdata's Favourite Jekyll Resources](https://gist.github.com/Ragdata/43dc893f563eac97b05ff8132ca484d7)

[`^ Top`](#top)

## ⚖ī¸ [License](#top)

![MIT](https://img.shields.io/badge/License-MIT-gold)

Copyright Š 2024 Darren (Ragdata) Poulton

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[`^ Top`](#top)

If you like this repository, please give it a ⭐ (it really does help)

GitHub repository stars

Visitors
Ragdata

Copyright Š 2024 Redeyed Technologies

[advisory]: https://github.com/ragdata/jekyll-ghpages-tagging/security/advisories/new
[all-contributors]: https://allcontributors.org
[contributing]: https://github.com/ragdata/.github/blob/master/.github/CONTRIBUTING.md
[issues]: https://github.com/ragdata/jekyll-ghpages-tagging/issues
[security]: https://github.com/ragdata/jekyll-ghpages-tagging/security/policy
[sponsors]: https://github.com/sponsors/Ragdata