Add a simple microblog template

This commit is contained in:
R Tyler Croy 2021-02-17 22:55:41 -08:00
parent 52ecb12b3e
commit 8ed5f8bc27
No known key found for this signature in database
GPG Key ID: E5C92681BEF6CEA2
2 changed files with 49 additions and 0 deletions

29
_layouts/microblog.html Normal file
View File

@ -0,0 +1,29 @@
<!doctype html>
<html>
<head>
{% include head.html %}
</head>
<body>
<div class="container">
{% include header.html %}
<div class="post-container">
<article id = "post">
<h2 id = "post-title">{{ content }}</h2>
{% if site.data.settings.date-under-post.active %}
<div class = "post-info">
<span>
<i class="far fa-calendar" aria-hidden="true"></i> <span>{{ page.date | date_to_string }}</span>
</span>
</div>
{% endif %}
</article>
</div>
</div>
{%- include footer.html -%}
</body>
</html>

20
microblog.xml Normal file
View File

@ -0,0 +1,20 @@
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>rtyler | Microblog</title>
<description>Microblog of rtyler</description>
<link>{{ site.url }}</link>
<atom:link href="{{ site.url }}/microblog.xml" rel="self" type="application/rss+xml" />
{% for post in site.microblog reversed limit:50 %}
<item>
<description>{{ post.content | xml_escape }}{% if post.external-url %}{% endif %}</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
</item>
{% endfor %}
</channel>
</rss>