mirror of
https://github.com/danbee/danbarber.me
synced 2025-03-04 08:59:10 +00:00
Limit feeds to categorised posts
This commit is contained in:
parent
5239875f2b
commit
d83043e796
@ -26,7 +26,7 @@ layout:
|
|||||||
},
|
},
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"items": [
|
"items": [
|
||||||
{% assign posts = site.posts | where_exp: "post", "post.draft != true" %}
|
{% assign posts = site.posts | where_exp: "post", "post.draft != true" | where_exp: "post", "post.categories contains 'blog'" %}
|
||||||
{% for post in posts limit: 20 %}
|
{% for post in posts limit: 20 %}
|
||||||
{
|
{
|
||||||
"id": {{ post.id | absolute_url | jsonify }},
|
"id": {{ post.id | absolute_url | jsonify }},
|
||||||
|
|||||||
@ -26,8 +26,8 @@ layout:
|
|||||||
},
|
},
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"items": [
|
"items": [
|
||||||
{% assign posts = site.posts | where_exp: "post", "post.draft != true" %}
|
{% assign posts = site.posts | where_exp: "post", "post.draft != true" | where_exp: "post", "post.categories contains 'photos'" %}
|
||||||
{% for post in site.categories.photos limit: 20 %}
|
{% for post in posts limit: 20 %}
|
||||||
{
|
{
|
||||||
"id": {{ post.id | absolute_url | jsonify }},
|
"id": {{ post.id | absolute_url | jsonify }},
|
||||||
"url": {{ post.url | absolute_url | jsonify }},
|
"url": {{ post.url | absolute_url | jsonify }},
|
||||||
|
|||||||
2
feed.xml
2
feed.xml
@ -15,7 +15,7 @@ layout:
|
|||||||
</author>
|
</author>
|
||||||
<generator uri="http://octopress.org/">Octopress</generator>
|
<generator uri="http://octopress.org/">Octopress</generator>
|
||||||
|
|
||||||
{% for post in site.posts limit: 20 %}
|
{% for post in site.categories.blog limit: 20 %}
|
||||||
<entry>
|
<entry>
|
||||||
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
|
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
|
||||||
<link href="{{ site.url }}{{ post.url }}"/>
|
<link href="{{ site.url }}{{ post.url }}"/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user