add absolute_url

This commit is contained in:
piharpi
2019-03-24 18:58:45 +07:00
parent a7518df880
commit 2cca438f27

View File

@@ -31,9 +31,9 @@
<meta property="og:url" content="{{ page.url | absolute_url | remove: 'index.html' | remove: '.html'}}"> <meta property="og:url" content="{{ page.url | absolute_url | remove: 'index.html' | remove: '.html'}}">
<meta property="og:description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 200 | escape }}"> <meta property="og:description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 200 | escape }}">
{% if page.image %} {% if page.image %}
<meta property="og:image" content="{{ page.image }}"> <meta property="og:image" content="{{ page.image | absolute_url }}">
{% else %} {% else %}
<meta property="og:image" content="{{ site.image }}"> <meta property="og:image" content="{{ site.image | absolute_url }}">
{% endif %} {% endif %}
<meta property="og:image:width" content="640" /> <meta property="og:image:width" content="640" />
<meta property="og:image:height" content="640" /> <meta property="og:image:height" content="640" />
@@ -44,13 +44,13 @@
<meta name="twitter:creator" content="@{{site.author.username}}"> <meta name="twitter:creator" content="@{{site.author.username}}">
<meta name="twitter:description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 200 | escape }}"/> <meta name="twitter:description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 200 | escape }}"/>
{% if page.image %} {% if page.image %}
<meta name="twitter:image" content="{{ page.image }}"> <meta name="twitter:image" content="{{ page.image | absolute_url }}">
{% else %} {% else %}
<meta name="twitter:image" content="{{ site.image }}"> <meta name="twitter:image" content="{{ site.image | absolute_url }}">
{% endif %} {% endif %}
{% feed_meta %} {% feed_meta %}
<link rel="shortcut icon" type="image/png" sizes="32x32" href="{{ site.icon }}"/> <link rel="shortcut icon" type="image/png" sizes="32x32" href="{{ site.icon | absolute_url }}"/>
<link rel="apple-touch-icon" href="{{ site.icon }}"> <link rel="apple-touch-icon" href="{{ site.icon | absolute_url }}">
<link rel="stylesheet" href="/assets/css/style.css"> <link rel="stylesheet" href="{{ '/assets/css/style.css' | absolute_url }}">
<script async defer src="https://buttons.github.io/buttons.js"></script> <script async defer src="https://buttons.github.io/buttons.js"></script>
</head> </head>