Initial commit
This commit is contained in:
commit
73c6b816c0
716 changed files with 170045 additions and 0 deletions
5
site/snippets/favicon.twig
Normal file
5
site/snippets/favicon.twig
Normal file
|
@ -0,0 +1,5 @@
|
|||
<!-- Favicon -->
|
||||
<link rel="icon" sizes="any" href="assets/favicon/xiao-wang-favicon.ico">
|
||||
<link rel="icon" type="image/svg+xml" href="assets/favicon/xiao-wang-favicon.svg">
|
||||
<link rel="apple-touch-icon" href="assets/favicon/xiao-wang-apple-touch-icon.png">
|
||||
<link rel="manifest" href="assets/favicon/xiao-wang.webmanifest">
|
73
site/snippets/metadata.twig
Normal file
73
site/snippets/metadata.twig
Normal file
|
@ -0,0 +1,73 @@
|
|||
<!-- Basic metadata -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<html lang="fr">
|
||||
|
||||
<!-- Schema -->
|
||||
<style itemscope itemtype="https://schema.org/WebSite" itemref="schema_name schema_description schema_image"></style>
|
||||
|
||||
<!-- Title -->
|
||||
<title>{{ site.title }} | {{ page.title }}</title>
|
||||
<meta id="schema_name" itemprop="name" content="{{ site.title }} | {{ page.title }}">
|
||||
|
||||
<!-- Description -->
|
||||
{% if page.meta_description is not empty %}
|
||||
<meta name="description" content="{{ page.meta_description }}">
|
||||
<meta id="schema_description" itemprop="description" content="{{ page.meta_description }}">
|
||||
{% elseif site.homePage.meta_description is not empty %}
|
||||
<meta name="description" content="{{ site.homePage.meta_description }}">
|
||||
<meta id="schema_description" itemprop="description" content="{{ site.homePage.meta_description }}">
|
||||
{% endif %}
|
||||
|
||||
<!-- Canonical URL -->
|
||||
<link rel="canonical" href="{{ page.url }}">
|
||||
|
||||
<!-- Author -->
|
||||
<meta name="author" content="{{ site.title }}">
|
||||
|
||||
<!-- Date -->
|
||||
<meta name="date" content="{{ page.modified('Y-m-d') }}">
|
||||
|
||||
<!-- Image -->
|
||||
{% if page.meta_image is not empty %}
|
||||
<meta id="schema_image" itemprop="image" content="{{ page.meta_image.toImage.url }}">
|
||||
{% elseif site.homePage.meta_image is not empty %}
|
||||
<meta id="schema_image" itemprop="image" content="{{ site.homePage.meta_image.toImage.url }}">
|
||||
{% endif %}
|
||||
|
||||
{% if page.template != 'error' %}
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:title" content="{{ site.title ~ ' | ' ~ page.title }}">
|
||||
{% if page.meta_description is not empty %}
|
||||
<meta property="og:description" content="{{ page.meta_description }}">
|
||||
{% elseif site.homePage.meta_description is not empty %}
|
||||
<meta property="og:description" content="{{ site.homePage.meta_description }}">
|
||||
{% endif %}
|
||||
{% if page.meta_image is not empty %}
|
||||
<meta property="og:image" content="{{ page.meta_image.toImage.clip(1200, 675).url }}">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="675">
|
||||
{% elseif site.homePage.meta_image is not empty %}
|
||||
<meta property="og:image" content="{{ site.homePage.meta_image.toImage.clip(1200, 675).url }}">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="675">
|
||||
{% endif %}
|
||||
<meta property="og:url" content="{{ page.url }}">
|
||||
<meta property="og:type" content="{{ page.og_type }}">
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="{{ page.twitter_card_type.value }}">
|
||||
<meta name="twitter:title" content="{{ site.title ~ ' | ' ~ page.title }}">
|
||||
{% if page.meta_description is not empty %}
|
||||
<meta name="twitter:description" content="{{ page.meta_description }}">
|
||||
{% elseif site.homePage.meta_description is not empty %}
|
||||
<meta name="twitter:description" content="{{ site.homePage.meta_description }}">
|
||||
{% endif %}
|
||||
{% if page.meta_image is not empty %}
|
||||
<meta name="twitter:image" content="{{ page.meta_image.toImage.clip(1200, 675).url }}">
|
||||
{% elseif site.homePage.meta_image is not empty %}
|
||||
<meta name="twitter:image" content="{{ site.homePage.meta_image.toImage.clip(1200, 675).url }}">
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue