feat: Improve metadata, add blog descriptions

This commit is contained in:
daudix-UFO
2023-10-19 23:50:28 +00:00
parent 6242b721f2
commit bb7b4ead29
11 changed files with 112 additions and 105 deletions

View File

@ -16,26 +16,31 @@
<h2>
<a class="link-page" href="{{ page.permalink | safe }}">{{ page.title }}</a>
</h2>
<small>
<time datetime="{{ page.date | date(format='%+') }}" pubdate>
{{- page.date | date(format=config.extra.date_format) -}}
</time>
{%- if page.taxonomies %}
{%- for name, taxon in page.taxonomies %}
{%-for item in taxon %}
<a class="link-tag" href="{{ get_taxonomy_url(kind=name, name=item) }}">
<svg class="link-icon" viewBox="0 0 16 16" width="16" height="16">
<path
fill="currentColor"
d="M4 0C1.785 0 0 1.785 0 4v3.09c0 .847.336 1.66.938 2.262l5.382 5.382c.93.934 2.43.934 3.36 0l4.965-4.964c.98-.98.98-2.56 0-3.54L9.227.812A2.777 2.777 0 0 0 7.266 0H4zm0 2h3.266c.207 0 .402.082.546.227l5.418 5.418a.512.512 0 0 1 0 .71L8.266 13.32a.38.38 0 0 1-.532 0L2.352 7.937A1.198 1.198 0 0 1 2 7.09V4c0-1.098.902-2 2-2zm.5 1a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z"
/>
</svg>
{{ item }}
</a>&nbsp;
{%- if page.description %}
<p>{{ page.description }}</p>
{%- endif %}
{%- if page.date %}
<small>
<time datetime="{{ page.date | date(format='%+') }}" pubdate>
{{- page.date | date(format=config.extra.date_format) -}}
</time>
{%- if page.taxonomies %}
{%- for name, taxon in page.taxonomies %}
{%-for item in taxon %}
<a class="link-tag" href="{{ get_taxonomy_url(kind=name, name=item) }}">
<svg class="link-icon" viewBox="0 0 16 16" width="16" height="16">
<path
fill="currentColor"
d="M4 0C1.785 0 0 1.785 0 4v3.09c0 .847.336 1.66.938 2.262l5.382 5.382c.93.934 2.43.934 3.36 0l4.965-4.964c.98-.98.98-2.56 0-3.54L9.227.812A2.777 2.777 0 0 0 7.266 0H4zm0 2h3.266c.207 0 .402.082.546.227l5.418 5.418a.512.512 0 0 1 0 .71L8.266 13.32a.38.38 0 0 1-.532 0L2.352 7.937A1.198 1.198 0 0 1 2 7.09V4c0-1.098.902-2 2-2zm.5 1a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z"
/>
</svg>
{{ item }}
</a>&nbsp;
{%- endfor %}
{%- endfor %}
{%- endfor %}
{%- endif %}
</small>
{%- endif %}
</small>
{%- endif %}
</article>
{% endfor %} {% endblock content %}

View File

@ -3,23 +3,34 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="{{ config.extra.primary_color }}" />
<link rel="canonical" href="{{ current_url | default(value='/') }}" />
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
<title>
{% if page.title %} {{ page.title }} - {{ config.title }}
{% elif section.title %} {{ section.title }} - {{ config.title }}
{% else %} {{ config.title }} {% endif %}
</title>
<link href="{{ get_url(path='style.css') }}" rel="stylesheet" />
{% if config.extra.stylesheets %}
{% for stylesheet in config.extra.stylesheets %}
<link href="{{ get_url(path=stylesheet) }}" rel="stylesheet">
{% endfor %}
{% endif %}
<link href="{{ get_url(path='custom.css') }}" rel="stylesheet" />
{% if config.extra.animated_favicon %}
<link rel="icon" type="image/gif" href="{{ config.base_url }}/favicon.gif" />
<link rel="icon" type="image/gif" href="{{ get_url(path='favicon.gif') }}" />
{% else %}
<link rel="icon" type="image/png" href="{{ config.base_url }}/favicon.png" />
<link rel="icon" type="image/png" href="{{ get_url(path='favicon.png') }}" />
{% endif %}
<link rel="apple-touch-icon" sizes="180x180" href="{{ config.base_url }}/apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="180x180" href="{{ get_url(path='apple-touch-icon.png') }}" />
<link rel="me" href="https://{{ config.extra.comments.host }}/@{{ config.extra.comments.user }}" />
<!-- Open Graph -->
<meta property="og:title" content="{{ config.title }}" />
<meta property="og:url" content="{{ config.base_url }}" />
<meta property="og:description" content="{{ config.description }}" />
<meta property="og:image" content="{{ config.base_url }}/card.png" />
<meta property="og:site_name" content="{{ config.title }}" />
<meta property="og:title" content="{{ page.title | default(value=config.title) }}" />
<meta property="og:url" content="{{ current_url | default(value='/') }}" />
<meta property="og:description" content="{{ page.description | default(value=config.description) }}" />
<meta property="og:image" content="{{ get_url(path='card.png') }}" />
</head>

View File

@ -5,22 +5,22 @@
</a>
<ul>
{% for link in config.extra.nav.links %}
<li>
<a href="{{link.url}}">{{link.name}}</a>
</li>
<li>
<a href="{{link.url}}">{{link.name}}</a>
</li>
{% endfor %}
{% if config.extra.nav.show_feed %}
<li>
<a href="{{ config.base_url }}/atom.xml">
<svg class="link-icon" viewBox="0 0 16 16" width="16" height="16">
<path
fill="currentColor"
d="M1.988 1.988V3c.008.547.453.984 1 .988.004-.004.008-.004.012-.004v.028A8.977 8.977 0 0 1 11.988 13a.991.991 0 0 0 1 .984h1V13h-.004c0-.004 0-.004.004-.008C13.984 7.02 9.184 2.148 3.242 2.02A1.004 1.004 0 0 0 3 1.988v-.004zm0 4V7c.008.547.453.984 1 .988.004-.004.008-.004.012-.004V8a4.985 4.985 0 0 1 4.996 4.844 1.002 1.002 0 0 0 .988 1.145c.008-.005.012-.005.016-.005v.004h.984V13H10c0-3.793-3.047-6.898-6.82-6.992 0-.004-.004-.004-.004-.004A.892.892 0 0 0 3 5.988v-.004zm2 4a1.999 1.999 0 1 0-.002 3.998 1.999 1.999 0 0 0 .002-3.998zm0 0"
/>
</svg>
Feed
</a>
</li>
<li>
<a href="{{ config.base_url }}/atom.xml">
<svg class="link-icon" viewBox="0 0 16 16" width="16" height="16">
<path
fill="currentColor"
d="M1.988 1.988V3c.008.547.453.984 1 .988.004-.004.008-.004.012-.004v.028A8.977 8.977 0 0 1 11.988 13a.991.991 0 0 0 1 .984h1V13h-.004c0-.004 0-.004.004-.008C13.984 7.02 9.184 2.148 3.242 2.02A1.004 1.004 0 0 0 3 1.988v-.004zm0 4V7c.008.547.453.984 1 .988.004-.004.008-.004.012-.004V8a4.985 4.985 0 0 1 4.996 4.844 1.002 1.002 0 0 0 .988 1.145c.008-.005.012-.005.016-.005v.004h.984V13H10c0-3.793-3.047-6.898-6.82-6.992 0-.004-.004-.004-.004-.004A.892.892 0 0 0 3 5.988v-.004zm2 4a1.999 1.999 0 1 0-.002 3.998 1.999 1.999 0 0 0 .002-3.998zm0 0"
/>
</svg>
Feed
</a>
</li>
{% endif %}
</ul>
</div>