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
Searching tags #34
Comments
For searching on one tag it seems like we could just generate tag indexes. E.g. for every tag you use, generate _site/tags/[tag]/index.html from some tag layout file. But if you want to be able to go to /tags/linux/administration to get everything with both tags, then things could get crazy. When you have a post with 5 tags you'd have to generate 120 separate tag indexes, for that post's tags alone. For that many the space required isn't so bad, but I'm not sure how much it would slow jekyll down. If you have 7 or more tags on a post it starts to get ridiculous. |
Tag index pages or a single page listing tags (like http://henrik.nyh.se/tag ) could work. If someone needs to find tag1+tag2, I'd suggest going with a single page and then using JavaScript to e.g. make /tag#tag1+tag2 do something clever. |
@henrik - yeah it would work on just a single page or may be I should abandon this whole idea and just go and use wiki. |
👍 on not using Jekyll if you need search built in. Jekyll's job is slightly dynamic site generation, that's it. |
So search isn't something that's being considered? |
That is correct. If search is a hard requirement for what you're doing, |
Write a plugin which outputs a list of your tags and the associated posts and write a sinatra server which responds to |
The easiest way is to use plugin that generates posts listing by tags. You can use mine (see it in action: http://ixti.net/tags/ruby.html). Alternatively, if you want kind of "real" search, you can generate a JS file with post => tags mapping and then write a search tool in JS. To write such dynamic JS, you can use jekyll-assets plugin. |
I have been thinking to use the simplicity of Jekyll as a sort of a wiki. Many a times we come across the same problem over and over again and it would be good if it is documented somewhere. For example: How do I add new users to CentOS in a certain group? So I will assign my post some tags, let's say: linux, administration...and so on.
The problem arises when I want to search for certain tags let us say "linux" from 300 or so posts I have got. So, I was thinking if we append the tags to the end of the file name like: "2008-10-18-foo-bar-tag-ruby-nuby.textile" and get javascript to filter the links on the page.
The text was updated successfully, but these errors were encountered: