1

I'm in the last stages of building myself a static portfolio site, and am building an RSS feed. For the time being, I'll be managing it manually since I only know some HTML and CSS at the moment, but I'll be learning PHP and SQL soon to build a database for my posts and automate the pagination, time stamping, etc.

At the moment, my feed works and I can pull up the test entry in my feed reader (I'm using NetNewsWire), but it posts just the first paragraph as a summary. I want the feed to post the full test, though. How am I supposed to format the feed to do this?

Below is the template I'm using in my .rss file (I got the same results as an .xml file, in case anyone asks). Originally I had white space between the

tags, and removed them to see if that caused any issues, but they didn't, so I left it as-is here to show its current state.

<rss version="2.0">
    <channel>
        <title>Site Name</title>
        <link>(Add your site here)</link>
        <description></description>
        <item>
            <title>Test Title</title>
            <pubDate>(Add a pub date here)</pubDate>
            
            <description><![CDATA[<p>One paragraph.</p><p>Another paragraph. This doesn't show up in NNW.</p><p>Nor does this one.</p><p>Ditto.</p>]]</description>
        </item>
    </channel>
</rss>

My understanding is that I need to use CDATA to make sure my HTML formatting isn't read as XML formatting, but I have trouble finding any sort of guides online as to how to correctly format multi-paragraph posts. All the examples I find are short one-sentence posts.

Does anyone have a solution? I'd like to do this within the XML/RSS file and not use web services or programs to handle this since it's just a static site and I'm not using a CMS or anything like that.

zx485
  • 28,498
  • 28
  • 50
  • 59
  • 1
    Aha, I solved my problem. I forgot to add a > before the tag in order to close the CDATA tag. Phew! Glad it was an easy fix, but it's always the needles in haystacks that trip me up. – dr_colossus May 27 '23 at 01:08

0 Answers0