Skip to content

Commit

Permalink
organização nos geradores de feed.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelfino committed Jul 19, 2024
1 parent 82fc274 commit b85e924
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions feed/feed-astronomia.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
layout: null
title: "RSS Feed por Categoria"
permalink: /astronomia/feed.xml
category: "Astronomia" # Substitua 'your-category' pela categoria desejada
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/</link>
<atom:link href="{{ site.url }}{{ site.baseurl }}{{ page.url }}" rel="self" type="application/rss+xml" />
{% assign posts = site.categories[page.category] | slice: 0, 10 %}
{% for post in posts %}
<item>
<title>{{ post.title | xml_escape }}</title>
<link>{{ site.url }}{{ site.baseurl }}{{ post.url }}</link>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<description>{{ post.excerpt | xml_escape }}</description>
<guid isPermaLink="true">{{ site.url }}{{ site.baseurl }}{{ post.url }}</guid>
</item>
{% endfor %}
</channel>
</rss>
1 change: 1 addition & 0 deletions feed.xml → feed/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: null
title: "RSS Feed"
permalink: /feed.xml
redirect_from: /feed
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
Expand Down

0 comments on commit b85e924

Please sign in to comment.