Allow specifying noindex for robots (#841)

Co-authored-by: Mimi <stevenjoezhang@gmail.com>
This commit is contained in:
Alliot 2024-11-03 14:22:41 +08:00 committed by GitHub
parent acec1cf182
commit c8bf953545
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,9 @@
{%- set canonical = canonical | replace(r/\.html$/, '') %}
{%- endif %}
<link rel="canonical" href="{{ canonical }}">
{%- if page.noindex %}
<meta name="robots" content="noindex">
{%- endif %}
{# Exports some front-matter variables to Front-End #}
{# https://hexo.io/docs/variables.html #}
{{ next_data('page', next_config_unique()) }}