{"issue":{"created_at":"2011-12-09T14:10:45Z","state":"open","updated_at":"2011-12-09T14:10:45Z","comments":0,"user":{"gravatar_id":"5d38ab152e1e3e219512a9859fcd93af","id":1075,"url":"https://api.github.com/users/dchelimsky","avatar_url":"https://secure.gravatar.com/avatar/5d38ab152e1e3e219512a9859fcd93af?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"dchelimsky"},"body":"### tl; dr\r\n\r\nReferences to rubydoc.info in other publications are usually about the subject of the docs, not the docs themselves. Since the docs improve from version to version, links within the current version should exclude the version number in the URL, providing the reader with the most up-to-date documentation for the given subject.\r\n\r\n### The problem\r\n\r\nDocumentation for any library improves over time, from version to version. If I go to http://rubydoc.info/gems/rspec-core/ and click on Hooks I end up at http://rubydoc.info/gems/rspec-core/2.7.1/RSpec/Core/Hooks. If you follow that link, you'll see, well, not much. Now go to http://rubydoc.info/github/rspec/rspec-core and click on Hooks, which takes you to http://rubydoc.info/github/rspec/rspec-core/master/RSpec/Core/Hooks. When I release 2.8, that's the documentation that will be linked to from http://rubydoc.info/gems/rspec-core/. It's not only better, it's actually existent!\r\n\r\nThe problem is that someone who is referencing these docs in a blog post or a tweet is very likely to grab the version-specific URL as/is and post it, which means it is soon linking to stale documentation.\r\n\r\nNow one might argue that if you're referencing something you want to reference _that_ thing, but I think that's only the case when the documentation itself is the subject of the blog or tweet. Most of the time it's the thing being documented that is the subject, in which case something is lost by linking to the version-specific doc.\r\n\r\n### Proposed solution\r\n\r\nrubydoc.info renders the current version if there is no version in the URL. Since it knows which version is the current version, it could use that knowledge to render links differently for the current version than older versions - without the version number in the URL.\r\n\r\nOlder versions would render version-specific links. For that to work, when a new version is published, the docs for the previous version would have to be re-generated. Additional overhead, yes, but it seems like a fair tradeoff to me.\r\n\r\nIdeally, we'd also account for links that point to docs that existed in older versions but no longer exist in the current version. In that case, we'd either need to redirect to front of the current version with some flash-like message explaining what happened, or index the old versions and find the most recent version that still has that content.","assignee":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2501808,"number":40,"labels":[],"title":"more intelligent linking","closed_at":null,"html_url":"https://github.com/lsegal/rubydoc.info/issues/40","url":"https://api.github.com/repos/lsegal/rubydoc.info/issues/40","milestone":null},"action":"opened"}