mirror of
https://github.com/andwati/andwati.com.git
synced 2026-12-03 13:48:46 +00:00
init1
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{# Override base title to use a 404-specific title. #}
|
||||
{% block title %}404 Not Found{% endblock title %}
|
||||
|
||||
{# Override base meta tags to use 404-specific ones. I can't set an og:url
|
||||
because I don't know what URL will be served this template. #}
|
||||
{% block meta %}
|
||||
<meta name="description" content="404 Not Found">
|
||||
<meta property="og:site_name" content="andwati.github.io">
|
||||
<meta property="og:locale" content="en-us">
|
||||
<meta property="og:title" content="404 Not Found">
|
||||
<meta property="og:description" content="404 Not Found">
|
||||
<meta property="og:image" content="https://andwati.github.io/self.webp">
|
||||
<meta property="twitter:card" content="summary">
|
||||
<meta property="twitter:site" content="@andwati_">
|
||||
<meta property="twitter:title" content="404 Not Found">
|
||||
<meta property="twitter:description" content="404 Not Found">
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.webp">
|
||||
{% endblock meta %}
|
||||
|
||||
{# Again, since I dont't know ahead of time what page will be served the this
|
||||
template. Best we can do is replace the canonical link with a blank. #}
|
||||
{% block links %}{% endblock links %}
|
||||
|
||||
{# Override base content to use 404-specific content. #}
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>404 Not Found</h1>
|
||||
</header>
|
||||
<figure>
|
||||
<video src="404.mp4" type="video/mp4" autoplay loop controls></video>
|
||||
<figcaption>
|
||||
Video from <a href="https://www.sakugabooru.com/post/show/165603">sakugabooru</a>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</main>
|
||||
{% include "_partials/footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,9 @@
|
||||
<div>
|
||||
<script src="https://utteranc.es/client.js"
|
||||
repo="andwati/andwati.github.io"
|
||||
issue-term="title"
|
||||
theme="gruvbox-dark"
|
||||
crossorigin="anonymous"
|
||||
async>
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,20 @@
|
||||
<footer>
|
||||
<nav>
|
||||
<a href="/">Home</a>
|
||||
⬡
|
||||
<a href="/posts">Posts</a>
|
||||
⬡
|
||||
<a href="/tags">Tags</a>
|
||||
|
||||
⬡
|
||||
<a href="/archive">Archive</a>
|
||||
⬡
|
||||
<a href="/contact">Contact</a>
|
||||
</nav>
|
||||
<p>
|
||||
© 2022 - {{ now() | date(format="%Y") }} Ian Andwati ⬡
|
||||
<a href="https://github.com/andwati/andwati.github.io">Source</a>
|
||||
⬡
|
||||
<a href="/rss.xml">Feed</a><a rel="me" href="https://twitter.com/andwati_" style="display: none">Twitter</a>
|
||||
</p>
|
||||
</footer>
|
||||
@@ -0,0 +1,83 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{% if page.extra.meta %}
|
||||
<!-- the meta data config goes here -->
|
||||
{% for data in page.extra.meta %}
|
||||
<meta
|
||||
{% for key, value in data%}
|
||||
{% if key == "property" and value == "og:title"%}
|
||||
{% set_global page_has_og_title = true -%}
|
||||
{% endif %}
|
||||
{% if key == "property" and value == "og:description"%}
|
||||
{% set_global page_has_og_description = true -%}
|
||||
{% endif %}
|
||||
{% if key == "name" and value == "description"%}
|
||||
{% set_global page_has_description = true -%}
|
||||
{% endif %}
|
||||
{{ key }}="{{ value }}"
|
||||
{% endfor %}
|
||||
/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if current_path == "/" %}
|
||||
<title>
|
||||
{{ config.title | default(value="Home") }}
|
||||
</title>
|
||||
{% if not page_has_og_title %}
|
||||
<meta property="og:title" content="{{ config.title | default(value="Home") }}" />
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<title>
|
||||
{% if page.title %} {{ page.title }}
|
||||
{% elif config.title %} {{ config.title }}
|
||||
{% else %} Post {% endif %}
|
||||
</title>
|
||||
|
||||
{% if not page_has_og_title %}
|
||||
<meta property="og:title" content="{% if page.title -%}{{ page.title }}{% elif config.title -%}{{ config.title }}{% else -%}Post{% endif -%}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if not page_has_og_description %}
|
||||
{% if page.description %}
|
||||
<meta property="og:description" content="{{ page.description }}" />
|
||||
{% elif config.description %}
|
||||
<meta property="og:description" content="{{ config.description }}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if not page_has_description %}
|
||||
{% if page.description %}
|
||||
<meta name="description" content="{{ page.description }}" />
|
||||
{% elif config.description %}
|
||||
<meta name="description" content="{{ config.description }}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.favicon %}
|
||||
<link rel="icon" type="image/png" href={{ config.extra.favicon }} />
|
||||
{% endif %}
|
||||
|
||||
{# opengraph, twitter_cards #}
|
||||
|
||||
|
||||
{% if config.extra.useCDN | default(value=false) %}
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@1,500&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
|
||||
{% else %}
|
||||
<link href={{ get_url(path="css/fonts.css") }} rel="stylesheet" />
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href={{ get_url(path="/main.css") }} />
|
||||
|
||||
|
||||
|
||||
|
||||
<script data-goatcounter="https://andwati.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
@@ -0,0 +1 @@
|
||||
<a href="#{{ id }}" aria-label='Anchor link for: {{ id }}'></a>
|
||||
@@ -0,0 +1,26 @@
|
||||
{% extends "section.html" %}
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>Archive</h1>
|
||||
</header>
|
||||
{% set section = get_section(path="posts/_index.md") %}
|
||||
{% for year, posts in section.pages
|
||||
| sort(attribute="date")
|
||||
| reverse
|
||||
| group_by(attribute="year") %}
|
||||
<div class="archive">
|
||||
<h2>{{ year }}</h2>
|
||||
<ul>
|
||||
{% for post in posts %}
|
||||
<li>
|
||||
<time>{{ post.date | date(format="%d-%h") }}</time>
|
||||
<a href="{{ post.permalink }}">{{ post.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</main>
|
||||
{% include "_partials/footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}{{ section.title }}{% endblock title %}</title>
|
||||
<meta name="author" content="{{ config.extra.author }}">
|
||||
{% block meta %}
|
||||
<meta name="description" content="{{ section.description }}">
|
||||
<meta property="og:site_name" content="andwati.github.io">
|
||||
<meta property="og:locale" content="en-us">
|
||||
<meta property="og:url" content="{{ section.permalink }}">
|
||||
<meta property="og:title" content="{{ section.title }}">
|
||||
<meta property="og:description" content="{{ section.description }}">
|
||||
<meta property="og:type" content="profile">
|
||||
<meta property="og:image" content="https://andwati.github.io/self.webp">
|
||||
<meta property="twitter:card" content="summary">
|
||||
<meta property="twitter:site" content="@andwati_">
|
||||
<meta property="twitter:title" content="{{ section.title }}">
|
||||
<meta property="twitter:description" content="{{ section.description }}">
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.webp">
|
||||
{% endblock meta %}
|
||||
<link rel="dns-prefetch" href="https://fonts.googleapis.com/">
|
||||
<link rel="stylesheet" href="/site.css">
|
||||
<link rel="shortcut icon" href="/favicon.svg" type="image/svg+xml">
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ section.permalink }}">
|
||||
{% endblock links %}
|
||||
<script data-goatcounter="https://andwati.goatcounter.com/count"
|
||||
async src="//gc.zgo.at/count.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="{{ get_url(path='katex.min.css') }}">
|
||||
<script defer src="{{ get_url(path='js/katex.min.js') }}"></script>
|
||||
<script defer src="{{ get_url(path='js/auto-render.min.js') }}"></script>
|
||||
<script defer>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{left: "$$", right: "$$", display: true},
|
||||
{left: "$", right: "$", display: false}
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>{{ section.title }}</h1>
|
||||
</header>
|
||||
{{ section.content | safe }}
|
||||
</main>
|
||||
{% include "_partials/footer.html" %}
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,36 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{# Override base title to use the page-specific title. #}
|
||||
{% block title %}{{ page.title }}{% endblock title %}
|
||||
|
||||
{# Override base meta tags to use page-specific ones. #}
|
||||
{% block meta %}
|
||||
<meta name="description" content="{{ page.description }}">
|
||||
<meta property="og:site_name" content="andwati.github.io">
|
||||
<meta property="og:locale" content="en-us">
|
||||
<meta property="og:url" content="{{ page.permalink }}">
|
||||
<meta property="og:title" content="{{ page.title }}">
|
||||
<meta property="og:description" content="{{ page.description }}">
|
||||
<meta property="og:image" content="https://andwati.github.io/self.webp">
|
||||
<meta property="twitter:card" content="summary">
|
||||
<meta property="twitter:site" content="@andwati_">
|
||||
<meta property="twitter:title" content="{{ page.title }}">
|
||||
<meta property="twitter:description" content="{{ page.description }}">
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.webp">
|
||||
{% endblock meta %}
|
||||
|
||||
{# Override base links to use page-specific ones. #}
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ page.permalink }}">
|
||||
{% endblock links %}
|
||||
|
||||
{# Override base content to use page-specific content. #}
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>{{ page.title }}</h1>
|
||||
</header>
|
||||
{{ page.content | safe }}
|
||||
</main>
|
||||
{% include "_partials/footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,42 @@
|
||||
{% extends "page.html" %}
|
||||
{% import "post_macros.html" as page_macros %}
|
||||
|
||||
{# Override page-specific meta tags to add post-specific ones. In particular,
|
||||
posts add article metadata. #}
|
||||
{% block meta %}
|
||||
<meta name="description" content="{{ page.description }}">
|
||||
<meta property="og:site_name" content="andwati.github.io">
|
||||
<meta property="og:locale" content="en-us">
|
||||
<meta property="og:url" content="{{ page.permalink }}">
|
||||
<meta property="og:title" content="{{ page.title }}">
|
||||
<meta property="og:description" content="{{ page.description }}">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:image" content="https://andwati.github.io/self.webp">
|
||||
<meta property="og:article:author" content="{{ config.extra.author }}">
|
||||
<meta property="og:article:published_time" content="{{ page.date }}">
|
||||
<meta property="og:article:section" content="Posts">
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
<meta property="og:article:tag" content="{{ tag }}">
|
||||
{% endfor %}
|
||||
<meta property="twitter:card" content="summary">
|
||||
<meta property="twitter:site" content="@andwati_">
|
||||
<meta property="twitter:title" content="{{ page.title }}">
|
||||
<meta property="twitter:description" content="{{ page.description }}">
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.webp">
|
||||
{% endblock meta %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1>{{ page.title }}</h1>
|
||||
{{ page_macros::meta(page=page) }}
|
||||
</header>
|
||||
{{ page.content | safe }}
|
||||
</article>
|
||||
{% include "_partials/comments.html" %}
|
||||
</main>
|
||||
{% include "_partials/footer.html" %}
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,26 @@
|
||||
{% macro meta(page) %}
|
||||
<div class="post-meta">
|
||||
<time datetime="{{ page.date }}">{{ page.date | date(format="%F") }}</time>
|
||||
{% if page.taxonomies.tags %}
|
||||
<span class="accent"> ⬡ </span>
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
<a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">#{{ tag }}</a>
|
||||
{%- if page.taxonomies.tags | length > 1 and loop.index != page.taxonomies.tags | length -%}
|
||||
,
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="accent">☕{{ page.reading_time }} minutes 📝 {{ page.word_count }}</div>
|
||||
</div>
|
||||
{% endmacro meta %}
|
||||
|
||||
{% macro snippet(page) %}
|
||||
<article>
|
||||
<h2><a href="{{ page.permalink }}">{{ page.title }}</a></h2>
|
||||
{{ self::meta(page=page) }}
|
||||
{% if page.summary %}
|
||||
{{ page.summary | safe }}
|
||||
{% endif %}
|
||||
<nav><a href="{{ page.permalink }}">Read More →</a></nav>
|
||||
</article>
|
||||
{% endmacro snippet %}
|
||||
@@ -0,0 +1,14 @@
|
||||
{% extends "section.html" %}
|
||||
{% import "post_macros.html" as post_macros %}
|
||||
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>Posts</h1>
|
||||
</header>
|
||||
{% for page in section.pages %}
|
||||
{{ post_macros::snippet(page=page) }}
|
||||
{% endfor %}
|
||||
</main>
|
||||
{% include "_partials/footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,35 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{# Override base title to use the section-specific title. #}
|
||||
{% block title %}{{ section.title }}{% endblock title %}
|
||||
|
||||
{# Override base meta tags to use page-specific ones. #}
|
||||
{% block meta %}
|
||||
<meta name="description" content="{{ section.description }}">
|
||||
<meta property="og:site_name" content="andwati.github.io">
|
||||
<meta property="og:locale" content="en-us">
|
||||
<meta property="og:url" content="{{ section.permalink }}">
|
||||
<meta property="og:title" content="{{ section.title }}">
|
||||
<meta property="og:description" content="{{ section.description }}">
|
||||
<meta property="og:image" content="https://andwati.github.io/self.webp">
|
||||
<meta property="twitter:card" content="summary">
|
||||
<meta property="twitter:site" content="@andwati_">
|
||||
<meta property="twitter:title" content="{{ section.title }}">
|
||||
<meta property="twitter:description" content="{{ section.description }}">
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.webp">
|
||||
{% endblock meta %}
|
||||
|
||||
{# Override base links to use section-specific ones. #}
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ section.permalink }}">
|
||||
{% endblock links %}
|
||||
|
||||
{# Override base content to use section-specific content. #}
|
||||
{% block content %}
|
||||
<main>
|
||||
<header>
|
||||
<h1>{{ section.title }}</h1>
|
||||
</header>
|
||||
{{ section.content | safe }}
|
||||
</main>
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,39 @@
|
||||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}Tags{% endblock title %}
|
||||
|
||||
{% block meta %}
|
||||
<meta name="description" content="All tags.">
|
||||
<meta property="og:site_name" content="andwati.github.io">
|
||||
<meta property="og:locale" content="en-us">
|
||||
<meta property="og:url" content="{{ current_url }}">
|
||||
<meta property="og:title" content="Tags">
|
||||
<meta property="og:description" content="All tags.">
|
||||
<meta property="og:image" content="https://andwati.github.io/self.webp">
|
||||
<meta property="twitter:card" content="summary">
|
||||
<meta property="twitter:site" content="@andwati_">
|
||||
<meta property="twitter:title" content="Tags">
|
||||
<meta property="twitter:description" content="All tags.">
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.webp">
|
||||
{% endblock meta %}
|
||||
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ current_url }}">
|
||||
{% endblock links %}
|
||||
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>All Tags</h1>
|
||||
</header>
|
||||
{% if terms %}
|
||||
<ul>
|
||||
{% for term in terms %}
|
||||
<li><a href="{{ term.permalink }}">#{{ term.name }}</a> ({{ term.pages | length }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</main>
|
||||
{% include "_partials/footer.html" %}
|
||||
{% endblock content %}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
{% extends "index.html" %}
|
||||
{% import "post_macros.html" as post_macros %}
|
||||
|
||||
{% block title %}Tag - {{ term.name }}{% endblock title %}
|
||||
|
||||
{% block meta %}
|
||||
<meta name="description" content="Posts tagged as {{ term.name }}">
|
||||
<meta property="og:site_name" content="andwati.github.io">
|
||||
<meta property="og:locale" content="en-us">
|
||||
<meta property="og:url" content="{{ current_url }}">
|
||||
<meta property="og:title" content="Tag - {{ term.name }}">
|
||||
<meta property="og:description" content="Posts tagged as {{ term.name }}">
|
||||
<meta property="og:image" content="https://andwati.github.io/self.webp">
|
||||
<meta property="twitter:card" content="summary">
|
||||
<meta property="twitter:site" content="@andwati_">
|
||||
<meta property="twitter:title" content="Tag - {{ term.name }}">
|
||||
<meta property="twitter:description" content="Posts tagged as {{ term.name }}">
|
||||
<meta property="twitter:image" content="https://andwati.github.io/self.webp">
|
||||
{% endblock meta %}
|
||||
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ current_url }}">
|
||||
{% endblock links %}
|
||||
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>Posts Tagged as "{{ term.name }}"</h1>
|
||||
</header>
|
||||
{% for page in term.pages %}
|
||||
{{ post_macros::snippet(page=page) }}
|
||||
{% endfor %}
|
||||
</main>
|
||||
{% include "_partials/footer.html" %}
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user