Skip to content

Commit ad06793

Browse files
authored
Add RSS Feed. (#38)
* Add RSS Feed * Fix feed page.
1 parent 9531a73 commit ad06793

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

_layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<link rel="apple-touch-icon" sizes="180x180" href="{{ '/images/apple-touch-icon.png' | relative_url }}" />
1313
<link rel="manifest" href="{{ '/images/site.webmanifest' | relative_url }}" />
1414
<link href="{{ '/assets/css/style.css' | relative_url }}" rel="stylesheet">
15+
<link rel="alternate" type="application/rss+xml" href="{{ site.url }}/feed.xml" />
1516
{% if page.description %}<meta name="description" content="{{ page.description }}" />{% endif %}
1617
{% if page.meta_title %}<meta property="og:title" content="{{ page.meta_title }}"/>{% else %}<meta property="og:title" content="{{ page.title }}"/>{% endif %}
1718
<meta property="og:type" content="website"/>

_posts/2024-12-17-slang-support-in-godbolt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: post
33
title: "Slang Support Now Available on Godbolt Compiler Explorer"
44
date: 2024-12-17 18:00:00 +0000
5-
categories: [ "news" ]
5+
categories: [ "blog" ]
66
tags: [slang]
77
author: "Shannon Woods, NVIDIA, Slang Working Group Chair"
88
image: /images/posts/2024-12-17-slang-support-in-godbolt.webp

feed.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: null
3+
---
4+
<?xml version="1.0" encoding="UTF-8"?>
5+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
6+
<channel>
7+
<title>{{ site.title | xml_escape }}</title>
8+
<description>{{ site.description | xml_escape }}</description>
9+
<link>{{ site.url }}{{ site.baseurl }}/</link>
10+
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
11+
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
12+
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
13+
<generator>Jekyll v{{ jekyll.version }}</generator>
14+
{% for post in site.posts limit:200 %}
15+
{% if post.sitemap != false %}
16+
<item>
17+
<title>{{ post.title | xml_escape }}</title>
18+
<description>{{ post.content | xml_escape }}</description>
19+
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
20+
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
21+
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
22+
{% for tag in post.tags %}
23+
<category>{{ tag | xml_escape }}</category>
24+
{% endfor %}
25+
{% for cat in post.categories %}
26+
<category>{{ cat | xml_escape }}</category>
27+
{% endfor %}
28+
{% if post.image %}
29+
<media:content xmlns:media="http://search.yahoo.com/mrss/" url="{{ post.image | prepend: site.baseurl | prepend: site.url }}" medium="image" type="image/webp" />
30+
{% endif %}
31+
</item>
32+
{% endif %}
33+
{% endfor %}
34+
</channel>
35+
</rss>

0 commit comments

Comments
 (0)