Question

I am using Ruby on Rails 3.1.0 and the YARD 0.7.4 gem for documentation purposes. I would like to add more files other than the README file on the top of the generated documentation as made here (see README, What's New?, Getting Started Guide, Architecture Overview, ... tabs at the top of the linked page under the "File Listing" section).

That is, by default the YARD gem seems to generate only the documentation related to the README file present in the ROOT directory of my RoR application. I would like to document other files and for each of them add a tab at the top of the documentation (as made in the previously linked page).

Is it possible? If so, how can I make that? More, should I create a new directory (in the ROOT of my RoR application) containing my "custom" files used for documentation purposes?

Was it helpful?

Solution

When reading the documentation for YARD: Command line tool, you will find the following:

You can also add a .yardopts file to your project directory which lists the switches separated by whitespace (newlines or space) to pass to yardoc whenever it is run.

Above, there is the hint that by using - README LICENSE FAQ, these files will be added to the documentation.

The .yardopts file for YARD itself contains:

-
docs/WhatsNew.md
docs/GettingStarted.md
docs/Overview.md
docs/CodeObjects.md
docs/Tags.md
docs/Parser.md
docs/Handlers.md
docs/Templates.md
docs/Glossary.md
ChangeLog
LICENSE
LEGAL

I think that explains why all these files are part of the documentation. I don't know if they are available as tabs automatically, though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top