rails / sdoc

Standalone sdoc generator
http://api.rubyonrails.org/
Other
823 stars 131 forks source link

Page per method #203

Open zzak opened 1 year ago

zzak commented 1 year ago

Methods are currently only accessible from the anchor links on class and module pages.

A common request is to have a specific page for each method, this might also help improve SEO results.

chris-hewitt commented 5 months ago

I just stumbled across this thread and noticed the concern about SEO, and that we might still be unsure what the problem is.

Isn't the main problem that the guides are constantly linking to new URLs? For example, on https://guides.rubyonrails.org/routing.html:

Forgive me if this has already been discussed elsewhere!

p8 commented 5 months ago

Hmm, interesting @chris-hewitt We might want to add a case here when running the current version: https://github.com/rails/rails/blob/316338acf76c34b529e7d883a916ace798ad8efa/guides/rails_guides/markdown/renderer.rb#L136

Although it could be we move the last version of the guides to a version subdir whenever a new version is released. We prefer to link to the same version of the API docs from the guides.

chris-hewitt commented 5 months ago

I think that's spot on, @p8. We could still link [versioned guide] -> [versioned api] as these are essentially archived docs of specific rails versions. But if the current pages are all "clean" urls linking to other "clean" urls, I think that might make a difference. This is covered more here, here, here.

Other things to consider: