mirror of
https://github.com/TomHodson/tomhodson.github.com.git
synced 2025-06-26 10:01:18 +02:00
fix feeds
This commit is contained in:
parent
eac2927865
commit
dce44ca100
22
feed.json
22
feed.json
@ -2,25 +2,33 @@
|
||||
layout: none
|
||||
---
|
||||
{
|
||||
"version": "https://jsonfeed.org/version/1",
|
||||
"version": "https://jsonfeed.org/version/1.1",
|
||||
"title": {{ site.title | jsonify }},
|
||||
"description": {% if site.description %}{{ site.description | jsonify }}{% endif %},
|
||||
"home_page_url": "{{ site.url }}",
|
||||
"feed_url": "{{ site.url }}/feed.json",
|
||||
"favicon": "{{ site.url}}/favicon.ico",
|
||||
"author": {
|
||||
"name": "Tom Hodson"
|
||||
},
|
||||
"favicon": "{{ site.url}}/apple-touch-icon.png",
|
||||
"icon": "{{ site.url}}/assets/images/android-chrome-512x512.png",
|
||||
"user_comment": "Only you, dear reader of the raw json feed, will ever see this.",
|
||||
"authors": [{
|
||||
"name": "Tom Hodson",
|
||||
"url": "{{ site.url }}",
|
||||
"avatar": "{{ site.url }}/assets/images/avatar.jpeg"
|
||||
}],
|
||||
"language": "en",
|
||||
"items": [
|
||||
|
||||
{% for post in site.posts limit:10 %}
|
||||
{% for post in site.posts limit:20 %}
|
||||
{% if post.draft == false or jekyll.environment == "development" %}
|
||||
{
|
||||
"id": "{{ post.url | prepend: site.baseurl | prepend: site.url }}",
|
||||
"url": "{{ post.url | prepend: site.baseurl | prepend: site.url }}",
|
||||
{% if post.excerpt %}"summary": {{ post.excerpt | jsonify }},{% endif %}
|
||||
{% if post.social_image %}"image": "{{ post.social_image | prepend: site.baseurl | prepend: site.url }}",{% endif %}
|
||||
"title": {{ post.title | jsonify }},
|
||||
"content_html": {{ post.content | jsonify }},
|
||||
"date_published": "{{ post.date | date_to_rfc822 }}"
|
||||
"date_published": "{{ post.date | date_to_rfc822 }}",
|
||||
"date_modified": "{{ post.last_modified_at | date_to_rfc822 }}"
|
||||
}{% unless forloop.last %},{% endunless %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
12
feed.xml
12
feed.xml
@ -8,13 +8,14 @@ layout: none
|
||||
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
||||
>
|
||||
<channel>
|
||||
<title>{{ site.name | xml_escape }}</title>
|
||||
<title>{{ site.feed_title | xml_escape }}</title>
|
||||
<description>{% if site.description %}{{ site.description | xml_escape }}{% endif %}</description>
|
||||
<sy:updatePeriod>{{ site.feed.update_period | default: "daily" | xml_escape }}</sy:updatePeriod>
|
||||
<sy:updateFrequency>{{ site.feed.update_frequency | default: 1 | xml_escape }}</sy:updateFrequency>
|
||||
<link>{{ site.url }}</link>
|
||||
<atom:link href="{{ site.url }}/{{ page.path }}" rel="self" type="application/rss+xml" />
|
||||
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
|
||||
<language>en-gb</language>
|
||||
{% assign feed_items = site.feed.post_limit | default: 10 %}
|
||||
{% for post in site.posts limit:feed_items %}
|
||||
{% if post.draft == false or jekyll.environment == "development" %}
|
||||
@ -29,16 +30,17 @@ layout: none
|
||||
{{ post.excerpt | xml_escape }}
|
||||
</description>
|
||||
{% else %}
|
||||
<description>
|
||||
Work a little, play a little, dream into summer, celebrate a great winter gone by, keep movin'... <br />]]>
|
||||
<description>
|
||||
{{ post.excerpt | xml_escape }}
|
||||
</description>
|
||||
{% endif %}
|
||||
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
||||
<link>{{ site.url }}{{ post.url }}</link>
|
||||
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
|
||||
|
||||
</item>
|
||||
{% if post.social_image %}
|
||||
<media:thumbnail width="250" height="250" url="{{ site.url }}{{ post.social_image }}"/>
|
||||
{% endif %}
|
||||
</item>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</channel>
|
||||
|
Loading…
x
Reference in New Issue
Block a user