cotes2020 / jekyll-theme-chirpy

A minimal, responsive, and feature-rich Jekyll theme for technical writing.
https://chirpy.cotes.page
MIT License
7.27k stars 5.71k forks source link

Issue with <content src="{{ post_absolute_url }}" /> in Feed #1973

Open YorkWaugh opened 1 week ago

YorkWaugh commented 1 week ago

Checklist

Is your feature request related to a problem? Please describe

I’ve noticed that the feed generated by the Jekyll Chirpy theme uses <content src="{{ post_absolute_url }}" />, which, while defined in the Atom standard, seems to have limited support among RSS readers. This leads to difficulties for users trying to read the full content of posts through their RSS readers, as many may not handle external links properly.

Describe the solution you'd like

I would suggest using the complete HTML of the page within the tag instead of a reference to the URL. This would ensure that all readers, regardless of their implementation, can properly display the content.

Describe alternatives you've considered

Currently, my temporary workaround involves adding the following code in the _includes/post-content.html file:

{%- capture content -%}
{%- if post.content -%}
  {{- post.content -}}
{%- else -%}
  {%- include no-linenos.html content=post.content -%}
{%- endif -%}
{%- endcapture -%}

{{- content | strip -}}

Then, I replace <content src="{{ post_absolute_url }}" /> in feed.xml with: <content type="html"><![CDATA[{% include post-content.html %}]]></content>

Additional context

No response