Merge pull request 'Improve metadata for better presentation and semantic' (#19) from tixie/garagehq.deuxfleurs.fr:master into master

Reviewed-on: #19
This commit is contained in:
Alex 2025-03-25 13:52:50 +00:00
commit 1a9aa41a2c
13 changed files with 70 additions and 19 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ public
content/documentation
static/style.css
static/api
.DS_Store

View file

@ -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 = "The Garage team"
avatar = "/images/garage-logo.svg"
[extra.social]

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 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 %}