-
Notifications
You must be signed in to change notification settings - Fork 244
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
Categories/tags? #25
Comments
You can add post categorization right now with meta inside text files. For example, on my blog (usabilitypost.com) I have a couple of posts categorized as book reviews. I show these posts on a different page of the blog. You can select posts by their meta using Ruby like this: <% @articles.select {|a| a[:category] == 'book' }[0...10].each do |article| %> ... html here to render book articles ... <% end %> Not sure about posts with multiple categories or tags, could probably work something out though. Cloudhead - what do you think? |
This is something I'd like to see as well. Perhaps add it to the header info. categories: Programming, Book Review, Ruby Then have a single page that lists everything that falls within those tags. Could probably re-use the index.rhtml for that by passing in some vars. |
Categories are planned — they'll essentially just be folders inside Tags can be done as shown above, any metadata you add to the article headers can be accessed in the templates. |
Awesome, I'll look forward to that. |
For tags as shown above using metadata is there a way to view articles by tag. Example: I tag two articles with ruby. If I make a template tagged.rhtml file does toto already have support for something like /tagged/ruby or will this try to find pages/tagged/ruby.rhtml? If it doesn't is something like this planned? |
For now, you could do that manually, by fetching the articles, and doing a select: |
I think the main problem is to get the "ruby" tag from e.g. the URL |
It's still a bit messy, but: http://github.com/5v3n/karakuri adresses this feature, it might come handy to you. To see it in action, have a look at 5v3n.com. Thanks cloudhead for opening the erb renderer to include the ENV data, that mainly did the trick. |
I'm going to implement categories for toto (I have already implemented files hierarchy
browse categories
@cloudhead, will really appreciate your comments and/or wishes about implementation. |
@ixti good thing on category...but how about assigning a post to multiple categories? |
@seanlin, I have implemented tags before, see pull request #90. So you can mark your post with several tags, but category is always one or nothing :)) I believe that nature is best architecture, so you can put a document only in one |
I'd like to switch a Wordpress blog with about 200 posts to Toto - but in order to do that, I would need to be able to categorize and tag my posts. I'm not a Ruby guy - I've been trying to wrap my head around how to make the chances I'm thinking of, but so far I haven't had any luck.
Are these features planned additions to Toto, or are they outside of Toto's scope?
The text was updated successfully, but these errors were encountered: