File size: 2,270 Bytes
2409829
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{% extends "base.html" %}

{%- block head -%}{%- set page = page | default(value = section) -%}
{%- set title = "Blog | " ~ page.title -%}
{%- set meta_title = page.title -%}
{%- set meta_image = page.extra.banner_png | safe -%}
{%- set meta_article_type = true -%}
{%- set meta_description = page.extra.summary | default(value = page.content | striptags | safe | linebreaksbr | replace(from = "<br>", to = " ") | replace(from = "  ", to = " ") | trim | truncate(length = 200)) -%}
{%- set css = ["/template/article.css", "/layout/reading-material.css"] -%}
{%- endblock head -%}

{%- block content -%}{%- set page = page | default(value = section) -%}
<section class="reading-material">
	<div class="block">
		<div class="details">
			<h1 class="headline">{{ page.title }}</h1>
			<span class="publication">By {{ page.extra.author }}. {{ page.date | date(format = "%B %d, %Y", timezone="America/Los_Angeles") }}.</span>
			<img class="banner" src="{{ page.extra.banner | safe }}" onerror="this.onerror = null; this.src = this.src.replace('.avif', '.png')" />
		</div>
		<article>
			{{ page.content | safe }}
		</article>
		{% if page.extra.reddit or page.extra.twitter %}
		<hr />
		<div class="social">
			{% if page.extra.reddit %}
			<a href="{{ page.extra.reddit | safe }}" target="_blank" class="button arrow">
				<img src="https://static.graphite.rs/icons/reddit__2.svg" /><span>Discuss on Reddit</span>
			</a>
			{% endif %}
			{% if page.extra.twitter %}
			<a href="{{ page.extra.twitter | safe }}" target="_blank" class="button arrow">
				<img src="https://static.graphite.rs/icons/twitter.svg" /><span>Twitter</span>
			</a>
			{% endif %}
			{% if page.extra.bluesky %}
			<a href="{{ page.extra.bluesky | safe }}" target="_blank" class="button arrow">
				<img src="https://static.graphite.rs/icons/bluesky.svg" /><span>Bluesky</span>
			</a>
			{% endif %}
		</div>
		{% endif %}
	</div>
</section>
{%- if not page.summary -%}
{{ throw(message = "------------------------------------------------------------> ARTICLE HAS NO SUMMARY! After the first paragraph (or two short ones), a `<!-- more -->` comment must be inserted in the markdown. Otherwise the blog page would be missing its preview text." | safe) }}
{%- endif -%}
{%- endblock content -%}