Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix images in rss feed and default blog post image #375

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix images in rss feed and default blog post image
ByteHamster committed Dec 3, 2024
commit b7428c3919f8e32dfdc47faad53857ce8f8c0cbb
2 changes: 1 addition & 1 deletion blog/index.html
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ <h1 class="color-gray-800 weight-700">{% t titles.blog %}</h1>
<div class="col-12 col-md-4 mb-4 d-flex">
<div class="card highlight-card">
<a class="stretched-link" href="{{ site.baseurl }}{{ blog.url | replace:'.html','' }}"></a>
<img src="/assets/{% if blog.image %}images/blog/{{ blog.image }}{% else %}branding/default-cover.png{% endif %}" loading="lazy" />
<img src="/assets/images/blog/{% if blog.image %}{{ blog.image }}{% else %}2020/default.png{% endif %}" loading="lazy" />
<h3 class="weight-700 pt-4">{{ blog.title }}</h3>
<p class="mb-4">{{ blog.excerpt | strip_html | truncate: 100 }}</p>
<div class="bottom">
5 changes: 3 additions & 2 deletions rss.xml
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@
layout: null
---
<?xml version="1.0"?>
<rss version="2.0">
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>AntennaPod Blog</title>
<description>AntennaPod Blog posts</description>
<link>{{ site.url }}/blog</link>
<image>
<url>{{ site.url }}/assets/images/favicons/android-chrome-512x512.png</url>
<url>{{ site.url }}/assets/branding/favicons/android-chrome-512x512.png</url>
<title>AntennaPod Blog</title>
</image>
<language>en-us</language>
@@ -26,6 +26,7 @@ layout: null
{{ blog.content | replace:'="/',url_and_equals }}
]]></description>
<pubDate>{{ blog.date | date_to_rfc822 }}</pubDate>
<media:content medium="image" url="{{ site.url }}/assets/images/blog/{% if blog.image %}{{ blog.image }}{% else %}2020/default.png{% endif %}" />
</item>
{% endif %}
{% endfor %}