Re-add the Drupal Planet XML feed
This commit is contained in:
parent
d70a9ab229
commit
5140b9a756
16 changed files with 43 additions and 0 deletions
57
source/rss/daily.xml.twig
Normal file
57
source/rss/daily.xml.twig
Normal file
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
layout: feed
|
||||
title: Oliver's daily email list
|
||||
description: |-
|
||||
A daily email newsletter about software development, DevOps, community, and open-source.
|
||||
permalink: /rss/daily.xml
|
||||
use:
|
||||
- daily_emails
|
||||
---
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>{{ page.title }}</title>
|
||||
<description>{{ page.description }}</description>
|
||||
<link>{{ site.url }}/daily</link>
|
||||
{% for email in data.daily_emails[:1] %}
|
||||
{% set tags = [] %}
|
||||
{%- for tag in ['dev']|merge(email.tags|default([])) -%}
|
||||
{% if tag == "tailwind-css" %}
|
||||
{% set tag = "TailwindCSS" %}
|
||||
{% endif %}
|
||||
{% set words = tag|split('-') -%}
|
||||
{% if words|length == 1 %}
|
||||
{% set tags = tags|merge(['#' ~ tag]) %}
|
||||
{% else %}
|
||||
{% set tags = tags|merge(['#' ~ tag|title|replace({ '-': '' })]) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<item>
|
||||
<title>{{ email.title }}</title>
|
||||
<link>{{ site.url }}{{ email.url }}</link>
|
||||
<guid isPermaLink="true">{{ site.url }}{{ email.url }}</guid>
|
||||
<description>
|
||||
<div style="max-width: 550px;">
|
||||
{{- email.blocks.content -}}
|
||||
|
||||
<![CDATA[
|
||||
{% if email.cta and site.ctas[email.cta] is defined %}
|
||||
<p>P.S. {{ site.ctas[email.cta]|raw }}</p>
|
||||
{% else %}
|
||||
<p>P.S. {{ random(site.ctas)|raw }}</p>
|
||||
{% endif %}
|
||||
]]>
|
||||
</div>
|
||||
</description>
|
||||
<pubDate>{{ email.date|date('D, d M Y H:i:s') }} GMT</pubDate>
|
||||
<snippet>{{ email.snippet }}</snippet>
|
||||
{% if tags is not empty -%}
|
||||
<tags>
|
||||
{{- tags|join(' ') -}}
|
||||
</tags>
|
||||
{% endif %}
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
28
source/rss/drupal-planet.xml.twig
Normal file
28
source/rss/drupal-planet.xml.twig
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
layout: feed
|
||||
title: The Daily Drupaler
|
||||
description: |-
|
||||
A daily email newsletter about Drupal, software development, DevOps, community, and open-source.
|
||||
permalink: /rss/drupal-planet.xml
|
||||
use: [daily_emails]
|
||||
---
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>{{ page.title }}</title>
|
||||
<description>{{ page.description }}</description>
|
||||
<link>{{ site.url }}/daily</link>
|
||||
{% for email in data.daily_emails if 'drupal-planet' in email.tags %}
|
||||
<item>
|
||||
<title>{{ email.title }}</title>
|
||||
<link>{{ site.url }}{{ email.url }}</link>
|
||||
<guid isPermaLink="true">{{ site.url }}{{ email.url }}</guid>
|
||||
<description>
|
||||
{{- email.blocks.content -}}
|
||||
</description>
|
||||
<pubDate>{{ email.date|date('D, d M Y H:i:s') }} GMT</pubDate>
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
Loading…
Add table
Add a link
Reference in a new issue