开发者

Best wiki syntax for documentation in ruby code and project README files

开发者 https://www.devze.com 2022-12-11 05:12 出处:网络
Are there any wiki syntax like rdoc, markdown, ... recommended i开发者_JAVA技巧n the ruby world?

Are there any wiki syntax like rdoc, markdown, ... recommended i开发者_JAVA技巧n the ruby world? I write sometimes open source code and have no glue which syntax I should use in Code documents and in README files. What be helpful for me which and why you use it.


RDoc is the default documentation tool. The RDoc syntax is the default one allowed inside Ruby files and libraries.

You might find TextTile or Markdown used outside Ruby classes for text files such as the README or the CHANGELOG files. But this isn't the standard sintax so you would need a way to tell the parser which syntax the file is written with, usually this way is the file extension.

GitHub, for example, follows exactly this convenction. Unless a .textile or .markdown extension is specified, the file is parsed as RDoc.

  • http://github.com/weppos/whois (.rdoc == Rdoc)
  • http://github.com/rails/rails/tree/master/railties/ (no extension == Rdoc, but not for GitHub)
  • http://github.com/technoweenie/restful-authentication/blob/master/README.textile (.textile == Textile)

Remember: AFAIK, inline documentation is always parsed as RDoc.


On Github, people mostly use Rdoc or Textile as format for their README-files. Rdoc is also very useful for API-documenting your code, as the syntax integrates really nice into the code and is pleasant to read.

0

精彩评论

暂无评论...
验证码 换一张
取 消