Skip to content

Make the version dropdown links point to the document you're currently on

Achilleas Pipinellis requested to merge versions-full-links into master

Part of https://gitlab.com/gitlab-com/gitlab-docs/issues/238 // gitlab-com&20 (closed)

Implementation

Screenshot_2018-10-15_404_not_found_I_say_you_

Drawback

But then, this has some shortcomings: if a page is new, it won't exist in previous versions, so having the full URL would lead to 404. Also, what if the page existed in the old version but has since been renamed? This is difficult to solve with Nanoc's full URL solution, because we have to check if a file exists in a branch every time.

Example

  1. I am on https://docs.gitlab.com/ee/user/project/pages/index.html
  2. If I click on the 11.3 version I get to https://docs.gitlab.com/11.3/
  3. I should go to https://docs.gitlab.com/11.3/ee/user/project/pages/index.html
Edited by Marcia Ramos

Merge request reports