Skip to content

Commit

Permalink
code: 禁止/page编入索引
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Lord committed May 12, 2024
1 parent f0adda0 commit 5cb90ef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!--SEO-->
{%- include snippets/get-article-title.html article=page -%}
<title>{%- if __return -%}{{ __return }} - {{ site.title }}{%- else -%}{{ site.title }}{%- endif -%}</title>
<meta property="og:title" content="{%- if __return -%}{{ __return }} - {{ site.title }}{%- else -%}{{ site.title }}{%- endif -%}" />

<meta name="description" content="{%- if page.excerpt -%}{{ page.excerpt | strip_html | strip_newlines | strip | truncate: 160 }}{%- else -%}{{ site.website_meta_description }}{%- endif -%}">
<meta property="og:description" content="{%- if page.excerpt -%}{{ page.excerpt | strip_html | strip_newlines | strip | truncate: 160 }}{%- else -%}{{ site.website_meta_description }}{%- endif -%}">
<meta property="twitter:description" content="{%- if page.excerpt -%}{{ page.excerpt | strip_html | strip_newlines | strip | truncate: 160 }}{%- else -%}{{ site.website_meta_description }}{%- endif -%}">

<link rel="canonical" href="{%- include snippets/page-url.html -%}">

<!--站点RSS-->
{%- assign _paths_rss = site.paths.rss | default: site.data.variables.default.paths.rss -%}
{%- include snippets/get-nav-url.html path=_paths_rss -%}
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ __return }}">


{%- if layout.articles.data_source == 'paginator.posts' -%}
<meta name="robots" content="noindex">
{%- endif -%}

{%- include head/favicon.html -%}

{%- include head/custom.html -%}
Expand Down

0 comments on commit 5cb90ef

Please sign in to comment.