this repo has no description
1{#- TODO:
2 - [x] add rss
3 - [x] favicons
4 - [x] media preview
5 - [ ] twitter
6 - [ ] maybe google adsense
7 -#}
8
9{% macro fonts() %}
10 <link rel="preload" href="{{ get_url(path="/assets/fonts/FiraCode-Regular.woff2") }}" as="font" type="font/woff2" crossorigin="anonymous">
11 <link rel="preload" href="{{ get_url(path="/assets/fonts/FiraCode-Bold.woff2") }}" as="font" type="font/woff2" crossorigin="anonymous">
12{% endmacro fonts %}
13
14{% macro styling() %}
15 <link rel="stylesheet" href="{{ get_url(path="style.css", cachebust=true) }}">
16 {% if config.extra.theme_color != "orange" -%}
17 {% set color = "color/" ~ config.extra.theme_color ~ ".css" -%}
18 <link rel="stylesheet" href="{{ get_url(path=color, cachebust=true) }}">
19 {%- else -%}
20 <link rel="stylesheet" href=" {{ get_url(path="color/orange.css", cachebust=true) }}">
21 {% endif %}
22 {%- if config.extra.custom_css is defined -%}
23 <link rel="stylesheet" href="{{ get_url(path="custom.css", cachebust=true) }}">
24 {% endif %}
25{% endmacro styling %}
26
27{% macro favicon() %}
28 {%- if config.extra.favicon is defined -%}
29 <link rel="shortcut icon" href="{{ get_url(path=config.extra.favicon) }}" type="image/x-icon" />
30 {%- endif -%}
31{% endmacro favicon %}
32
33{% macro rss() %}
34 {%- if config.generate_feed -%}
35 <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }} RSS" href="{{ get_url(path=config.feed_filename) }}">
36 {%- endif -%}
37{% endmacro rss %}
38
39{% macro general_meta() %}
40 <meta http-equiv="content-type" content="text/html; charset=utf-8">
41 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
42 {%- if page.title -%}
43 <meta name="description" content="{{ config.description }} {{ page.title }} {{ page.description }}"/>
44 {%- else -%}
45 <meta name="description" content="{{ config.description }}"/>
46 {%- endif -%}
47
48 {%- if page.taxonomies.tags or page.taxonomies.categories -%}
49 <meta name="keywords" content="
50 {%- if page.taxonomies.categories -%}
51 {%- for cat in page.taxonomies.categories -%}
52 {{ cat }}, {% endfor -%}
53 {%- endif -%}
54
55 {%- if page.taxonomies.tags -%}
56 {%- for tag in page.taxonomies.tags -%}
57 {%- if loop.last -%}
58 {{ tag }}
59 {%- else -%}
60 {{ tag }}, {% endif -%}
61 {%- endfor -%}
62 {%- endif -%}
63 " />
64 {%- endif -%}
65{% endmacro general_meta %}
66
67{% macro katex() %}
68{% if config.extra.enable_katex %}
69 <link rel="stylesheet" href="{{ get_url(path="assets/katex/katex.min.css") }}">
70
71 <script defer type="text/javascript" src="{{ get_url(path="assets/katex/katex.min.js") | safe }}"></script>
72 <script defer type="text/javascript" src="{{ get_url(path="assets/katex/mathtex-script-type.min.js") | safe }}"></script>
73
74 <script defer src="{{ get_url(path="assets/katex/auto-render.min.js") | safe }}"
75 onload="renderMathInElement(document.body, {
76 delimiters: [
77 {left: '$$', right: '$$', display: true},
78 {left: '$', right: '$', display: false},
79 {left: '\\(', right: '\\)', display: false},
80 {left: '\\[', right: '\\]', display: true}
81 ]
82 });"></script>
83{% endif %}
84{% endmacro katek %}