Skip to main content

Recent Updates (RSS Aggregation)

"Recent Updates" displays the latest posts from an external blog as cards on the homepage, browsable with left/right arrows (max 3). Ideal for landing mode: this site has no articles, but aggregates the latest from a separate blog onto the personal homepage.

recent_updates:
enable: true
rss_url: https://example.com/feed.xml # blog RSS feed URL
max_count: 3 # max number of cards (recommend ≤ 3)
title: Recent Updates # section title
show_excerpt: true # whether to show excerpts
excerpt_length: 80 # max excerpt character count

How it works

The theme fetches and parses RSS at build time during hexo generate on the server, rendering post data directly into static HTML. Advantages:

  • No CORS issues: the client doesn't need to make cross-origin RSS requests;
  • Stable loading in mainland China: no dependency on third-party proxies (like rss2json, allorigins); the output is pure static HTML;
  • SEO-friendly: post cards exist directly in the HTML.
note

Fetch failures do not abort the build — they only print a warning and hide the "Recent Updates" section on the homepage. So even if the blog RSS is temporarily unreachable, the site still generates fine.

Because data is fetched at build time, you need to re-run hexo generate after your blog updates to refresh the homepage cards (pair with CI/scheduled builds for automation).

RSS structure requirements

The theme ships with a lightweight parser (no extra dependencies) that supports both RSS 2.0 and Atom 1.0. The default feeds generated by most blog systems (Hexo's hexo-generator-feed, WordPress, Ghost, Typecho, etc.) meet these requirements.

RSS 2.0

Each <item> should contain:

FieldTagRequiredNotes
Title<title>YesPost title
Link<link>YesPost URL
Date<pubDate>YesRFC 822 format, e.g. Mon, 15 Jan 2024 10:00:00 +0800
Excerpt<description> or <content:encoded>NoSupports CDATA and HTML; tags are stripped and content truncated automatically

Atom 1.0

Each <entry> should contain:

FieldTagRequiredNotes
Title<title>YesPost title
Link<link href="..."/>YesPost URL (takes the href attribute)
Date<updated> or <published>YesISO 8601 format, e.g. 2024-01-15T10:00:00Z
Excerpt<summary> or <content>NoSupports CDATA and HTML; tags are stripped and content truncated automatically

Example (RSS 2.0)

<rss version="2.0">
<channel>
<item>
<title>My First Post</title>
<link>https://example.com/post-1</link>
<pubDate>Mon, 15 Jan 2024 10:00:00 +0800</pubDate>
<description><![CDATA[<p>Post excerpt content.</p>]]></description>
</item>
</channel>
</rss>
tip

Recommended: install hexo-generator-feed on your Hexo blog to generate RSS. Configure feed: { type: atom, path: feed.xml, limit: 20 } in your blog's root _config.yml, then point recent_updates.rss_url to that feed URL.