Unverified Commit 20f10929 authored by Richard Perry's avatar Richard Perry
Browse files

Added `jekyll-feed` gem to test it out

parent ebcb1cfd
Pipeline #6533112 passed with stage
in 4 minutes and 57 seconds
......@@ -4,3 +4,4 @@ gem 'jekyll-theme-perry'
gem 'flickraw'
gem 'jekyll-paginate'
gem 'jemoji'
gem 'jekyll-feed'
\ No newline at end of file
......@@ -8,9 +8,6 @@
title: Rosie & Jim's Travel Blog
description: A blog of all our travels
author: rosiejim
authors:
- richard
- rosie
url: https://travel.perry-online.me.uk
email: travel@perry-online.me.uk
 
......@@ -32,6 +29,7 @@ gems:
- jekyll-archives
- jekyll-paginate
- jekyll-redirect-from
- jekyll-feed
 
 
######################################
......
---
---
<?xml version="1.0" encoding="utf-8"?>{% assign author = site.data.authors[site.author] %}
<?xml-stylesheet type="text/xsl" href="/assets/xsl/feed.xsl" media="screen"?>
<rss version="2.0" xmlns:atom="//www.w3.org/2005/Atom">
<channel>
<title>{{ site.title | xml_escape }} | RSS Feed</title>
<link>{{ site.url }}</link>
<atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml" />
<description>{{ site.description | xml_escape }}</description>
<copyright>Copyright (c) 2009-{{ site.time | date: '%Y' }} {{ author.name }}</copyright>
<language>en-gb</language>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>{% for post in site.posts %}{% if post.author %}{% assign author = site.data.authors[post.author] %}{% else %}{% assign author = site.data.authors[site.author] %}{% endif %}
<item>
<title>{{ post.title | xml_escape }}</title>
<link>{{ site.url }}{{ post.url }}</link>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<author>{{ author.name | xml_escape }} ({{author.email}})</author>
<guid>{{ site.url }}{{ post.url }}</guid>
<description><![CDATA[{% include feed_content.html %}]]></description>
</item>{% endfor %}
</channel>
</rss>
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="rss/channel/title"/></title>
<style type="text/css">
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600);
@import url(/assets/css/feed.css);
</style>
</head>
<body>
<div id="container">
<header>
<h1><xsl:element name="a"><xsl:attribute name="href"><xsl:value-of select="rss/channel/link" /></xsl:attribute><xsl:attribute name="rel"><xsl:value-of select="rss/channel/title" /></xsl:attribute><xsl:value-of select="rss/channel/title" /></xsl:element></h1>
<h2><xsl:value-of select="rss/channel/description"/></h2>
</header>
<section id="content">
<xsl:for-each select="rss/channel/item">
<article>
<h3><xsl:element name="a"><xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute><xsl:attribute name="rel"><xsl:value-of select="title" /></xsl:attribute><xsl:value-of select="title" /></xsl:element></h3>
<small><xsl:value-of select="pubDate"/> | <xsl:value-of select="author"/></small>
<xsl:value-of select="description" disable-output-escaping="yes"/>
</article>
</xsl:for-each>
</section>
<footer>
<small><xsl:value-of select="rss/channel/copyright" /></small>
</footer>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment