2022-08-10 20:15:30 +00:00
|
|
|
{% import "macros/macros.html" as post_macros %}
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
|
|
{% set current_path = current_path | default(value="/") %}
|
|
|
|
|
|
|
|
{# Favicon #}
|
|
|
|
{% if config.extra.favicon %}
|
|
|
|
{% set favicon_ext = config.extra.favicon | split(pat=".") | last %}
|
2022-08-14 17:05:27 +00:00
|
|
|
<link rel="icon" type="image/{{ favicon_ext }}" href="{{ get_url(path=config.extra.favicon, cachebust=true) }}" />
|
2022-08-10 20:15:30 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2022-10-17 01:26:11 +00:00
|
|
|
{% for font in config.extra.fonts %}
|
|
|
|
{% for style in ["Bold", "BoldItalic", "Italic", "Regular"] %}
|
|
|
|
{% set font_path = 'font/' ~ font.path ~ '/' ~ font.name ~ '-' ~ style ~ '.woff2' %}
|
|
|
|
<link rel="preload" href="{{ get_url(path=font_path) }}" as="font" type="font/woff2" crossorigin>
|
2022-08-10 20:15:30 +00:00
|
|
|
{% endfor %}
|
2022-10-17 01:26:11 +00:00
|
|
|
{% endfor %}
|
|
|
|
<link href="{{ get_url(path='style/fonts.css', cachebust=true) }}" rel="stylesheet preload" as="style" />
|
2022-08-10 20:15:30 +00:00
|
|
|
|
|
|
|
{# RSS #}
|
2022-08-13 04:45:26 +00:00
|
|
|
<link rel="alternate" type="application/atom+xml" title="{{ config.title }}"
|
|
|
|
href="{{ get_url(path='atom.xml', trailing_slash=false) }}">
|
2022-08-10 20:15:30 +00:00
|
|
|
|
|
|
|
{# Theme #}
|
2022-10-17 02:49:16 +00:00
|
|
|
<link rel="stylesheet preload" as="style" type="text/css"
|
|
|
|
href="{{ get_url(path='style/theme/light.css', cachebust=true) }}" />
|
|
|
|
<link rel="stylesheet preload" as="style" type="text/css"
|
|
|
|
href="{{ get_url(path='style/theme/dark.css', cachebust=true) }}" media="(prefers-color-scheme: dark)" />
|
2022-08-10 20:15:30 +00:00
|
|
|
|
2022-10-17 02:49:16 +00:00
|
|
|
<link rel="stylesheet preload" as="style" type="text/css" media="screen"
|
|
|
|
href="{{ get_url(path='style/main.css', cachebust=true) }}" />
|
2022-08-10 20:15:30 +00:00
|
|
|
|
|
|
|
{% if config.extra.stylesheets %}
|
|
|
|
{% for stylesheet in config.extra.stylesheets %}
|
2022-08-13 23:47:29 +00:00
|
|
|
<link rel="stylesheet" href="{{ get_url(path=stylesheet, cachebust=true) }}">
|
2022-08-10 20:15:30 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2022-08-28 06:41:20 +00:00
|
|
|
|
2022-09-16 16:31:23 +00:00
|
|
|
{% if current_path == "/" %}
|
|
|
|
{% set current_title = config.title | default(value="home") %}
|
|
|
|
{% set current_description = "the personal site of mat ess" %}
|
|
|
|
{% set hero = false %}
|
|
|
|
{% else %}
|
|
|
|
{% set current_title = page.title | default(value=config.title) | default(value="post") %}
|
|
|
|
{% set current_description = page.description | default(value="from the personal site of mat ess") %}
|
|
|
|
{% set hero = page.extra.hero | default(value=false) %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{# Meta links #}
|
|
|
|
<title>{{ current_title }}</title>
|
2022-08-28 06:41:20 +00:00
|
|
|
<link rel="canonical" href="{{ get_url(path=current_path) }}" />
|
2022-09-16 16:31:23 +00:00
|
|
|
<meta name="title" content="{{ current_title }}">
|
|
|
|
<meta name="description" content="{{ current_description }}">
|
|
|
|
|
|
|
|
{# Open Graph / Facebook #}
|
|
|
|
<meta property="og:type" content="website">
|
|
|
|
<meta property="og:title" content="{{ current_title }}">
|
|
|
|
<meta property="og:description" content="{{ current_description }}">
|
|
|
|
{% if hero %}
|
2022-10-17 01:26:11 +00:00
|
|
|
<meta property="og:image" content="{{ get_url(path=current_path) }}/hero.webp">
|
2022-09-16 16:31:23 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{# Twitter #}
|
|
|
|
<meta property="twitter:card" content="summary_large_image">
|
|
|
|
<meta property="twitter:title" content="{{ current_title }}">
|
|
|
|
<meta property="twitter:description" content="{{ current_description }}">
|
|
|
|
{% if hero %}
|
2022-10-17 01:26:11 +00:00
|
|
|
<meta property="twitter:image" content="{{ get_url(path=current_path) }}/hero.webp">
|
2022-09-16 16:31:23 +00:00
|
|
|
{% endif %}
|
2022-08-10 20:15:30 +00:00
|
|
|
</head>
|