pattex / jekyll-tagging

Jekyll plugin to automatically generate a tag cloud and tag pages.
385 stars 76 forks source link

Name and slug #15

Closed luixxiul closed 9 years ago

luixxiul commented 11 years ago

It'd be nice if I could set names and slugs of each tag, so that I could automatically show the title different from the slug itself. I'm deploying it manually by doing like this:

{% if page.tag == 'food' %}
    <h2>Favorite Food</h2>
{% elseif page.tag == 'place' %}
    <h2>Favorite Place</h2>
{% else %}
   <h2>{{ page.tag }}</h2>
{% endif %}

Or anyone knows how to handle it by tweating liquid tags?

nhoizey commented 9 years ago

It could look for a YAML data file that would match slugs and names…

pattex commented 9 years ago

Yup, I'd do it like @nhoizey suggests, I think.

nhoizey commented 9 years ago

Wait. You closed the issue, but did you implement it yet?

pattex commented 9 years ago

It may be my crappy english, but this is a misunderstanding. I meant to say that I would do it this way if I would implement it. But I will not. I want to keep it super simple and just use the tagging like Jekyll implements it without bells and whistles.

nhoizey commented 9 years ago

Ok, sorry, I misunderstood indeed.