feat: refactor blogroll

This commit is contained in:
Cory Dransfeldt 2024-01-25 13:02:01 -08:00
parent 45a605a4bf
commit 072b3943b6
No known key found for this signature in database
7 changed files with 96 additions and 32 deletions

28
src/pages/blogroll.html Normal file
View file

@ -0,0 +1,28 @@
---
title: Blogroll
layout: default
permalink: /blogroll.html
image: /assets/img/ogi/blogroll.jpg
description: 'These are awesome blogs that I enjoy and you may enjoy too.'
---
{% capture css %}
{% render "../assets/styles/pages/blogroll.css" %}
{% endcapture %}
<style>{{ css }}</style>
<h2 class="page__header">{{ title }}</h2>
<p>You can <a href="/blogroll.opml">download an OPML file</a> containing all of these feeds and import them into your RSS reader.</p>
<div class="blog__banner--grid">
{% for blog in blogroll %}
<div class="blog__banner">
<h4>{{ blog.name }}</h4>
<div class="meta">
<a class="no-underline" href="{{blog.url}}">Website</a>
{% if blog.feed %} • <a class="no-underline" href="{{ blog.feed }}">Feed</a>{% endif %}
</div>
{%- if blog.description %}
<p>{{ blog.description }}</p>
{% endif -%}
</div>
{% endfor %}
</div>
<p>Head on over to <a href="https://blogroll.org">blogroll.org</a> to find more blogs to follow or search for feeds using <a href="https://feedle.world">feedle</a>.</p>

View file

@ -1,17 +0,0 @@
---
title: Blogroll
layout: default
permalink: /blogroll.html
image: /assets/img/ogi/blogroll.jpg
description: 'These are awesome blogs that I enjoy and you may enjoy too.'
---
<h2 class="page__header">{{ title }}</h2>
<ul class="link__list">
{% for blog in blogroll %}
<li>
<a class="no-underline" href="{{blog.url}}">
{{ blog.name }}
</a>
</li>
{% endfor %}
</ul>

16
src/pages/opml.liquid Normal file
View file

@ -0,0 +1,16 @@
---
permalink: /blogroll.opml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>OPML for all feeds in Cory Dransfeldt's blogroll</title>
<dateCreated>{{ page.date | dateToRfc822 }}</dateCreated>
</head>
<body>
{%- for blog in blogroll -%}
<outline text="{{ blog.name }}" title="{{ blog.name }}" type="rss" xmlUrl="{{ blog.feed }}" htmlUrl="{{ blog.url }}"/>
{% endfor %}
</body>
</opml>