Make the docs URL configurable in admin area
Description
This is a sub-issue of https://gitlab.com/gitlab-org/gitlab-ce/issues/18739.
Removing support of inline docs will render useless many internal links that we use in various UI areas. We need a solution for this.
From https://gitlab.com/gitlab-org/gitlab-ce/issues/18739#note_29211966
Some environments do not allow user workstations to access the internet. A solution to this would be to allow GitLab server admins to modify the URL that /help
leads to and allow admins to host the gitlab-com/gitlab-docs
static site on their own servers.
Proposal
One possible solution
would be to make the docs URL configurable in gitlab.yml
or in GitLab admin area. That way it's
only a matter of setting a default with each release and sysadmins can
always take our docs portal build it on-premise and change the URL to
point to theirs. The default URL would be pointing to docs.gitlab.com.
-
That implies that the helper method
help_page_path
should be modified and change from<gitlab_url>/help/
to<docs_url>/ce/
or<docs_url>/ee/
for CE and EE respectively.Example:
-
= link_to 'Learn more', help_page_path('user/profile/preferences', anchor: 'syntax-highlighting-theme'), target: '_blank'
would render to<gitlab_url>/help/user/profile/preferences.md#syntax-highlighting-theme
. That would need to change to<docs_url>/ce/user/profile/preferences.html#syntax-highlighting-theme
. Notice thehtml
extension.
-
-
All URLs should open in a new link (
target: '_blank'
). -
Handling multiple versions should be taken into account too. What happens if a link on 9.2 points to the latest docs that run 9.7?