diff --git a/source/_layouts/feed.html.twig b/source/_layouts/feed.html.twig new file mode 100644 index 00000000..cb0dbe44 --- /dev/null +++ b/source/_layouts/feed.html.twig @@ -0,0 +1 @@ +{% block content %}{% endblock %} diff --git a/source/_pages/rss/daily.xml.twig b/source/_pages/rss/daily.xml.twig new file mode 100644 index 00000000..c71ca6ec --- /dev/null +++ b/source/_pages/rss/daily.xml.twig @@ -0,0 +1,54 @@ +--- +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 +--- + + + + + {{ page.title }} + {{ page.description }} + {{ site.url }} + {% for email in data.daily_emails[:1] %} + {% set tags = [] %} + {%- for tag in ['dev']|merge(email.tags|default([])) -%} + {% set words = tag|split('-') -%} + {% if words|length == 1 %} + {% set tags = tags|merge(['#' ~ tag]) %} + {% else %} + {% set tags = tags|merge(['#' ~ tag|title|replace({ '-': '' })]) %} + {% endif %} + {% endfor %} + + {{ email.title }} + {{ site.url }}{{ email.url }} + {{ site.url }}{{ email.url }} + + {{- email.blocks.content -}} + + {% if 'P.S.' not in email.blocks.content %} + {% set ctas = [ + 'Are you still using Drupal 7 and don’t know what’s involved to upgrade to Drupal 10? Book a Drupal 7 upgrade consultation call or an upgrade roadmap.', + 'Need help or want another pair of eyes on your code? Book a 1-on-1 consulting call or an online pair programming session with a 100% money-back guarantee.', + 'If you\'re creating a new Drupal module, try my free Drupal module template.', + ] %} + +

P.S. {{ random(ctas) }}

+ {% endif %} +
+ {{ email.date|date('D, d M Y H:i:s') }} GMT + {{ email.snippet }} + {% if tags is not empty -%} + + {{- tags|join(' ') -}} + + {% endif %} +
+ {% endfor %} +
+