Skip to content

Commit

Permalink
improve: 在没有配置 subtitle 时主页标题后不显示分隔符
Browse files Browse the repository at this point in the history
  • Loading branch information
AkarinZ authored and xzhih committed Apr 6, 2020
1 parent 171b83f commit 121fdd1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layout/_partials/head.swig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="preconnect" href="//9qpuwspm.api.lncld.net">
<link rel="preconnect" href="//gravatar.loli.net">

<title>{% if title %}{{ title }}{% else %}{{ config.title }}{% endif %} | {% if is_home() %}{{ config.subtitle }}{% else %}{{ config.title }}{% endif %}</title>
<title>{% if title %}{{ title }}{% else %}{{ config.title }}{% endif %}{% if is_home() %}{% if config.subtitle %} | {{ config.subtitle }}{% endif %}{% else %} | {{ config.title }}{% endif %}</title>

<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
Expand Down Expand Up @@ -64,7 +64,7 @@

<meta property="og:site_name" content="{{ config.title }}">
<meta property="og:type" content="{% if is_post() %}article{% else %}blog{% endif %}">
<meta property="og:title" content="{% if title %}{{ title }}{% else %}{{ config.title }}{% endif %} | {% if is_home() %}{{ config.subtitle }}{% else %}{{ config.title }}{% endif %}">
<meta property="og:title" content="{% if title %}{{ title }}{% else %}{{ config.title }}{% endif %}{% if is_home() %}{% if config.subtitle %} | {{ config.subtitle }}{% endif %}{% else %} | {{ config.title }}{% endif %}">
<meta property="og:description" content="{% if is_post() %}{{ page.description }}{% else %}{{ config.description }}{% endif %}">
<meta property="og:url" content="{{ config.url }}{{ url_for(page.path) }}">

Expand Down Expand Up @@ -93,4 +93,4 @@
{% endif %}

{# {% include "public/json-ld.swig" %} #}
</head>
</head>

0 comments on commit 121fdd1

Please sign in to comment.