Added RSS feed for dev related posts

Shrunk footer
This commit is contained in:
Robert McGovern 2023-02-22 21:29:14 +00:00
parent 62f674c612
commit f63f5b24c6
7 changed files with 77 additions and 51 deletions

View File

@ -186,35 +186,15 @@
}, },
"footer": { "footer": {
"links": [ "links": [
{
"label": "RSS for Dev Posts",
"icon": "fas fa-fw fa-rss-square",
"url": "/feed-dev.xml"
},
{ {
"label": "Email", "label": "Email",
"icon": "fas fa-fw fa-envelope-square", "icon": "fas fa-fw fa-envelope-square",
"url": "mailto:rob@tarasis.net" "url": "mailto:rob@tarasis.net"
},
{
"label": "Twitter",
"icon": "fab fa-fw fa-twitter-square",
"url": "https://twitter.com/tarasis"
},
{
"label": "Mastodon",
"icon": "fab fa-fw fa-mastodon",
"url": "https://social.tarasis.net/@tarasis"
},
{
"label": "Facebook",
"icon": "fab fa-fw fa-facebook",
"url": "https://www.facebook.com/tarasis"
},
{
"label": "GitHub",
"icon": "fab fa-fw fa-github",
"url": "https://github.com/tarasis"
},
{
"label": "Instagram",
"icon": "fab fa-fw fa-instagram",
"url": "https://instagram.com/tarasis"
} }
] ]
}, },
@ -331,30 +311,30 @@
}, },
"defaults": { "defaults": {
"posts": { "posts": {
"path": "_posts", "path": "_posts",
"type": "posts", "type": "posts",
"layout": "single", "layout": "single",
"classes": "wide", "classes": "wide",
"author_profile": true, "author_profile": true,
"read_time": true, "read_time": true,
"share": true, "share": true,
"related": true, "related": true,
"comments": true, "comments": true,
"sidebar":true, "sidebar": true,
"show_date": true "show_date": true
}, },
"pages": { "pages": {
"path": "_pages", "path": "_pages",
"type": "pages", "type": "pages",
"layout": "single", "layout": "single",
"author_profile": true "author_profile": true
}, },
"recipies": { "recipies": {
"path": "", "path": "",
"type": "recipes", "type": "recipes",
"layout": "single", "layout": "single",
"author_profile": true, "author_profile": true,
"share": true "share": true
} }
}, },
"post_ext": "markdown", "post_ext": "markdown",

View File

@ -5,6 +5,7 @@ tags:
- ios - ios
- swift - swift
- coding-challenges - coding-challenges
- dev
category: coding-challenges category: coding-challenges
date: 2020-04-20 15:28:00 +01:00 date: 2020-04-20 15:28:00 +01:00
--- ---

View File

@ -5,6 +5,7 @@ tags:
- ios - ios
- swift - swift
- coding-challenges - coding-challenges
- dev
category: coding-challenges category: coding-challenges
date: 2020-04-20 13:36:00 +01:00 date: 2020-04-20 13:36:00 +01:00
--- ---

View File

@ -1,6 +1,6 @@
--- ---
title: What happens when I finish a Frontend Mentor Challenge (or how I build and deploy an 11ty site) title: What happens when I finish a Frontend Mentor Challenge (or how I build and deploy an 11ty site)
tags: [webdev, site, frontendmentor] tags: [webdev, site, frontendmentor, dev]
category: [programming, webdev] category: [programming, webdev]
date: 2022-10-15 date: 2022-10-15
--- ---

View File

@ -1,6 +1,6 @@
--- ---
title: Copy Code Blocks title: Copy Code Blocks
tags: [webdev, site] tags: [webdev, site, dev]
category: [site, webdev] category: [site, webdev]
date: 2023-02-19 date: 2023-02-19
--- ---

View File

@ -1,6 +1,6 @@
--- ---
title: Border Radius on an Outline in CSS title: Border Radius on an Outline in CSS
tags: [webdev, css] tags: [webdev, css, dev]
category: [css, webdev] category: [css, webdev]
date: 2023-02-20 date: 2023-02-20
excerpt: A little note about using border-radius with an outline. excerpt: A little note about using border-radius with an outline.

44
src/feed-dev.njk Normal file
View File

@ -0,0 +1,44 @@
---json
{
"permalink": "feed-dev.xml",
"eleventyExcludeFromCollections": true,
"metadata": {
"title": "TDN: RMCG",
"subtitle": "👨‍💻 🚶‍♂️ 💭 🤯",
"language": "en",
"url": "https://tarasis.net/",
"author": {
"name": "Robert McGovern",
"email": "rob@tarasis.net"
}
}
}
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ metadata.url }}">
<title>{{ metadata.title }}</title>
<subtitle>{{ metadata.subtitle }}</subtitle>
<link href="{{ permalink | absoluteUrl(metadata.url) }}" rel="self"/>
<link href="{{ metadata.url }}"/>
<updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
<id>{{ metadata.url }}</id>
<author>
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
</author>
{%- for post in collections.posts %}
{%- for tag in post.data.tags %}
{# {{ post | inspect }} #}
{%- if tag === "dev" %}
{%- set absolutePostUrl = post.url | absoluteUrl(metadata.url) %}
<entry>
<title>{{ post.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ post.date | dateToRfc3339 }}</updated>
<id>{{ absolutePostUrl }}</id>
<content xml:lang="{{ metadata.language }}" type="html">{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
</entry>
{%- endif %}
{%- endfor %}
{%- endfor %}
</feed>