Comments (3)
I'm not sure what you mean by decouple the doucementation from the code. Can you give an example?
I'll guess at what you mean through the following:
RDoc generates documentation from the RDoc::CodeObject tree (https://github.com/rdoc/rdoc/blob/master/lib/rdoc/code_object.rb) so one could be constructed manually to build documentation. This would be work, though.
You can also transform text into HTML (or other supported output formats) directly:
@html = RDoc::Markup::ToHtml.new
out = @html.convert $stdin.read
$stdout.write out
There's also rdoc-data (https://github.com/rdoc/rdoc-data) which contains ri data for several versions of ruby. The driver in the Rakefile could be modified to produce HTML instead without much work (I think '--ri' would need to be dropped from line 74 of the Rakefile).
from rdoc.
hi drbrain, thanks for all the pointers. You got my idea. rdoc-data could be a good vector to distribute my hypothetical ruby@doc branch but I want to try something different.
Just to make it clear for me and in case you get some ideas: I intend to add --overlay=PATH to the rdoc command-line. If defined, it would start looking for rdoc files in that folder that have the same basename as the source files during the tree construct. Say optparse.rb.rdoc for example would contain new definitions for optparse.rb. I'm not sure yet how I could split that rdoc file to say: section xy overrides OptionParser class doc, or OptionParser.new class method, but that shouldn't be too difficult.
In the grand scheme of things, this approach would allow new interesting opportunities: separate documentation from code, allow localization of the doc, simplify the implementation of some crazy wiki-like rdoc editor.
from rdoc.
I would reuse the directives preexisting in RDoc like Document-class
, Document-method
, :method:
, :attr_accessor:
etc.
Until you need some new features I am going to close this bug.
from rdoc.
Related Issues (20)
- On the main doc TOC page, some URL fragments are incorrect
- Enumerable#inject has incorrect examples HOT 2
- [Bug] Cannot link to constants in Markdown
- Incorrect module aliasing
- [Bug] Cannot insert a link after a left curly bracket appears HOT 1
- [Feature Request] Remove comments which starts with :no-doc
- [Bug] Symbol is modified when declared with %s HOT 1
- [Bug] rdoc doesn't detect heredoc comments HOT 1
- Unstable TestRDocGeneratorJsonIndex#test_generate test HOT 5
- Attributes not in methods TOC?
- `rb_file_const` is not working
- Update licenses listed in gem HOT 1
- [email protected]
- Fill release notes < 5.1.0
- Place fonts in a separate gem
- Concern about psych v5+ dependency HOT 1
- 6.5.0 fails to properly parse ruby-3.2.0 source directory
- Code climate markdown code is broken
- Add :deprecated: and :since: directives HOT 1
- Possible ReDos in the read_directive method HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rdoc.