Skip to content
This repository was archived by the owner on May 2, 2021. It is now read-only.

Commit 5507e84

Browse files
committed
prevent crawlers from indexing unpublished pages
1 parent c4f3c70 commit 5507e84

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/_includes/head.njk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
<title>{{page_title}}</title>
88
<meta name="author" content="fevr"/>
99
<meta property="og:locale" content="it_IT"/>
10+
{%- if (tags and 'eventi' in tags and published == false) %}
11+
<meta name="robots" content="noindex">
12+
{%- endif %}
1013
{%- set autoDescription %}{{ content | default('') | striptags | truncate(196) | trim }}{%- endset %}
1114
<meta name="description" content="{{ description or autoDescription or site.description }}">
1215
<link rel="canonical" href="{{ site.url }}{{ page.url | replace('index.html','') }}">

0 commit comments

Comments
 (0)