Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"wildcard" - get all tags #163

Open
crysman opened this issue Jan 24, 2021 · 0 comments
Open

"wildcard" - get all tags #163

crysman opened this issue Jan 24, 2021 · 0 comments

Comments

@crysman
Copy link

crysman commented Jan 24, 2021

Hi there, this is not an "issue", rather a question:

Is it possible to get all tags (like wildcarding *) on pages generated by jekyll? We've been using tags-topics (e.g. tags-topics: [ energy, science ]) and we've got several .md pages with different tags. I would like to have a single page merging all pages of all tags without actually adding a "fake" tag like "ALL" in every page...

We are using it like this:

{% if include.tags %}
{% assign sorted_full_tags = site.data.tags | sort_czech: "name-short" | sort: "is-scope", "last" %}
<div class="tags {{ include.container-class }}">
    {% for tag in sorted_full_tags %}
        {% if include.tags contains tag.id %}
            {% if include.highlighted == tag.id %}
            <a href="/" role="button" class="btn btn-tag btn-sm btn-tag-highlighted">
            {% elsif include.link %}
            <a href="/temata/{{ tag.id }}" role="button" class="btn btn-tag btn-sm btn-tag-link">
            {% else %}
            <div class="btn btn-tag btn-sm">
            {% endif %}
            {% if include.name-long %}{{ tag.name-long }}{% else %}{{ tag.name-short }}{% endif %}
            {% if include.highlighted == tag.id or include.link %}</a>{% else %}</div>{% endif %}
        {% endif %}
    {% endfor %}
</div>
{% endif %}

I am imagining something like an asterisk (*) to include all tags from everywhere, like imaginary

<a href="/temata/{{ tag.* }}" role="button" class="btn btn-tag btn-sm btn-tag-link">

(tag.* would be something like a word everything in the URL)

In simple words, to have a single page where ALL tags content is generated, no matter how these tags are named - like in bash, using * ... What is the best way to achieve this?

(I am sorry not to explain in best details possible, I am not one of the web programmers...) Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant