diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2019-09-12 08:53:50 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-09-12 08:53:50 +0300 |
commit | 7873250cd0f3ddd950df3b59cf738f19765180e3 (patch) | |
tree | 4cc96327f23dc0694fd504a2bf97111217c21655 /layouts/head.html | |
parent | f957411078857d2ed72afaeb0f7f3ae1fb1e43c4 (diff) |
Add Docsearch language and version meta tags
This will help us have different searches based on version
Diffstat (limited to 'layouts/head.html')
-rw-r--r-- | layouts/head.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/head.html b/layouts/head.html index 16981378..7abdd32c 100644 --- a/layouts/head.html +++ b/layouts/head.html @@ -13,6 +13,13 @@ <% if @item[:noindex] %> <meta name="robots" content="noindex nofollow"> <% end %> +<!--https://community.algolia.com/docsearch/required-configuration.html#introduces-global-information-as-meta-tags--> +<meta name="docsearch:language" content="en" /> +<% if !ENV['CI_COMMIT_REF_NAME'].nil? and stable_version?(ENV['CI_COMMIT_REF_NAME']) %> +<meta name="docsearch:version" content="<%= ENV['CI_COMMIT_REF_NAME'] %>" /> +<% else %> +<meta name="docsearch:version" content="master" /> +<% end %> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <link rel="stylesheet" href="<%= @items['/assets/stylesheets/stylesheet.*'].path %>"> <link rel="stylesheet" href="<%= @items['/assets/stylesheets/highlight.*'].path %>"> |