-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure IRB's documentation #1053
base: master
Are you sure you want to change the base?
Conversation
573d030
to
e38bfca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RDoc setting related changes are all for achieving the followings all at once:
- All doc files should live under
doc
folder - When RDoc generates these files' pages, they should NOT be put under
doc
folder, but treated as top-level pages in the sidebar doc/index.md
should be the main page- Documentation under
lib
should be generated as usual
The current implementation is the only set of configurations I could make this work. RDoc really needs to be a better tool 😞
@@ -0,0 +1,2 @@ | |||
page_dir: doc | |||
warn_missing_rdoc_ref: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These settings can't be specified in RDoc's rake task so we need this file.
rdoc.title = "IRB Documentation" | ||
rdoc.main = "index.md" | ||
rdoc.rdoc_dir = "_site" | ||
rdoc.options.push("lib") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need this task because we now need to use lib
as the target folder, not the root folder.
00de801
to
600e8ce
Compare
Currently, part of the documentation lives in `lib/irb.rb` as RDoc comments, and the rest lives in `README.md`. The RDoc comments are not for viewing on GitHub, while README.md is. So this means users need to read part of the documentation on https://ruby.github.io/irb/, and the rest on GitHub. This is not a great user experience. This commit restructures the documentation so all major documentation is in `doc/index.md` that will become the main documentation for IRB on https://ruby.github.io/irb/. This solves a 2 main problems: 1. Users can read IRB documentation all in one place, on https://ruby.github.io/irb/. 2. It makes updating the documentation easier, especially the content that currently lives in `lib/irb.rb`.
Currently, part of the documentation lives in
lib/irb.rb
as RDoc comments, and the rest lives inREADME.md
.The RDoc comments are not for viewing on GitHub, while README.md is. So this means users need to read part of the documentation on https://ruby.github.io/irb/, and the rest on GitHub. This is not a great user experience.
This PR restructures the documentation so all major documentation is in
doc/index.md
that will become the main documentation for IRB on https://ruby.github.io/irb/.This solves a 2 main problems:
lib/irb.rb
.Next Steps
README.md
's content with links to relevant sections.EXTEND_IRB.md
needs to be updated to link to the new page. The file can't be deleted because it was advertised in multiple places.What This PR Does NOT Do
This PR is a foundation for future documentation changes. It does not include fact-checking existing documentation or correcting existing errors...etc.
Demo (generated with ruby/rdoc#1250)
Screen.Recording.2024-12-23.at.23.51.41.mov