Improve meta data for blog posts

This commit is contained in:
Tixie Salander 2025-03-25 13:38:19 +01:00
parent fc5da9186a
commit 2b751f2a08
Signed by: tixie
SSH key fingerprint: SHA256:Fmc53R1eDiUxOpm8z3laAw4wJzcZUqAnenXUMiltlsU
10 changed files with 70 additions and 20 deletions

View file

@ -1,6 +1,6 @@
base_url = "https://garagehq.deuxfleurs.fr"
title = "Garage HQ"
description = "An open-source distributed object storage service tailored for self-hosting"
description = "An open-source distributed storage service you can self-host to fullfill many needs"
default_language = "en"
output_dir = "public"
compile_sass = true
@ -53,11 +53,14 @@ navbar_items = [
]},
]
[extra.favicon]
[extra.metadata]
favicon_ico = "/favicon.ico"
favicon_svg = "/icons/favicon.svg"
favicon_16x16 = "/icons/favicon-16x16.png"
favicon_32x32 = "/icons/favicon-32x32.png"
apple_touch_icon = "/icons/apple-touch-icon.png"
webmanifest = "/icons/site.webmanifest"
cover_default = "/images/og-default.png"
[extra.organization]
name = "Garage"
@ -67,7 +70,7 @@ logo_simple = "/images/garage-logo-simple.svg"
logo_horizontal = "/images/garage-logo-horizontal.svg"
[extra.author]
name = "Garage"
name = "Garages team"
avatar = "/images/garage-logo.svg"
[extra.social]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 15 KiB

3
static/icons/favicon.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.5 KiB

View file

@ -13,7 +13,7 @@
"type": "image/png"
}
],
"theme_color": "#ffffff",
"theme_color": "#ff9329",
"background_color": "#ffffff",
"display": "browser"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -6,12 +6,13 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="An open-source distributed storage service you can self-host to fullfill many needs.">
<meta name="application-name" content="{{ config.title }}">
{% include "partials/shared/head.html" %}
<title>
{% block title %}{% endblock %}
</title>
{% block meta_html %}
{% include "partials/shared/metadata.html" %}
{% endblock %}
{% include "partials/shared/head.html" %}
</head>
<body class="has-background-white">

View file

@ -3,6 +3,9 @@
{% block title %}
{{ page.title }} | Garage blog
{% endblock %}
{% block meta_html %}
{% include "partials/shared/metadata-article.html" %}
{% endblock %}
{% block content %}
<section id="blogpost-section" class="section">

View file

@ -1,18 +1,19 @@
{% if config.extra.favicon.webmanifest %}
<link href='{{ config.extra.favicon.webmanifest }}' rel="manifest" />
{% if current_url %}
<link rel="canonical" href="{{ current_url }}">
{% endif %}
{% if config.extra.favicon.favicon_16x16 %}
<link href='{{ config.extra.favicon.favicon_16x16 }}' rel="icon" sizes="16x16" type="image/png" />
{% endif %}
{% if config.extra.favicon.favicon_32x32 %}
<link href='{{ config.extra.favicon.favicon_32x32 }}' rel="icon" sizes="32x32" type="image/png" />
{% endif %}
{% if config.extra.favicon.apple_touch_icon %}
<link href='{{ config.extra.favicon.apple_touch_icon }}' rel="apple-touch-icon" sizes="180x180" />
{% endif %}
<link href="{{ get_url(path='style.css') }}" rel="stylesheet" />
<!-- Web app -->
<meta name="theme-color" content="#ff9329">
<meta name="color-scheme" content="light only">
<meta name="application-name" content="{{ config.title }}">
<link href='{{ config.extra.metadata.webmanifest }}' rel="manifest" />
<!-- Icons -->
<link rel="shortcut icon" href="{{ config.extra.metadata.favicon_ico }}" />
<link rel="icon" type="image/svg+xml" href="{{ config.extra.metadata.favicon_svg }}" />
<link href='{{ config.extra.metadata.favicon_16x16 }}' rel="icon" sizes="16x16" type="image/png" />
<link href='{{ config.extra.metadata.favicon_32x32 }}' rel="icon" sizes="32x32" type="image/png" />
<link href='{{ config.extra.metadata.apple_touch_icon }}' rel="apple-touch-icon" sizes="180x180" />
<link href="{{ get_url(path='style.css') }}" rel="stylesheet" />
{% block user_custom_stylesheet %}{% endblock %}
{% if config.extra.katex.enabled %}

View file

@ -0,0 +1,22 @@
<meta name="description" content="{{ page.summary | striptags | truncate(length=150, end="") | safe }}">
<meta name="author" content="{{ config.extra.author.name }}">
<meta property="og:author" content="{{ config.extra.author.name }}">
<!-- structured (micro)data -->
<meta itemprop="description" content="{{ page.summary | striptags | truncate(length=150, end="") | safe }}">
<meta itemprop="author" content="{{ config.extra.author.name }}">
<!-- Open Graph -->
<meta property="og:site_name" content="{{ config.extra.organization.name }} blog">
<meta property="og:title" content="{{ page.title }} | Garage blog">
<meta property="og:description" content="{{ page.summary | striptags | truncate(length=150, end="") | safe }}">
<meta property="og:type" content="article">
<meta property="article:author" content="{{ config.extra.author.name }}">
<meta property="article:published_time" content="{{ page.date | date(format='%Y-%m-%dT%H:%M:%S%.3fZ') }}">
{% if current_url %}
<meta property="og:url" content="{{ current_url }}">
<meta property="og:image" content="{{ config.base_url }}{{ config.extra.metadata.cover_default }}">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="650">
<meta property="og:image:alt" content="Garage, an open-source distributed object storage service tailored for self-hosting">
{% endif %}

View file

@ -0,0 +1,17 @@
<meta name="description" content="{{ config.description }}">
<meta name="author" content="{{ config.extra.author.name }}">
<!-- structured (micro)data -->
<meta property="og:site_name" content="{{ config.extra.organization.name }}">
<meta itemprop="description" content="{{ config.description }}">
<meta itemprop="author" content="{{ config.extra.author.name }}">
<!-- Open Graph -->
<meta property="og:title" content="{% if page and page.title %}{{ page.title }}{% elif section and section.title %}{{ section.title }}{% else %}{{ config.extra.author.name}} - {{ config.description}}{% endif %}">
<meta property="og:type" content="website">
{% if current_url %}
<meta property="og:url" content="{{ current_url }}">
<meta property="og:image" content="{{ config.base_url }}{{ config.extra.metadata.cover_default }}">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="650">
<meta property="og:image:alt" content="Garage, an open-source distributed object storage service tailored for self-hosting">
{% endif %}