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 : "<h2>Section 2</h2>"

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

···

--
Posted via http://www.ruby-forum.com/.

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

[1]: http://haml-lang.com

···

2010/2/27 Claus Folke Brobak <cfb@jndata.dk>:

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 : "<h2>Section 2</h2>"

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
--
Posted via http://www.ruby-forum.com/\.

--
Gruß, Benedikt

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

···

--
Posted via http://www.ruby-forum.com/\.

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://tomayko.com/writings/ruby-markdown-libraries-real-cheap-for-you-two-for-price-of-one

Kind regards

  robert

···

On 27.02.2010 17:18, Claus Folke Brobak wrote:

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.

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Robert Klemme 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

···

--
Posted via http://www.ruby-forum.com/\.