Skip to content

Commit

Permalink
Allow specifying noindex for robots (#841)
Browse files Browse the repository at this point in the history
Co-authored-by: Mimi <[email protected]>
  • Loading branch information
AlliotTech and stevenjoezhang authored Nov 3, 2024
1 parent acec1cf commit c8bf953
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layout/_partials/head/head-unique.njk
Original file line number Diff line number Diff line change
Expand Up @@ -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()) }}
Expand Down

0 comments on commit c8bf953

Please sign in to comment.