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 | 8 | ||||
-rw-r--r-- | layouts/footer.html | 2 | ||||
-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, 16 insertions, 16 deletions
diff --git a/layouts/404.html b/layouts/404.html index 59ad2d5b..56a4e96b 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -19,7 +19,7 @@ <%= render '/docsearch.*' %> <script type="application/javascript" src="<%= @items['/assets/javascripts/404.*'].path %>"></script> <script src="<%= @items['/frontend/404/404.*'].path %>"></script> - <% if ENV['NANOC_ENV'] == 'production' %> + <% if is_production? %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> diff --git a/layouts/archives.html b/layouts/archives.html index 30a934ca..e5636ef1 100644 --- a/layouts/archives.html +++ b/layouts/archives.html @@ -12,7 +12,7 @@ <div class="js-article-content"> <%= yield %> </div> - <% if ENV['NANOC_ENV'] == 'production' && ENV['CI_COMMIT_REF_NAME'] == 'master' %> + <% if is_production? && ENV['CI_COMMIT_REF_NAME'] == 'master' %> <%# Show Edit button only in production and on master branch (hide archives) %> <div class="edit-on"> <a class="btn btn-tanuki btn-default" href="<%= edit_on_gitlab(@item) %>">Edit this page</a> @@ -36,7 +36,7 @@ <script type="application/javascript" src="<%= @items['/assets/javascripts/badges.*'].path %>"></script> <%= render '/footer.*' %> <%= render '/docsearch.*' %> - <% if ENV['NANOC_ENV'] == 'production' %> + <% if is_production? %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> diff --git a/layouts/canonical_urls.html b/layouts/canonical_urls.html index 1b73967b..94a316ef 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 ENV['NANOC_ENV'] == 'production' %> +<% if is_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 33afb234..20c90920 100644 --- a/layouts/default.html +++ b/layouts/default.html @@ -77,7 +77,7 @@ <script type="application/javascript" src="<%= @items['/assets/javascripts/badges.*'].path %>"></script> <%= render '/docsearch.*' %> <%= render '/mermaid.*' %> - <% if ENV['NANOC_ENV'] == 'production' %> + <% if is_production? %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> diff --git a/layouts/feedback.html b/layouts/feedback.html index f0e4634a..82f36a16 100644 --- a/layouts/feedback.html +++ b/layouts/feedback.html @@ -13,9 +13,9 @@ <div> <h5 class="help-and-feedback-heading">Docs</h5> <a class="help-and-feedback-link" href="<%= edit_on_gitlab(@item) %>" target="_blank">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[title]=Docs%20feedback:%20Write%20your%20title&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" target="_blank">Create an issue</a> to suggest an improvement to this doc<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">Create an issue</a> to suggest an improvement to this doc<br> <%# Show comments only in production and on master branch (hide archives) %> - <% if @item[:comments].nil? && ENV['NANOC_ENV'] == 'production' && ENV['CI_COMMIT_REF_NAME'] == 'master' %> + <% if @item[:comments].nil? && is_production? && ENV['CI_COMMIT_REF_NAME'] == 'master' %> <% 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 %> @@ -25,8 +25,8 @@ <div class="mt-3"> <h5 class="help-and-feedback-heading">Product</h5> - <a class="help-and-feedback-link" href="https://gitlab.com/gitlab-org/gitlab/issues/new?issue[title]=Docs%20-%20product%20feedback:%20Write%20your%20title&issue[description]=Describe%20what%20you%20would%20like%20to%20see%20improved.%0A%0A%3C!--%20Don%27t%20edit%20below%20this%20line%20--%3E%0A%0A%2Flabel%20~%22docs%5C-comments%22%20" target="_blank">Create an issue</a> if there's something you don't like about this feature<br> - <a class="help-and-feedback-link" href="https://gitlab.com/gitlab-org/gitlab/issues/new?issuable_template=Feature%20proposal&issue[title]=Docs%20feedback%20-%20feature%20proposal:%20Write%20your%20title" target="_blank">Propose functionality</a> by submitting a feature request<br> + <a class="help-and-feedback-link" href="https://gitlab.com/gitlab-org/gitlab/-/issues/new?issue[description]=Describe%20what%20you%20would%20like%20to%20see%20improved.%0A%0A%3C!--%20Don%27t%20edit%20below%20this%20line%20--%3E%0A%0A%2Flabel%20~%22docs%5C-comments%22%20&issue[title]=Docs%20-%20product%20feedback:%20Write%20your%20title" target="_blank">Create an issue</a> if there's something you don't like about this feature<br> + <a class="help-and-feedback-link" href="https://gitlab.com/gitlab-org/gitlab/-/issues/new?issuable_template=Feature%20proposal&issue[title]=Docs%20feedback%20-%20feature%20proposal:%20Write%20your%20title" target="_blank">Propose functionality</a> by submitting a feature request<br> <a class="help-and-feedback-link" href="https://about.gitlab.com/community/gitlab-first-look/" target="_blank">Join beta testing</a> to help shape new features </div> diff --git a/layouts/footer.html b/layouts/footer.html index 8a74cc88..24fbd432 100644 --- a/layouts/footer.html +++ b/layouts/footer.html @@ -5,7 +5,7 @@ <a href='https://gitlab.com/gitlab-org/gitlab-docs' target='_blank'>Created</a> with Nanoc, hosted on <a href='https://about.gitlab.com/stages-devops-lifecycle/pages/' target='_blank'>GitLab Pages</a> <a href='https://creativecommons.org/licenses/by-sa/4.0/' target='_blank' rel="license" alt="Creative Commons License"><img src='/assets/images/by-sa.svg'></a> <a href='/cookies-policy/' alt='Cookies Policy'>Cookies Policy</a> - <% if ENV['NANOC_ENV'] == 'production' && ENV['CI_COMMIT_REF_NAME'] == 'master' %> + <% if is_production? && ENV['CI_COMMIT_REF_NAME'] == 'master' %> <%# Show Edit button only in production and on master branch (hide archives) %> <div class="edit-on"> <i class="fa fa-code-fork" aria-hidden="true"></i> diff --git a/layouts/gtm.html b/layouts/gtm.html index 65f242c4..fcd29abf 100644 --- a/layouts/gtm.html +++ b/layouts/gtm.html @@ -1,4 +1,4 @@ -<% if ENV['NANOC_ENV'] == 'production' and ENV['CI_COMMIT_REF_NAME'] == 'master' %> +<% if is_production? and ENV['CI_COMMIT_REF_NAME'] == 'master' %> <%# 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 4f7a0204..4aa0a16f 100644 --- a/layouts/head.html +++ b/layouts/head.html @@ -32,7 +32,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 ENV['NANOC_ENV'] == 'production' %> +<% if is_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 a666fb10..81a18fca 100644 --- a/layouts/header.html +++ b/layouts/header.html @@ -24,7 +24,7 @@ <div class="version-dropdown-mobile"> <%= render '/versions_dropdown.*' %> </div> - <% if ENV['NANOC_ENV'] == 'production' %> + <% if is_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 d4a5636d..b08d4659 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -10,7 +10,7 @@ <%= render '/header.*' %> <%= yield %> <%= render '/docsearch.*' %> - <% if ENV['NANOC_ENV'] == 'production' and ENV['CI_COMMIT_REF_NAME'] == 'master' %> + <% if is_production? and ENV['CI_COMMIT_REF_NAME'] == 'master' %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> diff --git a/layouts/instantsearch.html b/layouts/instantsearch.html index 3d0b89e2..6f33c3a9 100644 --- a/layouts/instantsearch.html +++ b/layouts/instantsearch.html @@ -22,7 +22,7 @@ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> <script type="application/javascript" src="<%= @items['/assets/javascripts/badges.*'].path %>"></script> <%= render '/footer.*' %> - <% if ENV['NANOC_ENV'] == 'production' %> + <% if is_production? %> <%# Add analytics only in production %> <%= render '/analytics.*' %> <% end %> diff --git a/layouts/versions_dropdown.html b/layouts/versions_dropdown.html index 6decfec3..9fee13f7 100644 --- a/layouts/versions_dropdown.html +++ b/layouts/versions_dropdown.html @@ -17,7 +17,7 @@ Version <% if archives? %> Archives <% else %> - <% if ENV['NANOC_ENV'] == 'production' %> + <% if is_production? %> <%= ENV['CI_COMMIT_REF_NAME'] == 'master' ? 'GitLab.com' : ENV['CI_COMMIT_REF_NAME'] %> <% else %> Versions |