Can YARD do this?

RDoc can be used to convert a string, possibly with RDoc “tags”, to
HTML.
Example:

require ‘rubygems’
require ‘rdoc/markup/to_html’

h = RDoc::Markup::ToHtml.new()
puts h.convert(’== Section 2’) # Output : “

Section 2

The string could be the contents of a text file, and this is a
functionality I use very often as a way to generate an HTML file from a
text file.

I was wondering if YARD can be used the same way, that is, to generate
HTML from plain text, possibly with RDoc “tags”?

I have not been able to find anything along these lines in the YARD
documentation.

Claus

If I understand you right, haml1 is the right thing for you!

2010/2/27 Claus Folke B. [email protected]:

Benedikt Müller wrote:

If I understand you right, haml[1] is the right thing for you!

After a brief look at HAML, I am not so sure you are right. :slight_smile:

The nice thing about writing a text file i RDoc format is that the text
file is very readable in itself. I write a lot of documents in text/RDoc
format, then later publish them in HTML format.

I find using the same format for writing Ruby program documentation and
stand-alone documents very handy. The reason for asking about YARD is
that it has some nice features for specifying method parameters and
return values in Ruby program comments.

Claus

On 27.02.2010 17:18, Claus Folke B. wrote:

stand-alone documents very handy. The reason for asking about YARD is
that it has some nice features for specifying method parameters and
return values in Ruby program comments.

Looking at the architecture diagram I doubt it: it seems you always
store content in the repository and documentation is generated from
there. It seems this is not as simple as generating output directly.

http://yardoc.org/docs/yard/file:docs/Overview.md

Did you consider Textile or Markdown?

http://redcloth.org/

http://tomayko.com/writings/ruby-markdown-libraries-real-cheap-for-you-two-for-price-of-one

Kind regards

robert

Robert K. wrote:

Did you consider Textile or Markdown?

Hi Robert,

Yes, I have taken a look at both. But as I wrote, I find it convenient
to use the same markup when documenting Ruby program and writing
stand-alone documents.

Claus