PontusHorn / Pico-Tags

A plugin for Pico to add tagging functionality.
MIT License
25 stars 9 forks source link

Directory wise tagging #16

Open notakoder opened 2 years ago

notakoder commented 2 years ago

Is it possible to implement Pico Tags to show tags only from the files in the parent directory? If, for instance, there are two directories serving content, articles and news, the code to display tags in news.md will also display tags of files in articles directory. This is unnecessary. news.md should display tags of only those files inside the news directory.

<ul>
    {% for tag in tags|sort %}
        <li><a href="{{current_page.url}}/?tag={{ tag }}">{{ tag }}</li>
    {% endfor %}
</ul>
PontusHorn commented 2 years ago

It's not possible right now and I'm not planning to add more features to the plugin currently. Sounds like a reasonable feature though - I'm open to a PR if you're able and willing to add it yourself.

notakoder commented 2 years ago

I am willing but unfortunately unable to (my username is literal). The best I can do is suggest features for improvements. Hopefully someone else can do that. Thanks anyway. :relaxed: