Api.rubyonrails.org sidebar rendering

This is a minor annoyance but the sidebar for api.rubyonrails.org has been a little wonky for a few months at least.

I’m pretty sure I could fix it myself if someone could point me in the right direction! I can’t find a repo if this is open source.

2 Likes

This should be fixed in 6.0.3 (current stable), and edge guides too (master). Do you still see it?

1 Like

Now fixed, thank you! Just curious, is the code for the site open? Is it built from the Rails repo? Who hosts it?

1 Like

I believe it’s powered by SDoc

1 Like

Just curious, is the code for the site open?

Yes, all is open.

Is it built from the Rails repo?

The content of the API comes from the RDoc documentation written in the source code of Rails itself.

The command to generate the Rails documentation is rake rdoc in the root folder, which is a one liner that delegates the RDoc configuration to these classes.

As @malomalo said, nowadays we use SDoc, and that is where the sidebar issue was fixed.

How do you actually generate edge docs every time there is a push to master? How do you generate docs if there’s a new release? How do you know if the command for Rails 4 was that one or something different (they evolve with time)? All that knowledge and automations is encoded in rails/rails-docs/server.

We have a pure Rack webhook that initiates all this when GitHub triggers it.

So, the process is. A push happens, the webhook is called, the docs server notices it has to build stuff, update the local checkout, generate edge, detect if there is a new stable release tag, in that case generate, and manage a tree of symlinks. All this is programmed in rails/rails-docs-server.

Who hosts it?

I do.

If you sponsor hosting, it is fair to acknowledge so putting a logo or something. I do not want to push a brand in the mind of Rails programmers. To resolve this personal conflict, I decided to pay for the server myself.

This server also runs Rails Contributors.

7 Likes

I didn’t even know there was a sidebar. :neutral_face: Googling something and getting to api.rubyonrails.org doesn’t show it, just the individual page you’re looking at.

Is this a frame thing?

Yes, that’s a frame thing.

I have an open PR to remove the frames:

https://github.com/zzak/sdoc/pull/137

1 Like

Wow… I was half joking about this. I find it hard to believe that any kind of large site is still using frames in 2020. :open_mouth: If we can fix this, that would be awesome!