All Articles
Uncategorized

Ding Dong

Jan 15, 2026
2 min read
INSIGHT

DingRSS Fallback for WordPress Connection

Goal: Enable blog posts to load on aksara.me by fetching data from the WordPress RSS feed (/feed/) instead of the REST API, which is blocked by the host’s firewall in cloud environments.

User Review Required

NOTE

This is a fallback mechanism. The RSS feed may provide slightly less structured data (e.g., categories might be different, images less robust) than the full REST API, but it ensures content appears.

Proposed Changes

src/lib/wordpress.ts

  • Install rss-parser (or use manual XML parsing to avoid large deps if preferred, likely manual for simplicity).
  • Reasoning: RSS is standard XML. Javascript’s DOMParser isn’t available in Node, so we’ll use a lightweight regex or fast-xml-parser if available, or just a simple string parsing helper since we only need basic fields (title, slug, date, content).
  • Plan: Use a lightweight custom parser or fast-xml-parser if already in project. Check package.json first. If not, use rss-parser.
  • [MODIFY] getPosts function:
    1. Attempt REST API fetch.
    2. If REST API fails OR returns empty array []:
    3. Fetch https://cms.aksara.me/feed/.
    4. Parse XML to extract: titlelink (for slug), pubDatecontent:encoded (or description).
    5. New: Extract the first <img> src from content:encoded to use as featured_media_url.
    6. Map to WPPost interface.

Verification Plan

Automated Tests

  1. Unit Test: Create test-rss.js (like we did checking check-rss.js) but this time verifying the parsed output matches the WPPost structure.
  2. Build Verification: Run npm run build locally to see if it prefetches the RSS data successfully.

Manual Verification

Checkaksara.me/blog should show 2 posts (“Ding” and “Hello world”).

Live Site: Deploy to Netlify.

AN

Architect of Growth

Aksara Nkr

Digital Marketing Specialist

Helping brands navigate the complex intersection of technical architecture and performance marketing. Specialized in AIO, GEO, and high-scale SEO.