Merge branch 'feature/use-jekyll-feed' into develop
This commit is contained in:
commit
9da33af942
5 changed files with 12 additions and 51 deletions
|
@ -150,6 +150,7 @@ gems:
|
||||||
- jekyll-paginate
|
- jekyll-paginate
|
||||||
- jekyll-sitemap
|
- jekyll-sitemap
|
||||||
- jekyll-gist
|
- jekyll-gist
|
||||||
|
- jekyll-feed
|
||||||
|
|
||||||
# Outputting
|
# Outputting
|
||||||
permalink: /:categories/:title/
|
permalink: /:categories/:title/
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# Authors
|
# Authors
|
||||||
|
|
||||||
billy_rick:
|
Billy Rick:
|
||||||
name : "Billy Rick"
|
name : "Billy Rick"
|
||||||
web : "http://thewhip.com"
|
uri : "http://thewhip.com"
|
||||||
email : "billy@rick.com"
|
email : "billy@rick.com"
|
||||||
bio : "What do you want, jewels? I am a very extravagant man."
|
bio : "What do you want, jewels? I am a very extravagant man."
|
||||||
avatar : "bio-photo-2.jpg"
|
avatar : "bio-photo-2.jpg"
|
||||||
twitter : "extravagantman"
|
twitter : "extravagantman"
|
||||||
google_plus : "BillyRick"
|
google_plus : "BillyRick"
|
||||||
|
|
||||||
cornelius_fiddlebone:
|
Cornelius Fiddlebone:
|
||||||
name : "Cornelius Fiddlebone"
|
name : "Cornelius Fiddlebone"
|
||||||
email : "cornelius@thewhip.com"
|
email : "cornelius@thewhip.com"
|
||||||
bio : "I ordered what?"
|
bio : "I ordered what?"
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
|
|
||||||
<h3 class="author-name">{{ author.name }}</h3>
|
<h3 class="author-name">{{ author.name }}</h3>
|
||||||
{% if author.bio %}<p class="author-bio">{{ author.bio }}</p>{% endif %}
|
{% if author.bio %}<p class="author-bio">{{ author.bio }}</p>{% endif %}
|
||||||
|
{% if author.uri %}
|
||||||
|
<a href="{{ author.uri }}" class="author-social" target="_blank"><i class="fa fa-fw fa-globe"></i>Website</a>
|
||||||
|
{% endif %}
|
||||||
{% if author.email %}
|
{% if author.email %}
|
||||||
<a href="mailto:{{ author.email }}" class="author-social" target="_blank"><i class="fa fa-fw fa-envelope-square"></i> Email</a>
|
<a href="mailto:{{ author.email }}" class="author-social" target="_blank"><i class="fa fa-fw fa-envelope-square"></i> Email</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
title: "Template: Author Override"
|
title: "Template: Author Override"
|
||||||
author: billy_rick
|
author: Billy Rick
|
||||||
excerpt: "A post to test author overrides using a data file."
|
excerpt: "A post to test author overrides using a data file."
|
||||||
---
|
---
|
||||||
For those of you who may have content written by multiple authors on your site you can now assign different authors to each post if desired.
|
For those of you who may have content written by multiple authors on your site you can now assign different authors to each post if desired.
|
||||||
|
@ -12,15 +12,15 @@ Start by modifying or creating a new `authors.yml` file in the `_data` folder an
|
||||||
{% highlight yaml %}
|
{% highlight yaml %}
|
||||||
# /_data/authors.yml
|
# /_data/authors.yml
|
||||||
|
|
||||||
billy_rick:
|
Billy Rick:
|
||||||
name: Billy Rick
|
name: Billy Rick
|
||||||
web: http://thewhip.com
|
uri: http://thewhip.com
|
||||||
email: billy@rick.com
|
email: billy@rick.com
|
||||||
bio: "What do you want, jewels? I am a very extravagant man."
|
bio: "What do you want, jewels? I am a very extravagant man."
|
||||||
avatar: bio-photo-2.jpg
|
avatar: bio-photo-2.jpg
|
||||||
twitter: extravagantman
|
twitter: extravagantman
|
||||||
|
|
||||||
cornelius_fiddlebone:
|
Cornelius Fiddlebone:
|
||||||
name: Cornelius Fiddlebone
|
name: Cornelius Fiddlebone
|
||||||
email: cornelius@thewhip.com
|
email: cornelius@thewhip.com
|
||||||
bio: "I ordered what?"
|
bio: "I ordered what?"
|
||||||
|
@ -31,5 +31,5 @@ cornelius_fiddlebone:
|
||||||
To assign Billy Rick as an author for our post. You'd add the following YAML front matter to a post:
|
To assign Billy Rick as an author for our post. You'd add the following YAML front matter to a post:
|
||||||
|
|
||||||
{% highlight yaml %}
|
{% highlight yaml %}
|
||||||
author: billy_rick
|
author: Billy Rick
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
43
feed.xml
43
feed.xml
|
@ -1,43 +0,0 @@
|
||||||
---
|
|
||||||
sitemap: false
|
|
||||||
---
|
|
||||||
|
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
|
|
||||||
<title type="text">{{ site.title }}</title>
|
|
||||||
<generator uri="https://github.com/jekyll/jekyll">Jekyll</generator>
|
|
||||||
<link rel="self" type="application/atom+xml" href="{{ site.url }}/feed.xml" />
|
|
||||||
<link rel="alternate" type="text/html" href="{{ site.url }}" />
|
|
||||||
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
|
||||||
<id>{{ site.url }}/</id>
|
|
||||||
<author>
|
|
||||||
<name>{{ site.owner.name }}</name>
|
|
||||||
<uri>{{ site.url }}/</uri>
|
|
||||||
{% if site.owner.email %}<email>{{ site.owner.email }}</email>{% endif %}
|
|
||||||
</author>
|
|
||||||
{% for post in site.posts limit:20 %}
|
|
||||||
{% if post.author %}
|
|
||||||
{% assign author = site.data.authors[post.author] %}
|
|
||||||
{% else %}
|
|
||||||
{% assign author = site.owner %}
|
|
||||||
{% endif %}
|
|
||||||
<entry>
|
|
||||||
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
|
|
||||||
<link rel="alternate" type="text/html" href="{{ site.url }}{{ post.url }}" />
|
|
||||||
<id>{{ site.url }}{{ post.id }}</id>
|
|
||||||
{% if post.modified %}<updated>{{ post.modified | to_xmlschema }}T00:00:00-00:00</updated>
|
|
||||||
<published>{{ post.date | date_to_xmlschema }}</published>
|
|
||||||
{% else %}<published>{{ post.date | date_to_xmlschema }}</published>
|
|
||||||
<updated>{{ post.date | date_to_xmlschema }}</updated>{% endif %}
|
|
||||||
<author>
|
|
||||||
<name>{{ author.name }}</name>
|
|
||||||
<uri>{{ site.url }}</uri>
|
|
||||||
{% if author.email %}<email>{{ author.email }}</email>{% endif %}
|
|
||||||
</author>
|
|
||||||
<content type="html">
|
|
||||||
{{ post.content | xml_escape }}
|
|
||||||
{% include feed-footer.html %}
|
|
||||||
</content>
|
|
||||||
</entry>
|
|
||||||
{% endfor %}
|
|
||||||
</feed>
|
|
Loading…
Reference in a new issue