Skip to content

Make sure we also capture full URLs when converting the versioned URLs

Achilleas Pipinellis requested to merge fix-normalize-links-script into master

Overview

In cross-product docs, we're referencing full URLs instead of relative ones. For example, an Omnibus doc can have a doc reference to a Runner doc URL. In that case, we use the full URL, which breaks the versioning capability. For example, if you're browsing a doc like 12.5/development/ and it has a URL to Omnibus, it will not point to the Omnibus 12.5 docs.

This change adds another find command that checks and replaces the version for full URLs as well.

Steps to reproduce the change

The following steps should be run inside the root dir of the gitlab-docs repo:

  1. Stop the nanoc server if it's already running.

  2. Make a copy of the public dir and run adsf to spin up a local web server:

    cp -a public 12.5
    mv 12.5 public
    cd public
    adsf
  3. Go to http://localhost:3000/12.5/ee/install/README.html#installing-gitlab-on-kubernetes-via-the-gitlab-helm-charts, and click on the > Install GitLab on Kubernetes using the GitLab Helm charts. link. It will redirect you to the full URL, which is not the desired outcome.

  4. On another terminal, run the script to change the links:

    ./scripts/normalize-links.sh public 12.5
  5. Once that finishes, refresh http://localhost:3000/12.5/ee/install/README.html#installing-gitlab-on-kubernetes-via-the-gitlab-helm-charts, and click on the > Install GitLab on Kubernetes using the GitLab Helm charts. link. It will redirect you to the correct versioned URL.

  6. Check another link in http://localhost:3000/12.5/charts/#limitations, under database limitations, click the Omnibus link in "MySQL will not be supported, as support is deprecated within GitLab". It will redirect to the right versioned URL.


Closes #454 (closed)

Edited by Achilleas Pipinellis

Merge request reports