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/canonical_urls.html | |
parent | 331aab2e833538b551dbc39a667d8cb5a2826094 (diff) |
Extract check of production in its own function
Diffstat (limited to 'layouts/canonical_urls.html')
-rw-r--r-- | layouts/canonical_urls.html | 2 |
1 files changed, 1 insertions, 1 deletions
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 %>" /> |