1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-22 18:00:06 +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/
# Archive Page: /archive/
# Pagination: /page/N/
# Post: /post/post-slug/
# RSS Feed: /feed.xml
# Post: /post-slug/
# RSS Feed: /feed/
#
# Basics
@ -13,8 +13,10 @@
name: kremalicious
description: 'Blog of designer & developer Matthias Kretschmann'
url: https://kremalicious.com
author: Matthias Kretschmann
author:
name: Matthias Kretschmann
email: m@kretschmann.io
uri: http://kretschmann.io
# Urls

View File

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

View File

@ -4,7 +4,7 @@
<div class="vcard author">
<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>
<aside class="subscribe">

View File

@ -45,7 +45,7 @@
{% else %}
<meta name="description" content="{{ page.excerpt | strip_html | strip_newlines }}" />
{% 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 name="HandheldFriendly" content="True">
@ -69,7 +69,7 @@
<link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}">
<!-- 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 -->
<meta name="apple-mobile-web-app-title" content="kremalicious">

View File

@ -6,25 +6,45 @@ redirect_from:
---
<?xml version="1.0" encoding="utf-8"?>
<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 type="application/atom+xml" href="{{ site.url }}/feed/" rel="self"/>
<link href="{{ site.url }}/"/>
<link href="{{ site.url }}/feed/" type="application/atom+xml" rel="self" />
<link href="{{ site.url }}/" rel="alternate" type="text/html" />
<updated>{{ site.time | date_to_xmlschema }}</updated>
<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>
{% if site.author.name %}
<name>{{ site.author.name | xml_escape }}</name>
{% else %}
<name>{{ site.author | xml_escape }}</name>
<email>{{ site.email }}</email>
{% 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>
{% endif %}
{% for post in site.posts limit:100 %}
<entry>
{% if post.layout == "link" %}
<title>{{ post.title | xml_escape | titlecase }} &#8594;</title>
<link rel="alternate" type="text/html" href="{{ post.linkurl | escape }}" />
<title>{{ post.title | markdownify | strip_html | strip_newlines | xml_escape | titlecase }} &#8594;</title>
<link href="{{ post.linkurl | escape }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
{% else %}
<title>{{ post.title | xml_escape | titlecase }}</title>
<link rel="alternate" type="text/html" href="{{ site.url }}{{ post.url | escape }}" />
<title>{{ post.title | markdownify | strip_html | strip_newlines | xml_escape | titlecase }}</title>
<link href="{{ site.url }}{{ post.url | escape }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
{% endif %}
<published>{{ post.date | date_to_xmlschema }}</published>
@ -35,19 +55,48 @@ redirect_from:
<updated>{{ post.date | date_to_xmlschema }}</updated>
{% endif %}
<id>{{ site.url }}{{ post.url }}</id>
<content type="html">
<id>{{ post.id | prepend: site.url | xml_escape }}</id>
<content type="html" xml:base="{{ post.url | xml_escape }}">
{% if post.image %}
&lt;img src=&quot;{{ site.url }}/media/{{ post.image }}&quot; /&gt;
{% endif %}
{{ post.content | xml_escape }}
{{ post.content | markdownify | xml_escape }}
{% 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;{{ site.url }}{{ post.url }}&quot; title=&quot;Permalink for this post&quot;&gt;&amp;#8734;&lt;/a&gt;
{% endif %}
</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>
{% endfor %}
</feed>

View File

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