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

Comments

Projects
None yet
9 participants
@andhapp

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

This comment has been minimized.

Show comment
Hide comment
@tomjack

tomjack May 7, 2009

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@henrik

henrik May 7, 2009

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@andhapp

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

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

This comment has been minimized.

Show comment
Hide comment
@qrush

qrush Jan 1, 2013

Contributor

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

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 Jan 1, 2013

@kevinSuttle

This comment has been minimized.

Show comment
Hide comment
@kevinSuttle

kevinSuttle Jan 4, 2013

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

kevinSuttle commented Jan 4, 2013

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

@mattr-

This comment has been minimized.

Show comment
Hide comment
@mattr-

mattr- Jan 4, 2013

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jan 4, 2013

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@ixti

ixti Jan 4, 2013

Member

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.

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.