Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add noindex meta tag #16016

Merged
merged 1 commit into from Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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