Skip to content

Commit

Permalink
Add atom.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
KingFelix committed May 4, 2015
1 parent 8f0a0ff commit 0dad0df
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: "A minimal blog template, build with Jekyll."
url: "http://www.jacoporabolini.com/emerald"
author:
name: "Jacopo Rabolini"
email: "hello@jacoporabolini.com"
url: "http://www.jacoporabolini.com"

# Build settings
Expand Down
3 changes: 3 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@
<link rel="stylesheet" href="{{ "css/main.css" | prepend: site.baseurl }}">
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,900,400italic%7CSignika:700,300,400,600' rel='stylesheet' type='text/css'>

<!-- RSS -->
<link href="/atom.xml" type="application/atom+xml" rel="alternate" title="ATOM Feed" />

</head>
2 changes: 1 addition & 1 deletion _includes/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% endif %}
{% endfor %}

<!-- Nav links-->
<!-- Nav links -->
{% include link.html %}

</div>
Expand Down
30 changes: 30 additions & 0 deletions atom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: null
---

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

<title>{{ site.title }}</title>
<link href="{{ site.url }}/atom.xml" rel="self"/>
<id>{{ site.url }}</id>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<author>
<name>{{ site.author.name }}</name>
<uri>{{ site.author.url }}</uri>
<email>{{ site.author.email }}</email>
</author>

{% for post in site.posts limit: 10 %}

<entry>
<title>{{ post.title }}</title>
<link href="{{ site.url }}{{ post.url }}"/>
<id>{{ site.url }}{{ post.id }}</id>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<content type="html">{{ post.content | xml_escape | truncatewords:50 }}</content>
</entry>

{% endfor %}

</feed>

0 comments on commit 0dad0df

Please sign in to comment.