Add microformats, sending of webmentions

This commit is contained in:
Devon Campbell 2024-06-17 13:50:52 -04:00
commit ad55411e21
8 changed files with 813 additions and 9 deletions

View file

@ -11,11 +11,21 @@ layout: base.njk
<li><a href="/about">About</a></li>
</ul>
</nav>
<h1>{{ onpageTitle or title }}</h1>
<h1 class="p-name">{{ onpageTitle or title }}</h1>
<article class="bg glow">
{{ content | safe }}
<time datetime="{{ page.date | formatDateForRobots }}" class="dt-published hidden">{{ page.date | formatDatetimeForHumans }}</time>
<span class="p-author h-card hidden">
<a class="p-name u-url" href="https://devon.lol">Devon Campbell</a>
<img class="u-photo" src="/images/personal-avatar.png" alt="Illustrated avatar showing Devon with pink skin, green hair and green beard, and a blue t-shirt on a light green background" />
</span>
<div class="e-content">
{{ content | safe }}
</div>
<a class="u-url hidden" href="{{ page.url }}">Permalink</a>
</article>
<footer>
<p>Talk to me <a href="https://techhub.social/@RadDevon" rel="me">on Mastodon.</a></p>
<a href="https://techhub.social/@RadDevon" rel="me"><img src="/images/mastodon-logo.png" alt="Mastodon logo"></a>
<a href="mailto:devon@devon.lol" rel="me" class="hidden">devon@devon.lol</a>
</footer>

View file

@ -7,15 +7,19 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/css/simple.css">
<link rel="stylesheet" href="/css/theme.css">
<link rel="alternate" type="application/rss+xml" title="RSS"       href="https://devon.lol/feed.xml">
<link rel="alternate" type="application/rss+xml" title="RSS" href="https://devon.lol/feed.xml">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="me" href="https://techhub.social/@RadDevon" />
<link rel="me" href="https://github.com/raddevon" />
<title>{{ title | buildPageTitle }}</title>
</head>
<body>
<body class="{% if tags and tags.includes('post') %}h-entry{% endif %}">
<a href="/" class="logo"><img src="/images/logo.png" alt="Devon.LOL"></a>
{{ content | safe }}
</body>

View file

@ -11,24 +11,26 @@ pagination:
<p>The posts here are sorted by recently modified. That means that if I update a post, it will float back to the top. I'll try to update the excerpts to reflect the changes made.</p>
<ul class="post-list">
<ul class="post-list h-feed">
<span class="p-name hidden">Devon.LoL Blog</span>
{%- for post in posts -%}
<li>
<h2><a href="{{ post.url }}">{{ post.data.title }}</a></h2>
<li class="h-entry">
<h2><a href="{{ post.url }}" class="u-url p-name">{{ post.data.title }}</a></h2>
<small>Last updated {{ post.date | formatDatetimeForHumans }}</small>
<p>{{ post.data.excerpt }}</p>
</li>
{%- endfor -%}
<a class="p-author h-card hidden" href="/">Devon Campbell</a>
</ul>
<nav aria-labelledby="pagination-heading" class="pagination">
<h2 id="pagination-heading" class="sr-only">Paging Controls</h2>
{% if pagination.href.previous or pagination.href.next %}
<ol>
{% if pagination.href.previous %}<li class="newer-item"><a href="{{ pagination.href.previous }}">Newer</a></li>{% endif %}
{% if pagination.href.previous %}<li class="newer-item"><a href="{{ pagination.href.previous }}" rel="prev">Newer</a></li>{% endif %}
{%- for pageEntry in pagination.pages %}
{%- endfor %}
{% if pagination.href.next %}<li class="older-item"><a href="{{ pagination.href.next }}">Older</a></li>{% endif %}
{% if pagination.href.next %}<li class="older-item"><a href="{{ pagination.href.next }}" rel="next">Older</a></li>{% endif %}
</ol>
{% endif %}
</nav>