diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2020-05-19 12:28:17 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2020-05-19 12:28:17 +0300 |
commit | b216dd3b184826c8fea84188a573491eac640c7d (patch) | |
tree | 5562cf3921fad7a8be77959989e48aae42e705f1 /layouts/archives.html | |
parent | 331aab2e833538b551dbc39a667d8cb5a2826094 (diff) |
Extract check of production in its own function
Diffstat (limited to 'layouts/archives.html')
-rw-r--r-- | layouts/archives.html | 4 |
1 files changed, 2 insertions, 2 deletions
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 %> |