adds rss.json file, moves some meta-data out into meta file for consolidation (#649)

This commit is contained in:
Brandon Chang
2023-06-06 01:46:53 -07:00
committed by GitHub
parent 274f170c6e
commit 87a6cbc40e
3 changed files with 28 additions and 3 deletions

2
_data/meta.yml Normal file
View File

@@ -0,0 +1,2 @@
title: Godot Engine Official
description: Godot is a 2D and 3D free and open source game engine developed by a community of contributors. It provides a huge set of common tools, so you can just focus on making your game without reinventing the wheel.

23
pages/rss.json Normal file
View File

@@ -0,0 +1,23 @@
---
permalink: /rss.json
---
{
"title": "{{ site.data.meta.title }}",
"description": "{{ site.data.meta.description }}",
"items": [
{% assign latest_posts = site.article | sort:"date" | reverse %}
{% for post in latest_posts limit:24 %}
{
"title": "{{ post.title | escape }}",
"link": "{{ site.url }}{{ post.url }}",
"description": "{{ post.excerpt | escape }}",
"categories": [{% for category in post.categories %}"{{ site.data.categories[category][0].name }}"{% unless forloop.last %},{% endunless %}{% endfor %}],
"guid": "{{ site.url }}{{ post.url }}",
"dc:creator": "{{ post.author | escape }}",
"pubDate": "{{ post.date | date: "%a, %d %b %Y %X +0000" }}",
"image": "{{ site.url }}{{ post.image }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}

View File

@@ -6,9 +6,9 @@ permalink: /rss.xml
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Godot Engine Official</title>
<link>{{ site.url }}</link>
<description>Godot is a 2D and 3D free and open source game engine developed by a community of contributors. It provides a huge set of common tools, so you can just focus on making your game without reinventing the wheel.</description>
<title>{{ site.data.meta.title }}</title>
<link>{{ site.meta.url }}</link>
<description>{{ site.data.description }}</description>
<atom:link href="{{ site.url }}/rss.xml" rel="self" type="application/rss+xml" />
{% assign latest_posts = site.article | sort:"date" | reverse %}