From c8bf9535454116dedd0e220141f58ffd75fda717 Mon Sep 17 00:00:00 2001 From: Alliot <24980252+AlliotTech@users.noreply.github.com> Date: Sun, 3 Nov 2024 14:22:41 +0800 Subject: [PATCH] Allow specifying noindex for robots (#841) Co-authored-by: Mimi --- layout/_partials/head/head-unique.njk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layout/_partials/head/head-unique.njk b/layout/_partials/head/head-unique.njk index 8994944..517ff48 100644 --- a/layout/_partials/head/head-unique.njk +++ b/layout/_partials/head/head-unique.njk @@ -12,7 +12,9 @@ {%- set canonical = canonical | replace(r/\.html$/, '') %} {%- endif %} - +{%- if page.noindex %} + +{%- endif %} {# Exports some front-matter variables to Front-End #} {# https://hexo.io/docs/variables.html #} {{ next_data('page', next_config_unique()) }}