Skip to content
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

Local documentation is ugly #27

Closed
tfausak opened this issue Jul 12, 2013 · 1 comment
Closed

Local documentation is ugly #27

tfausak opened this issue Jul 12, 2013 · 1 comment
Assignees
Labels

Comments

@tfausak
Copy link
Collaborator

tfausak commented Jul 12, 2013

<span class="line-numbers"><a href="#n1" name="n1">1</a></span>gem 'active_interaction', '~> 0.1.0'

This is basically because we switched to kramdown (due to #9). Everything looks find on RubyDoc.info (which is weird), but locally it looks like garbage.

@ghost ghost assigned tfausak Jul 15, 2013
@tfausak
Copy link
Collaborator Author

tfausak commented Jul 15, 2013

It just occurred to me why everything looks fine on RubyDoc.info: they're using RedCarpet. We could use RedCarpet in MRI and kramdown in JRuby, but that's definitely a hack:

if RUBY_PLATFORM == 'java'
  spec.add_development_dependency 'kramdown'
else
  spec.add_development_dependency 'redcarpet'
end

(We'd also have to remove --markup-provider=kramdown from .yardopts. It'll just use whatever's available.)

I surveyed YARD's Markdown providers. BlueCloth, RDiscount, RedCarpet, and Ruby PEG Markdown all use C libraries behind the scenes, so they're out. That leaves kramdown, Maruku, and RDoc. Maruku doesn't support either fenced code block syntax, so it's out. RDoc appears to work reasonably well with the following caveats:

  • It doesn't support tilde-fenced code blocks.
  • It shows the badges as text links, which isn't a big deal for local documentation. ("Image links are not generated correctly")
  • Code blocks are syntax highlighted in JRuby, but they lose indentation.

So between kramdown and RDoc, I think RDoc is the winner.

tfausak added a commit that referenced this issue Nov 4, 2014
This should populate our documentation on RubyDoc.info.

See also #27 and #9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant