1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-26 11:49:04 +01:00

feed updates, author key values as array

This commit is contained in:
Matthias Kretschmann 2015-05-25 21:22:55 +02:00
parent fdf4c54da0
commit fb8ad31e36
6 changed files with 82 additions and 32 deletions

View File

@ -3,8 +3,8 @@
# About Page: /about/ # About Page: /about/
# Archive Page: /archive/ # Archive Page: /archive/
# Pagination: /page/N/ # Pagination: /page/N/
# Post: /post/post-slug/ # Post: /post-slug/
# RSS Feed: /feed.xml # RSS Feed: /feed/
# #
# Basics # Basics
@ -13,8 +13,10 @@
name: kremalicious name: kremalicious
description: 'Blog of designer & developer Matthias Kretschmann' description: 'Blog of designer & developer Matthias Kretschmann'
url: https://kremalicious.com url: https://kremalicious.com
author: Matthias Kretschmann author:
email: m@kretschmann.io name: Matthias Kretschmann
email: m@kretschmann.io
uri: http://kretschmann.io
# Urls # Urls

View File

@ -4,7 +4,7 @@
{% if page.author %} {% if page.author %}
{{ page.author }} {{ page.author }}
{% else %} {% else %}
{{ site.author }} {{ site.author.name }}
{% endif %} {% endif %}
</a> </a>
</p> </p>

View File

@ -4,7 +4,7 @@
<div class="vcard author"> <div class="vcard author">
<img class="avatar photo" src="/assets/img/avatar.jpeg" /> <img class="avatar photo" src="/assets/img/avatar.jpeg" />
<p class="footer-description">Blog of designer &amp; developer <a class="fn" rel="author" href="/about/">{{ site.author }}</a> <p class="footer-description">Blog of designer &amp; developer <a class="fn" rel="author" href="/about/">{{ site.author.name }}</a>
</div> </div>
<aside class="subscribe"> <aside class="subscribe">

View File

@ -45,7 +45,7 @@
{% else %} {% else %}
<meta name="description" content="{{ page.excerpt | strip_html | strip_newlines }}" /> <meta name="description" content="{{ page.excerpt | strip_html | strip_newlines }}" />
{% endif %} {% endif %}
<meta name="author" content="{% if page.author %}{{ page.author }}{% else %}{{ site.author }}{% endif %}"> <meta name="author" content="{% if page.author %}{{ page.author }}{% else %}{{ site.author.name }}{% endif %}">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="HandheldFriendly" content="True"> <meta name="HandheldFriendly" content="True">
@ -69,7 +69,7 @@
<link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}"> <link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}">
<!-- Atom feed --> <!-- Atom feed -->
<link rel="alternate" type="application/atom+xml" title="kremalicious posts feed" href="{{ site.url }}/feed/" /> <link href="{{ site.url }}/feed/" rel="alternate" type="application/atom+xml" title="{{ site.name }} posts feed" />
<!-- Apple --> <!-- Apple -->
<meta name="apple-mobile-web-app-title" content="kremalicious"> <meta name="apple-mobile-web-app-title" content="kremalicious">

View File

@ -6,25 +6,45 @@ redirect_from:
--- ---
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"> <feed xmlns="http://www.w3.org/2005/Atom">
<generator uri="http://jekyllrb.com" version="{{ jekyll.version }}">Jekyll</generator>
<title type="text" xml:lang="en">{{ site.name | xml_escape }}</title> <link href="{{ site.url }}/feed/" type="application/atom+xml" rel="self" />
<link type="application/atom+xml" href="{{ site.url }}/feed/" rel="self"/> <link href="{{ site.url }}/" rel="alternate" type="text/html" />
<link href="{{ site.url }}/"/>
<updated>{{ site.time | date_to_xmlschema }}</updated> <updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url }}</id> <id>{{ site.url }}</id>
{% if site.name %}
<title>{{ site.name | xml_escape }}</title>
{% endif %}
{% if site.description %}
<subtitle>{{ site.description | xml_escape }}</subtitle>
{% endif %}
{% if site.author %}
<author> <author>
<name>{{ site.author | xml_escape}}</name> {% if site.author.name %}
<email>{{ site.email }}</email> <name>{{ site.author.name | xml_escape }}</name>
{% else %}
<name>{{ site.author | xml_escape }}</name>
{% endif %}
{% if site.author.email %}
<email>{{ site.author.email | xml_escape }}</email>
{% endif %}
{% if site.author.uri %}
<uri>{{ site.author.uri | xml_escape }}</uri>
{% endif %}
</author> </author>
{% endif %}
{% for post in site.posts limit:100 %} {% for post in site.posts limit:100 %}
<entry> <entry>
{% if post.layout == "link" %} {% if post.layout == "link" %}
<title>{{ post.title | xml_escape | titlecase }} &#8594;</title> <title>{{ post.title | markdownify | strip_html | strip_newlines | xml_escape | titlecase }} &#8594;</title>
<link rel="alternate" type="text/html" href="{{ post.linkurl | escape }}" /> <link href="{{ post.linkurl | escape }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
{% else %} {% else %}
<title>{{ post.title | xml_escape | titlecase }}</title> <title>{{ post.title | markdownify | strip_html | strip_newlines | xml_escape | titlecase }}</title>
<link rel="alternate" type="text/html" href="{{ site.url }}{{ post.url | escape }}" /> <link href="{{ site.url }}{{ post.url | escape }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
{% endif %} {% endif %}
<published>{{ post.date | date_to_xmlschema }}</published> <published>{{ post.date | date_to_xmlschema }}</published>
@ -35,19 +55,48 @@ redirect_from:
<updated>{{ post.date | date_to_xmlschema }}</updated> <updated>{{ post.date | date_to_xmlschema }}</updated>
{% endif %} {% endif %}
<id>{{ site.url }}{{ post.url }}</id> <id>{{ post.id | prepend: site.url | xml_escape }}</id>
<content type="html"> <content type="html" xml:base="{{ post.url | xml_escape }}">
{% if post.image %} {% if post.image %}
&lt;img src=&quot;{{ site.url }}/media/{{ post.image }}&quot; /&gt; &lt;img src=&quot;{{ site.url }}/media/{{ post.image }}&quot; /&gt;
{% endif %} {% endif %}
{{ post.content | xml_escape }} {{ post.content | markdownify | xml_escape }}
{% if post.layout == "link" %} {% if post.layout == "link" %}
&lt;a href=&quot;{{ post.linkurl }}&quot;&gt;Go to source &amp;#187;&lt;/a&gt; &lt;br /&gt; &lt;a href=&quot;{{ post.linkurl }}&quot;&gt;Go to source &amp;#187;&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;{{ site.url }}{{ post.url }}&quot; title=&quot;Permalink for this post&quot;&gt;&amp;#8734;&lt;/a&gt; &lt;a href=&quot;{{ site.url }}{{ post.url }}&quot; title=&quot;Permalink for this post&quot;&gt;&amp;#8734;&lt;/a&gt;
{% endif %} {% endif %}
</content> </content>
{% if post.author %}
<author>
{% if post.author.name %}
<name>{{ post.author.name | xml_escape }}</name>
{% else %}
<name>{{ post.author | xml_escape }}</name>
{% endif %}
{% if post.author.email %}
<email>{{ post.author.email | xml_escape }}</email>
{% endif %}
{% if post.author.url %}
<uri>{{ post.author.url | xml_escape }}</uri>
{% endif %}
</author>
{% endif %}
{% if post.category %}
<category term="{{ post.category | xml_escape }}" />
{% endif %}
{% for tag in post.tags %}
<category term="{{ tag | xml_escape }}" />
{% endfor %}
{% if post.excerpt %}
<summary>{{ post.excerpt | markdownify | strip_html | strip_newlines | xml_escape }}</summary>
{% endif %}
</entry> </entry>
{% endfor %} {% endfor %}
</feed> </feed>

View File

@ -1,11 +1,10 @@
--- ---
layout: none
--- ---
[ [
{% for post in site.posts %} {% for post in site.posts %}
{ {
"title" : "{{ post.title | escape | titlecase }}", "title" : "{{ post.title | strip_html | strip_newlines | escape | titlecase }}",
"category" : "{{ post.categories }}", "category" : "{{ post.categories | join: ', ' }}",
"tag" : "{{ post.tags | join: ', ' }}", "tag" : "{{ post.tags | join: ', ' }}",
"url" : "{{ site.url }}{{ post.url }}", "url" : "{{ site.url }}{{ post.url }}",
"date" : "{{ post.date }}", "date" : "{{ post.date }}",