pattex / jekyll-tagging

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

Is it possible to have a tag-permalink option? #5

Closed edhedges closed 12 years ago

edhedges commented 12 years ago

What I mean is that with jekyll one can have a permalink: in their _config.yml to specify what each posts url looks like? Is this possible to achieve for tags?

If it is not supported in the current version of jekyll-tagging I will try to fork and contribute.

blackwinter commented 12 years ago

what exactly do you need control over? currently, you can set tag_page_dir in your config or overwrite Jekyll::Filters#tag_url in a "plugin".

edhedges commented 12 years ago

I mean a way to specify a URL pattern. Right now the URL looks like http://domain.com/tag_page_dir/tag_name.html but what I would like to do is have it look like this: http://domain.com/tag_page_dir/tag_name/ so basically instead of making files named tag_name.html it would make directories of the tag_name and place an index.html inside them.

blackwinter commented 12 years ago

if you set permalink: pretty that's exactly what you get. however, there's (currently) no way to specify the URL pattern of tag pages explicitly. patches welcome ;)

edhedges commented 12 years ago

How does this affect the blogs permalink? I currently have /blog/:date/:title? Sorry if I am annoying I am new to jekyll and ruby in general. I do want to contribute if possible though.

blackwinter commented 12 years ago

that would change indeed. i'm afraid there's no easy way out right now. short of placing the following snippet below require 'jekyll/tagging':

module Jekyll
  Filters::PRETTY_URL = true
  class TagPage; def template; '/:basename/' end end
end

maybe @pattex has some more ideas?

edhedges commented 12 years ago

Thank you for all of your quick responses! I think I will just use permalink: pretty because I like simplicity (this is why I chose your plugin).

pattex commented 12 years ago

Sorry for the late answer. No better ideas from me.

At the moment I'm a little ill, but I'll take a look at this issue in a few days again.

edhedges commented 12 years ago

Don't worry about it @pattex I don't really think it is an issue just a feature that could be added in the future.