Recently I learned you can use #RDoc in your #RubyGem description, and rubygems.org will render it as HTML!

Unfortunately, their CSS reset gets the better of it. But not for long, if this PR gets merged: https://github.com/rubygems/rubygems.org/pull/6228 (before/after screenshots included)

Here's to @st0012 and his fabulous work on Aliki that made this easy!

#Ruby #UX #WebDesign #Design #Typography

Interesting to see there’s an effort underway to support YARD syntax in the rdoc gem…

https://github.com/ruby/rdoc/pull/1416

Which seems to come out of…

https://github.com/ruby/rdoc/discussions/1257

#ruby #rdoc #yard #lsp

feat(yard): add initial support of YARD tags by okuramasafumi · Pull Request #1416 · ruby/rdoc

At this time, @yield, @private and @api private are supported. Ref: #1344

GitHub

RDoc, Yard, TomDoc – I still don't really know how to document Ruby (gem) code. Please help. Do you know a definitive guide?

#ruby #rdoc

Is there something like `yard server`, but for RDoc? #ruby #rdoc

@serge many of the projects we use in Python, like #Flask, are documented using #Sphinx, which can be configured to automatically generate API documentation from Python source code:

https://www.sphinx-doc.org/en/master/tutorial/automatic-doc-generation.html

This is (similar to the #yardoc and #rdoc situation) backwards compatible with #pydoc, though much more expressive due to the machine-readable format for defining parameters, return values and potential exceptions:

https://www.sphinx-doc.org/en/master/tutorial/automatic-doc-generation.html

https://docs.python.org/3/library/pydoc.html

Automatic documentation generation from code — Sphinx documentation

I'm thinking about asking on the #Mastodon issue tracker about introducing inline documentation using #yardoc or #rdoc to public functions on modules and classes.

Was there any issue, discussion or call for this already?

#MastodonDev

Asking about #Ruby again:

Do you know a good overview of how to write documentation using #RDoc?

I can't seem to figure out how to add documentation about return values or parameters to methods.

Learned about #ruby #rdoc this morning :)

thingy.rb

```ruby
# This is the function that does a thingy
def my_thingy
puts "my thingy"
end
```

Rakefile
```ruby
require 'rdoc/task'
task :default => [:rdoc]
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'rdoc'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('/*.rb')
end
```

```bash
> rake
```

Generates searchable documentation, and displays my docs in my editors overlay hints :)