rouge icon indicating copy to clipboard operation
rouge copied to clipboard

Docs unclear on what "theme" variable is expected.

Open ian-kelling opened this issue 9 years ago • 7 comments

Docs introduce themes like this:

# Get some CSS
Rouge::Themes::Base16.mode(:light).render(scope: '.highlight')
# Or use Theme#find with string input
Rouge::Theme.find('base16.light').render(scope: '.highlight')

Then say you can do this

Rouge::Formatters::HTMLInline.new(theme)

ok, so what exactly do I put as "theme" here? It's quite unclear. First, I try Rouge::Themes::Base16.mode(:light). No, that leads to an exception even though it's the most obvious thing from what is documented so far. Next, I try Rouge::Theme.find('base16.light'), next, 'base16.light', next, dig through the code and find out Rouge::Themes::Base16.mode(:light).new works ...

And it would be really nice to document what themes there are and their arguments, again had to dig through the source code, or at least point people where in the source code to go...

ian-kelling avatar Jul 31 '16 08:07 ian-kelling

+1, this needs to be added. I've struggled until i fould your comment.

gokaykucuk avatar Apr 04 '17 13:04 gokaykucuk

This contribution has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days.

stale[bot] avatar Jun 19 '19 16:06 stale[bot]

@ian-kelling Thanks for this. One of the things I'm working towards is better documentation and this is a good example of what should go in there. Much appreciated!

pyrmont avatar Jun 19 '19 19:06 pyrmont

This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days. If you would like this issue to remain open, please reply and let us know if the issue is still reproducible.

stale[bot] avatar Jun 18 '20 23:06 stale[bot]

This is still on my list.

pyrmont avatar Jun 19 '20 02:06 pyrmont

This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days. If you would like this issue to remain open, please reply and let us know if the issue is still reproducible.

stale[bot] avatar Jan 03 '22 21:01 stale[bot]

Doesn't seem i can reopen this, but i think it should be left open.

ian-kelling avatar Apr 16 '22 14:04 ian-kelling