{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/a9cc05e6a7866e5fa9a7d107b5070174?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a9cc05e6a7866e5fa9a7d107b5070174","url":"https://api.github.com/users/dasch","login":"dasch","id":6351},"milestone":null,"assignee":null,"updated_at":"2011-11-13T16:33:03Z","labels":[],"comments":1,"closed_at":null,"url":"https://api.github.com/repos/defunkt/tomdoc/issues/18","body":"I think Mustache templating would be a much better way to render the documentation output. The current way - concatenating strings and whatnot - is really not going to scale well.\r\n\r\nI suggest something along the lines of:\r\n\r\n- Mustache templates are stored in `/templates/`, with each format having its own subdir, e.g. `/templates/html/` and `/templates/console/`.\r\n- All rendering is done through Mustache templates and partials, so only a scope definition (class/module) should be rendered directly, as it will be responsible for rendering its own method definitions.\r\n- View/Presenter classes could be added to aid in the rendering.\r\n\r\n### Example\r\n\r\n```mustache\r\n<h1 class=\"class-definition\">{{name}}</h1>\r\n\r\n{{description}}\r\n\r\n<h2>Examples</h2>\r\n\r\n{{examples}}\r\n\r\n<h2>Class Methods</h2>\r\n\r\n{{#class_methods}}\r\n  {{> class_method}}\r\n{{/class_methods}}\r\n\r\n<h2>Instance Methods</h2>\r\n\r\n{{#instance_methods}}\r\n  {{> instance_method}}\r\n{{/instance_methods}}\r\n```\r\n\r\n@defunkt: I would be willing to implement this if you were interesting in going down this route.","html_url":"https://github.com/defunkt/tomdoc/issues/18","title":"Use Mustache to render the output","number":18,"id":2221034,"created_at":"2011-11-13T11:33:13Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/45196398e9685000d195ec626d477f0e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"45196398e9685000d195ec626d477f0e","url":"https://api.github.com/users/trans","login":"trans","id":23423},"updated_at":"2011-11-13T16:33:03Z","url":"https://api.github.com/repos/defunkt/tomdoc/issues/comments/2723040","body":"Actually, taking a step back, I'd suggest that the templates be separate project(s). And let tomdoc focus on parsing.\r\n\r\n","id":2723040,"created_at":"2011-11-13T16:33:03Z"}}