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

Searching tags #34

Closed
andhapp opened this issue May 7, 2009 · 8 comments
Closed

Searching tags #34

andhapp opened this issue May 7, 2009 · 8 comments

Comments

@andhapp
Copy link

andhapp commented May 7, 2009

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.

@tomjack
Copy link

tomjack commented May 7, 2009

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.

@henrik
Copy link
Contributor

henrik commented May 7, 2009

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.

@andhapp
Copy link
Author

andhapp commented May 8, 2009

@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.

@qrush
Copy link
Contributor

qrush commented Jan 1, 2013

👍 on not using Jekyll if you need search built in. Jekyll's job is slightly dynamic site generation, that's it.

@qrush qrush closed this as completed Jan 1, 2013
@kevinSuttle
Copy link

So search isn't something that's being considered?

@mattr-
Copy link
Member

mattr- commented Jan 4, 2013

That is correct. If search is a hard requirement for what you're doing,
Jekyll is not the right tool for the job.

@parkr
Copy link
Member

parkr commented Jan 4, 2013

Write a plugin which outputs a list of your tags and the associated posts and write a sinatra server which responds to /search and just parses through that list output by the jekyll plugin. An idea.

@ixti
Copy link
Member

ixti commented Jan 4, 2013

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.

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants