-
Notifications
You must be signed in to change notification settings - Fork 101
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
Is there multi-category support? #160
Comments
I think you can use Jekyll's
|
Actually, I want to create a generic page to show posts belonging to two categories. For example,
Is this possible with |
If this feature isn't there in this plugin, it will be a good addition. We can add both |
Hi there, Here is a workaround I figured out:
def categories
categories = Hash.new
@posts.each do |post|
cats = post.data["categories"]
cate = ""
cats.each do |cat|
cate = cate +"/"+ cat
end
post_arr = categories.fetch(cate, [])
post_arr.append(post)
categories.store(cate, post_arr)
end
return categories
# @site.categories
end
def slugify_string_title
return unless title.is_a?(String)
Utils.slugify(title, :mode => @config["slug_mode"]) # handle this
end |
Can I list all posts on a page that belong to two categories, let's say,
question
andruby
? Right now I can list all posts either with categoryquestion
orruby
but not both.The text was updated successfully, but these errors were encountered: