Skip to content

Commit

Permalink
chore: add noindex meta tag (#16016)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Jun 21, 2022
1 parent db387a8 commit f4dad59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/.eleventy.js
Expand Up @@ -49,6 +49,7 @@ module.exports = function(eleventyConfig) {

eleventyConfig.addGlobalData("site_name", siteName);
eleventyConfig.addGlobalData("GIT_BRANCH", process.env.BRANCH);
eleventyConfig.addGlobalData("NOINDEX", process.env.BRANCH !== "latest");
eleventyConfig.addDataExtension("yml", contents => yaml.load(contents));

//------------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions docs/src/_includes/layouts/base.html
Expand Up @@ -5,6 +5,9 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if NOINDEX %}
<meta name="robots" content="noindex">
{% endif %}
{% if title %}
{% set page_title = title %}
{% else %}
Expand Down

0 comments on commit f4dad59

Please sign in to comment.