Skip to content

Commit

Permalink
Add RSS Feed. (#38)
Browse files Browse the repository at this point in the history
* Add RSS Feed

* Fix feed page.
  • Loading branch information
csyonghe authored Dec 19, 2024
1 parent 9531a73 commit ad06793
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<link rel="apple-touch-icon" sizes="180x180" href="{{ '/images/apple-touch-icon.png' | relative_url }}" />
<link rel="manifest" href="{{ '/images/site.webmanifest' | relative_url }}" />
<link href="{{ '/assets/css/style.css' | relative_url }}" rel="stylesheet">
<link rel="alternate" type="application/rss+xml" href="{{ site.url }}/feed.xml" />
{% if page.description %}<meta name="description" content="{{ page.description }}" />{% endif %}
{% if page.meta_title %}<meta property="og:title" content="{{ page.meta_title }}"/>{% else %}<meta property="og:title" content="{{ page.title }}"/>{% endif %}
<meta property="og:type" content="website"/>
Expand Down
2 changes: 1 addition & 1 deletion _posts/2024-12-17-slang-support-in-godbolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: "Slang Support Now Available on Godbolt Compiler Explorer"
date: 2024-12-17 18:00:00 +0000
categories: [ "news" ]
categories: [ "blog" ]
tags: [slang]
author: "Shannon Woods, NVIDIA, Slang Working Group Chair"
image: /images/posts/2024-12-17-slang-support-in-godbolt.webp
Expand Down
35 changes: 35 additions & 0 deletions feed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: null
---
<?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="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
{% for post in site.posts limit:200 %}
{% if post.sitemap != false %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}
{% for cat in post.categories %}
<category>{{ cat | xml_escape }}</category>
{% endfor %}
{% if post.image %}
<media:content xmlns:media="http://search.yahoo.com/mrss/" url="{{ post.image | prepend: site.baseurl | prepend: site.url }}" medium="image" type="image/webp" />
{% endif %}
</item>
{% endif %}
{% endfor %}
</channel>
</rss>

0 comments on commit ad06793

Please sign in to comment.