diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2021-04-20 14:03:09 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2021-04-26 11:56:49 +0300 |
commit | 1c92127f186205d3ce985dd50ed203d20d28aacf (patch) | |
tree | cfce4872e875ae198e701b2cffbe89b66ba3c49b /layouts/default.html | |
parent | 93396cb5ed66de6f3ada206cfc9243846086343c (diff) |
Add helper that checks the CI_PROJECT_NAME
Check if CI_PROJECT_NAME is 'gitlab-docs', or nil which implies
local development. This can be used to skip portions that we
don't want to render in one of the upstream products.
Diffstat (limited to 'layouts/default.html')
-rw-r--r-- | layouts/default.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/default.html b/layouts/default.html index 28cf7ba5..83556510 100644 --- a/layouts/default.html +++ b/layouts/default.html @@ -14,7 +14,8 @@ <div class="col-0 col-lg-2 pl-0"> <div class="nav-wrapper active"> <aside id="global-nav" class="global-nav"> - <% if ENV['CI_PROJECT_NAME'] == 'gitlab-docs' or ENV['CI_PROJECT_NAME'].nil? %> + <!-- Render the global nav only if CI_PROJECT_NAME is gitlab-docs or is not set --> + <% if gitlab_docs_or_local? %> <%= render '/global_nav.*' %> <% end %> </aside> |