The Ruby on Rails API Switches to SDoc

Posted by fxn August 29, 2011 @ 02:29 PM

The Ruby on Rails API is switching to SDoc starting with 3.1.

SDoc is a RDoc format created by Володя Колесников (@voloko) that has been powering railsapi.com for a long time.

Among other things, SDoc provides a search box with fuzzy match completion, tree browsing, keyboard navigation, and a really nice template.

You can already see the upgrade in the edge API.

We'd like to thank very much Володя for his work updating SDoc for the official API. Thanks man!

Posted in Documentation | 44 comments

Comments

  1. Boris on 29 Aug 14:50:

    And how exactly do you pronounce Володя ?

  2. LOL on 29 Aug 14:50:

    It’s funny you did not transliterate his name – Volodya (Vladimir) Kolesnikov.

  3. MpaK on 29 Aug 14:55:

    Володя – красавчег! Так держать!

  4. Xavier Noria on 29 Aug 14:55:

    He does not transliterate in his own GitHub account, doing so here would be a liberty I am not going to take.

  5. AstonJ on 29 Aug 15:07:

    Any chance of getting user-commenting added too please? That’s about the only thing I miss from php.net (mostly for the example usages that people post in them).

  6. Xavier Noria on 29 Aug 15:14:

    @AstonJ unlikely.

  7. дождь on 29 Aug 15:15:

    “Володя Колесников” is not developer, it’s name of the new Russian nuclear bomb

  8. medwezys on 29 Aug 15:27:

    I am using SDoc for a long time and this formal move to it is some good news. However I find it quite difficult to read stuff on customized edge API theme: http://cl.ly/9gSp Apparently it needs some CSS tweaking to make it more readable.

  9. MatthewRudy on 29 Aug 15:42:

    It looks good on my laptop, But is somewhat clunky on android.

    (not that I frequently check the rails api on my tablet, but in terms of having a future proof solution…)

  10. Scott Radcliff on 29 Aug 15:46:

    Nice addition. I have been using railsapi exclusively for some time. It’s way easier to read than RDoc and friendlier for new devs coming to Rails.

    I agree with @AstonJ; comments would be a nice addition.

  11. Xavier Noria on 29 Aug 15:48:

    @medwezys @MatthewRudy please do not hesitate to suggest CSS tweaks to the rails template. Some details are indeed being polished.

  12. Tom Myer on 29 Aug 15:51:

    Cool, looks much nicer and friendlier!!

  13. murphy on 29 Aug 16:02:

    This deserves a link to a video of a Russian nuclear icebreaker: http://www.youtube.com/watch?v=VVtDX46cTJQ

  14. rafamvc on 29 Aug 16:02:

    +1 on comments.

  15. Jon Leighton on 29 Aug 16:19:

    Rather than comments, perhaps it would be possible to link directly through to the ‘edit’ page for docrails on github? That could be nice for when people want to quickly correct a typo or something.

  16. lakshman on 29 Aug 16:30:

    This is cool!!! :) awesome

  17. AstonJ on 29 Aug 16:33:

    @Xavier – do you know why comments are unlikely? Could you use Disqus or similar if it’s a technical/time issue?

  18. Xavier Noria on 29 Aug 16:52:

    @AstonJ not totally against it, but Rails releases are frequent, and don’t like the idea of migrating comments from release to release. They would have such a short live that I don’t think it is worth the trouble.

    Also, I think comments are a X solution to an Y problem. If something can be explained better, expanded… whatever, that should generally go as a patch through docrails. That workflow works well with upgrades.

  19. Semyon on 29 Aug 17:10:

    Cool! I hope this will give more attention to SDoc itself.

  20. Jens on 29 Aug 17:35:

    I applaude this!

  21. AstonJ on 29 Aug 19:18:

    @Xavier – I see your point – it could get messy.

    An alternative could be an official Ruby on Rails forum, where a topic could be posted for each API entry (and linked to), or it could just be used to discuss things.

    We don’t really have any active Rails forums – which is a shame as they are very useful and fantastic for forging communities.

    (I’ve been running forums for years so could help here.)

  22. grimen on 29 Aug 19:36:

    Awsome – I’ve been using railsapi.com for the reason of that SDoc is so swift and easy to overview. I’ll probably still use railsapi.com as it allows searching Ruby, Rack and many customs gems, but yet happy core docs picked SDoc!

  23. postmodern on 29 Aug 19:57:

    Why not YARD? YARD also parses RDoc, provides a Search Box, Class/Module tree view, method listing, a nice default template, and allows for custom templates. YARD also allows for Doxygen/JavaDoc style annotation tags.

    http://rubydoc.info/gems/activesupport/frames Why not YARD?

  24. srd on 29 Aug 20:09:

    The SDoc theme on edge really clashes with my API browsing MO. Instead of knowing what method I want and quickly being able to scroll there with the mouse I now either have to know in which class the method currently resides, or start using the search box and then having to remember to clear it when I want to go looking for something else. Lots more work for a little eye candy. :(

    Whats the RDoc theme of the current api.rubyonrails.org called? I look into rolling my own then :)

  25. ChrisArchitect on 29 Aug 20:50:

    Been using RailsAPI for awhile offline and like it a lot – this is great news.

  26. stephen.bannasch@gmail.com on 30 Aug 00:40:

    I’ve often opened sections of the API documentation in new tabbed windows. This doesn’t seem to work with the new generated doc here: http://edgeapi.rubyonrails.org/

  27. Jimmy Cuadra on 30 Aug 03:34:

    This is an improvement, but I also have to wonder why YARD wasn’t chosen. It looks great and is being used for http://rubydoc.info/.

  28. Pavel on 30 Aug 07:38:

    Володя, респект и уважуха ;)

  29. Kirill on 30 Aug 08:35:

    Володя, молодец!:)

  30. Xavier Noria on 30 Aug 08:42:

    @srd The current API uses the Horo template, which is extracted as a gem. Check the Rakefile at the root of the project to see how to use it.

  31. Xavier Noria on 30 Aug 08:58:

    @postmodern @Jimmy YARD is in the radar, not discarded.

    But it would be another kind of switch. Among other things in particular the core team should commit to use annotations. Technically not required, but that’d be the point. If we ever want annotations, that’d be a logical change, while that’s not the case, YARD is still a valid option but less justified in my opinion.

    SDoc on the other hand has a set of useful features and a really nice design for my taste. Definitely, SDoc is an excellent choice to upgrade the Horo template, and was for me the most natural next step in the evolution of the API.

    See also the rubyonrails-docs ML for some discussion about this.

    But as I said, it is not discarded. It could (or could not) happen that YARD is adopted in the future. Time will say.

  32. M. S. on 30 Aug 10:28:

    My impression is that frames are not compliant with HTML 5 and their use has been generally discouraged for quite some time now. My question is why do all these doc templates still use framesets?

    Since we’re talking about documentation for cutting-edge web technologies here, shouldn’t they be expected to follow the best practices vigorously when it comes to frontend design?

    Let me know if I’m missing something.

  33. Gacha on 30 Aug 11:13:

    According to http://www.w3schools.com/html5/tag_iframe.asp frames are still there. Frames are ok if they used for the right purpose, like in this documentation or youtube/vimeo videos, not like in old web’s.

  34. M. S. on 30 Aug 13:40:

    Linking to w3schools does not help:

    http://w3fools.com/

    Anyway, I know that frames are still supported in HTML 4, what I’m saying is that the markup used in official resources like these should not be “okay”, but should reflect the absolute pinnacle of current web technology. I don’t see how frames fit into that.

  35. M. S. on 30 Aug 13:42:

    By the way, there’s a difference between iFrames (still supported in HTML 5) and framesets (not supported at all in HTML 5).

  36. Xavier Noria on 30 Aug 15:29:

    @M.S. Absolutely, HTML5 would be awesome for the API. We are not using something else because we choose to, but because nobody, not even you, wrote an HTML5 template like that. You can change that if you feel so strong about it.

  37. M. S. on 30 Aug 18:12:

    Thanks for clarifying, I just wanted to check that people are aware of it. I may work on it if when I have some time.

  38. gdelfino on 30 Aug 20:42:

    The problem of how to handle comments in documentation seems to be solved nicely at http://apidock.com

  39. Lailson Bandeira on 30 Aug 20:58:

    THANKS A LOT guys! I’ve been using SDoc for a while and now I’m addicted to it… =P

  40. Victor Stan on 01 Sep 21:54:

    Nice except you can’t scroll the sidebar on an iPad…

  41. Victor Stan on 01 Sep 21:54:

    Nice except you can’t scroll the sidebar on an iPad…

  42. Marnen Laibow-Koser on 05 Sep 23:02:

    Nice…except that unlike railsapi.com, I can’t view the Rails and Ruby standard library APIs in one big list. That’s a big disadvantage.

  43. gdelfino on 12 Sep 15:37:

    Victor, you can scroll the sidebar on an iPad, but you need to scroll using two fingers instead of one.

  44. geo targeted search engine optimization on 14 Sep 19:13:

    Got your point here, wait for the next updates.