So you're running a Rails application and want to spruce up your YARD documentation. Here's the guide I wish I had.
Add yard-activerecord
and yard-activesupport-concern
to your Gemfile, add --plugin activerecord
and --plugin activesupport-concern
to your .yardopts
flags, and db/schema.rb
to the end of your .yardopts
sources. Your models' attributes and assocations should now be included in the documentation.
To modify your YARD template, create doc-src/templates/default/fulldoc/html
, then add --template-path doc-src/templates
to your project's .yardopts
. You can now create a doc-src/templates/default/fulldoc/html/css/common.css
and the styles will be included (but overwrites need to be !important
).