ruby / rdoc

RDoc produces HTML and online documentation for Ruby projects.
https://ruby.github.io/rdoc/
Other
844 stars 439 forks source link

New theme? #1182

Open antoinem opened 1 month ago

antoinem commented 1 month ago

Hello,

We’ve started a new theme derived from Darkfish. You can see how it looks here: https://basesecrete.github.io/rdoc/

As you can see, there are already quite a few changes (navigation, typography, colors, dark mode…). We wanted to check if there was some interest, before we spend more time on it.

What do you think?

Cheers, Antoine and Alexis

st0012 commented 1 month ago

Thank you for proposing this 🙌
I'm open to accept new optional themes and here's my thought on this topic:

WDYT? @colby-swandale

A few notes to this PR:

alexisbernard commented 1 month ago

Thanks for the feedback. I have extracted super_classes into its own PR.

I'm not familiar with js best practices, but my understanding is that darkfish.js unlikely to follow much of them. So I'd love to see new theme implementations not following its pattern unless necessary. I know it may be already on your roadmap, but I want to explicitly point it out.

We don't have specific plan for the JS. I think the less JS it contains, the better it is. We only added few lines of JS compared to Darkfish. Otherwise it could share the JS with Darkfish, but it would be more fragile.

colby-swandale commented 1 month ago

This template ticks several boxes of things people would like to see in darkhorse, particularly Table of Contents navigation & Dark Mode, the new Rails documentation site shows this off well. Introducing a new HTML template would add quite a significant load to maintain, so I would more like to see us pluck these features into darkhorse.

antoinem commented 1 month ago

I've deleted the new theme folder and copied the changes in the darkfish theme folder.

st0012 commented 1 month ago

Introducing a new HTML template would add quite a significant load to maintain, so I would more like to see us pluck these features into darkhorse.

@colby-swandale It's darkfish, not darkhorse 🙂 While I agree it'll be hard to maintain, I don't think it's a good idea to suddenly accept a theme overhaul when it'll be directly synced to docs.ruby-lang.org. I strongly prefer having this PR just add a new theme, potentially marking it as experimental, then decide what to do next depends on how rorvswild and darkfish are updated later.

simi commented 1 month ago

IMHO good idea to keep it separate as well for some time and switch defaults at some point with major bump or so.

colby-swandale commented 1 month ago

Apologies, my suggestion has gotten lost in translation I think. I wasn't suggesting that the entire Darkfish template be replaced, Instead I was suggesting plucking specific features from this Pull Requests into new PRs that can be added to darkfish like Table of Contents, Dark mode etc. Of course any new changes to Darkfish will need to consider the existing theme and make suitable adjustments.

miguno commented 1 month ago

+1

This is IMHO a significant improvement over the status quo. Thanks a lot for your work!

alexisbernard commented 1 month ago

We moved the theme into it's own gem (https://github.com/BaseSecrete/rorvswild-theme-rdoc), so anyone can use it without waiting for merging.

If you would like to have it directly into RDoc, we will be very happy to update the PR.