Skip to content

Commit d7401e2

Browse files
committed
Continue trying to fix RSS feed absolute URLs
Originally, both the RSS feed and the board list pages used the same board_image.html include; I added `| absolute_url` to this file for the RSS feed, which functions better when all links are absolute. Using `| absolute_url` is preferable to just prepending `https://circuitpython.org` because it can give a correct URL when previewing locally with `bundle run jekyll serve`. This crossed with a change by @makermelissa to switch the feeds to use a separate include, presumably (though I didn't specifically ask her about it) to avoid having the absoulute URLs where they were not needed. In this commit, I remove the use of `absolute_url` in the include that's used to generate regular pages, while switching from prepending `https://circuitpython.org` to using `| absolute_url` on the include that is used just for the feed.
1 parent 45c3c37 commit d7401e2

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{% assign small_image = "/assets/images/boards/small/" | append: include.board_image %}
22
{% assign large_image = "/assets/images/boards/large/" | append: include.board_image %}
3-
<!-- (uses an absolute URL for better compatibility with RSS readers -->
4-
<img srcset="{{ small_image | absolute_url }} 300w,
5-
{{ large_image | absolute_url }} 700w"
3+
<img srcset="{{ small_image }} 300w,
4+
{{ large_image }} 700w"
65
sizes="(max-width: 1024px) 700px,
76
300px"
8-
src="{{ large_image | absolute_url }}" alt="Image of Board" loading="lazy">
7+
src="{{ large_image }}" alt="Image of Board" loading="lazy">
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{% assign small_image = "/assets/images/boards/small/" | append: include.board_image %}
2-
{% assign large_image = "/assets/images/boards/large/" | append: include.board_image %}
3-
<img srcset="https://circuitpython.org{{ small_image }} 300w,
4-
https://circuitpython.org{{ large_image }} 700w"
1+
{% assign small_image = "/assets/images/boards/small/" | append: include.board_image | absolute_url %}
2+
{% assign large_image = "/assets/images/boards/large/" | append: include.board_image | absolute_url %}
3+
<img srcset="{{ small_image }} 300w,
4+
{{ large_image }} 700w"
55
sizes="(max-width: 1024px) 700px,
66
300px"
7-
src="https://circuitpython.org{{ large_image }}" alt="Image of Board" loading="lazy">
7+
src="{{ large_image }}" alt="Image of Board" loading="lazy">

0 commit comments

Comments
 (0)