2023-09-09 19:20:39 +02:00
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
|
|
|
|
<meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
|
|
|
<meta name="robots" content="index, follow">
|
|
|
|
{% if page.title %}
|
|
|
|
{% set title = page.title %}
|
|
|
|
{% elif section.title %}
|
|
|
|
{% set title = section.title %}
|
|
|
|
{% elif config.title %}
|
|
|
|
{% set title = config.title %}
|
|
|
|
{% endif %}
|
|
|
|
{% if page.extra.author %}
|
|
|
|
{% set author = page.extra.author %}
|
|
|
|
{% elif section.extra.author %}
|
|
|
|
{% set author = section.extra.author %}
|
|
|
|
{% elif config.extra.author %}
|
|
|
|
{% set author = config.extra.author %}
|
|
|
|
{% endif %}
|
|
|
|
{% if page.description %}
|
|
|
|
{% set description = page.description | truncate(length=150) %}
|
|
|
|
{% elif section.description %}
|
|
|
|
{% set description = section.description | truncate(length=150) %}
|
|
|
|
{% elif config.description %}
|
|
|
|
{% set description = config.description | truncate(length=150) %}
|
|
|
|
{% endif %}
|
|
|
|
{% if page.extra.image %}
|
|
|
|
{% set image = get_url(path=page.extra.image, trailing_slash=false) %}
|
|
|
|
{% elif section.extra.image %}
|
|
|
|
{% set image = get_url(path=section.extra.image, trailing_slash=false) %}
|
|
|
|
{% elif config.extra.favicon %}
|
|
|
|
{% set image = get_url(path=config.extra.favicon, trailing_slash=false) %}
|
|
|
|
{% endif %}
|
|
|
|
{% if page.permalink %}
|
|
|
|
{% set url = page.permalink %}
|
|
|
|
{% elif section.permalink %}
|
|
|
|
{% set url = section.permalink %}
|
|
|
|
{% elif config.base_url %}
|
|
|
|
{% set url = config.base_url %}
|
|
|
|
{% endif %}
|
|
|
|
{% if title %}
|
2023-12-22 02:37:07 +01:00
|
|
|
{% if title == config.title %}
|
2023-09-09 19:20:39 +02:00
|
|
|
<title>{{ title }}</title>
|
2023-12-22 02:37:07 +01:00
|
|
|
{% else %}
|
|
|
|
<title>{{config.title }} :: {{ title }}</title>
|
|
|
|
{% endif %}
|
2023-09-09 19:20:39 +02:00
|
|
|
{% endif %}
|
|
|
|
{% block metatags %}
|
|
|
|
{% if title %}
|
|
|
|
<meta name="title" content="{{ title }}">
|
|
|
|
{% endif %}
|
|
|
|
{% if author %}
|
|
|
|
<meta name="author" content="{{ author }}">
|
|
|
|
{% endif %}
|
|
|
|
{% if description %}
|
|
|
|
<meta name="description" content="{{ description }}">
|
|
|
|
{% endif %}
|
|
|
|
<meta property="og:type" content="website">
|
|
|
|
<meta property="og:url" content="{{ url | safe }}">
|
|
|
|
{% if title %}
|
|
|
|
<meta property="og:site_name" content="{{ config.title }}">
|
|
|
|
{% endif %}
|
|
|
|
{% if title %}
|
|
|
|
<meta property="og:title" content="{{ title }}">
|
|
|
|
{% endif %}
|
|
|
|
{% if description %}
|
|
|
|
<meta property="og:description" content="{{ description }}">
|
|
|
|
{% endif %}
|
|
|
|
{% if image %}
|
|
|
|
<meta property="og:image" content="{{ image }}">
|
|
|
|
{% endif %}
|
|
|
|
{% set twitter_card = config.extra.twitter_card | default(value=true) %}
|
|
|
|
{% if twitter_card != false %}
|
|
|
|
<meta property="twitter:card" content="summary_large_image">
|
|
|
|
<meta property="twitter:url" content="{{ url | safe }}">
|
|
|
|
{% if title %}
|
|
|
|
<meta property="twitter:title" content="{{ title }}">
|
|
|
|
{% endif %}
|
|
|
|
{% if description %}
|
|
|
|
<meta property="twitter:description" content="{{ description }}">
|
|
|
|
{% endif %}
|
|
|
|
{% if image %}
|
|
|
|
<meta property="twitter:image" content="{{ image }}">
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
<link rel="canonical" href="{{ url | safe }}">
|
|
|
|
{% if image %}
|
|
|
|
<link rel="shortcut icon" type="image/x-icon" href="{{ get_url(path=config.extra.favicon, trailing_slash=false) }}">
|
|
|
|
{% endif %}
|
|
|
|
{% endblock metatags %}
|
|
|
|
{% if config.generate_feed %}
|
|
|
|
{% block feed %}
|
|
|
|
<link rel="alternate" type="application/atom+xml" title="RSS" href="{{ get_url(path="atom.xml", trailing_slash=false) }}">
|
|
|
|
{% endblock feed %}
|
|
|
|
{% endif %}
|
|
|
|
{% block css %}
|
|
|
|
<link rel="stylesheet" href="{{ get_url(path='css/style.css', trailing_slash=false) | safe }}"/>
|
2023-12-22 02:37:07 +01:00
|
|
|
<link rel="stylesheet" href="{{ get_url(path='logo.css', trailing_slash=false) | safe }}"/>
|
2023-10-06 00:02:23 +02:00
|
|
|
{% endblock css %}
|
2023-12-22 01:07:32 +01:00
|
|
|
<script>
|
|
|
|
const setTheme = (theme) => {
|
|
|
|
document.documentElement.className = theme;
|
|
|
|
localStorage.setItem('theme', theme);
|
|
|
|
}
|
|
|
|
|
|
|
|
const hasCodeRun = localStorage.getItem('hasCodeRun');
|
|
|
|
|
|
|
|
if (!hasCodeRun) {
|
|
|
|
const defaultTheme = "{{ config.extra.default_theme }}";
|
|
|
|
setTheme(defaultTheme);
|
|
|
|
localStorage.setItem('hasCodeRun', 'true');
|
|
|
|
}
|
|
|
|
|
|
|
|
const getTheme = () => {
|
|
|
|
const theme = localStorage.getItem('theme');
|
|
|
|
if (theme) {
|
|
|
|
setTheme(theme);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
getTheme();
|
|
|
|
</script>
|
2023-11-08 00:19:50 +01:00
|
|
|
|