Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2018-03-23 16:26:13 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2018-03-23 16:26:13 +0300
commite3984c342e48ab8de7d78965c8d5a48174f9d8d9 (patch)
treec0bae38ff479558784a861b53f332431d6065425
parentd7c6b0d2e7ebf7688b9ba8822bcda96121151a69 (diff)
Show comments only on master branch (exclude archives)
-rw-r--r--layouts/disqus.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/disqus.html b/layouts/disqus.html
index 34a0b578..3c6eff15 100644
--- a/layouts/disqus.html
+++ b/layouts/disqus.html
@@ -1,4 +1,5 @@
-<% if @item[:comments].nil? && ENV['NANOC_ENV'] == 'production' %>
+<%# 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' %>
<% unless @item.identifier.to_s.split('/')[1] == 'ce' %>
<div class="comments">
<p><em>Leave a comment below if you have any feedback on the documentation. For support and other enquiries, see <a href="https://about.gitlab.com/getting-help/" target="_blank">getting help</a>.</em></p>