diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/404.html | 2 | ||||
-rw-r--r-- | layouts/archives.html | 4 | ||||
-rw-r--r-- | layouts/canonical_urls.html | 2 | ||||
-rw-r--r-- | layouts/default.html | 2 | ||||
-rw-r--r-- | layouts/feedback.html | 2 | ||||
-rw-r--r-- | layouts/footer.html | 4 | ||||
-rw-r--r-- | layouts/gtm.html | 2 | ||||
-rw-r--r-- | layouts/head.html | 2 | ||||
-rw-r--r-- | layouts/header.html | 2 | ||||
-rw-r--r-- | layouts/home.html | 2 | ||||
-rw-r--r-- | layouts/instantsearch.html | 2 | ||||
-rw-r--r-- | layouts/versions_dropdown.html | 2 |
12 files changed, 14 insertions, 14 deletions
diff --git a/layouts/404.html b/layouts/404.html index d5cb7c20..3d06accd 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -17,7 +17,7 @@ <%= render '/docsearch.*' %> <script type="application/javascript" src="<%= @items['/assets/javascripts/404.*'].path %>"></script> <script src="<%= @items['/frontend/404/404.*'].path %>"></script> - <% if is_production? %> + <% if production? %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> diff --git a/layouts/archives.html b/layouts/archives.html index 5ba1d825..785178aa 100644 --- a/layouts/archives.html +++ b/layouts/archives.html @@ -13,7 +13,7 @@ <div class="js-article-content"> <%= yield %> </div> - <% if is_production? && ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> + <% if production? && ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> <%# Show Edit button only in production and on the default branch (hide archives) %> <div class="edit-on"> <a class="btn btn-tanuki btn-default" href="<%= edit_on_gitlab(@item) %>" target="_blank" rel="noopener noreferrer">Edit this page</a> @@ -38,7 +38,7 @@ <script type="application/javascript" src="<%= @items['/assets/javascripts/clipboardjs.*'].path %>"></script> <script type="application/javascript" src="<%= @items['/assets/javascripts/badges.*'].path %>"></script> <%= render '/docsearch.*' %> - <% if is_production? %> + <% if production? %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> diff --git a/layouts/canonical_urls.html b/layouts/canonical_urls.html index 94a316ef..b260d426 100644 --- a/layouts/canonical_urls.html +++ b/layouts/canonical_urls.html @@ -16,7 +16,7 @@ if the link doesn't end with README.md or index.md if the link doesn't start with ce use its initial path <% end %> -<% if is_production? %> +<% if production? %> <% if (@item.identifier =~ /(index|README)\.md$/) == 0 %> <% if @item.identifier.to_s.split('/')[1] == 'ce' %> <link rel="canonical" href="<%= @config[:base_url] %>/ee/<%= @item.identifier.to_s.split('/')[2..-2].join('/') %><% unless @item.identifier.to_s.split('/')[2..-2].join('/').length == 0 %>/<% end %>" /> diff --git a/layouts/default.html b/layouts/default.html index 76fabb4e..fc53ca9b 100644 --- a/layouts/default.html +++ b/layouts/default.html @@ -107,7 +107,7 @@ <script type="application/javascript" src="<%= @items['/assets/javascripts/badges.*'].path %>"></script> <%= render '/docsearch.*' %> <script src="<%= @items['/assets/javascripts/mermaid.*'].path %>"></script> - <% if is_production? %> + <% if production? %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> diff --git a/layouts/feedback.html b/layouts/feedback.html index b1c44e7b..6a706982 100644 --- a/layouts/feedback.html +++ b/layouts/feedback.html @@ -15,7 +15,7 @@ <a class="help-and-feedback-link" href="<%= edit_on_gitlab(@item) %>" target="_blank" rel="noopener noreferrer">Edit this page</a> to fix an error or add an improvement in a merge request<br> <a class="help-and-feedback-link" href="https://gitlab.com/gitlab-org/gitlab/-/issues/new?issue[description]=Link%20the%20doc%20and%20describe%20what%20is%20wrong%20with%20it.%0A%0A%3C!--%20Don%27t%20edit%20below%20this%20line%20--%3E%0A%0A%2Flabel%20~Documentation%20~%22docs%5C-comments%22%20&issue[title]=Docs%20feedback:%20Write%20your%20title" target="_blank" rel="noopener noreferrer">Create an issue</a> to suggest an improvement to this doc<br> <%# Show comments only in production and on the default branch (hide archives) %> - <% if @item[:comments].nil? && is_production? && ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> + <% if @item[:comments].nil? && production? && ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> <% unless @item.identifier.to_s.split('/')[1] == 'ce' %> <a class="help-and-feedback-link" href="#" onclick="loadDisqus();return false;">Show and post comments</a> to review and give feedback on this doc <% end %> diff --git a/layouts/footer.html b/layouts/footer.html index 478ca15b..aaa139f7 100644 --- a/layouts/footer.html +++ b/layouts/footer.html @@ -1,7 +1,7 @@ <footer class="pl-4 pr-3 border-top footer"> <div class="row py-2"> <div class="col-9"> - <% if is_production? && ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> + <% if production? && ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> <%# Show Edit button only in production and on the default branch (hide archives) %> <a href="<%= edit_on_gitlab(@item) %>" target="_blank" rel="noopener noreferrer"><span class="text-decoration-underline">Edit this page</span></a> <a href="<%= edit_on_gitlab(@item, editor: :webide) %>" target="_blank" rel="noopener noreferrer">(<span class="text-decoration-underline">Web IDE</span>)</a> @@ -32,7 +32,7 @@ </div> <div class="col-12 py-1"> <ul class="list-unstyled list-inline my-0 d-flex flex-wrap"> - <% if is_production? %> + <% if production? %> <% @config[:products].each do |name, product| %> <% if product[:expose] == true %> <li> diff --git a/layouts/gtm.html b/layouts/gtm.html index 47dd2728..87ebf4cb 100644 --- a/layouts/gtm.html +++ b/layouts/gtm.html @@ -1,4 +1,4 @@ -<% if is_production? and ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> +<% if production? and ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> <%# Adds GTM only in production // leave this immediately after the opening the body tag%> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WZCXKT5" diff --git a/layouts/head.html b/layouts/head.html index 3bdccad1..5bf94d63 100644 --- a/layouts/head.html +++ b/layouts/head.html @@ -39,7 +39,7 @@ <!-- Docsearch https://community.algolia.com/docsearch/ - via CDN --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css"> <!-- end of docsearch --> -<% if is_production? %> +<% if production? %> <%# Adds GTM only in production %> <!-- add cookie consent --> <script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="36a06ac5-ddb4-4f91-8337-067ad19ad8d5" type="text/javascript"></script> diff --git a/layouts/header.html b/layouts/header.html index 52a481a6..5e17af98 100644 --- a/layouts/header.html +++ b/layouts/header.html @@ -23,7 +23,7 @@ <%= render '/versions_dropdown.*' %> </div> </li> - <% if is_production? %> + <% if production? %> <% @config[:products].each do |name, product| %> <% if product[:expose] == true %> <li class="nav-item"> diff --git a/layouts/home.html b/layouts/home.html index 693f79df..f3748154 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -9,7 +9,7 @@ <%= render '/header.*' %> <%= yield %> <%= render '/docsearch.*' %> - <% if is_production? and ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> + <% if production? and ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> diff --git a/layouts/instantsearch.html b/layouts/instantsearch.html index 7c54dea0..3b4c8272 100644 --- a/layouts/instantsearch.html +++ b/layouts/instantsearch.html @@ -28,7 +28,7 @@ <script type="application/javascript" src="<%= @items['/assets/javascripts/badges.*'].path %>"></script> <script src="<%= @items['/frontend/header/index.*'].path %>"></script> <script src="<%= @items['/frontend/search/index.*'].path %>"></script> - <% if is_production? %> + <% if production? %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> diff --git a/layouts/versions_dropdown.html b/layouts/versions_dropdown.html index 3d86bd12..d6a47c8c 100644 --- a/layouts/versions_dropdown.html +++ b/layouts/versions_dropdown.html @@ -24,7 +24,7 @@ Version <% if archives? %> Archives <% else %> - <% if is_production? %> + <% if production? %> <% if ENV['CI_COMMIT_REF_NAME'] == ENV['CI_DEFAULT_BRANCH'] %> <%= dotcom %> <% else %> |