rails / sdoc

Standalone sdoc generator
http://api.rubyonrails.org/
Other
823 stars 131 forks source link

Include files relative to the framework root #360

Closed p8 closed 6 months ago

p8 commented 6 months ago

The Rails documentation uses the :include: directive to inline the README of the framework into the main documentation page. As the README's aren't in the root directory from where SDoc is run we need to add the framework path to the include:

# :include: activesupport/README.md

This results in a warning when installing the gems as generating the rdoc for the gem is run from the gem/framework root:

Couldn't find file to include 'activesupport/README.rdoc' from lib/active_support.rb

By Monkeypatching find_include_file to find files at the framework root we can include without the framework path:

# :include: README.md

Fixes: https://github.com/rails/rails/issues/49524

netlify[bot] commented 6 months ago

Deploy Preview for sdoc failed.

Name Link
Latest commit 8d18c1e9e2dc731989a729bb8dc27cc22e5110b5
Latest deploy log https://app.netlify.com/sites/sdoc/deploys/65a7cbf2d72b6e0008eccfed
p8 commented 6 months ago

Closing in favor of the much cleaner https://github.com/rails/rails/pull/50789 This also makes sure SDoc works as expected for other gems.