من RSS إلى 66 شبكة تواصل اجتماعي: Facebook، وInstagram، وX، وLinkedIn، وTelegram، والمزيد المدونة برنامج التسويق بالعمولة اتصل بنا
تسجيل الدخول ابدأ مجاناً
Updated: 2026-10-27
Lume RSS Feed: Feed Plugin Setup, Dates and Auto-Posting

Short answer: To add an RSS feed to a Lume site, import the feed plugin in _config.ts and call site.use with an output file such as /feed.rss, a query that selects your posts, a limit and the fields of each item. Set the location of the site so that every link in the feed is absolute, give every post an explicit date, add a discovery link to your layout, build the site, check the generated file with curl and a validator and give its public address to an auto-poster. New posts are then shared on your social channels as soon as the next build is published.

Lume is a static site generator for Deno. It turns markdown, templates and data files into plain pages that any host can serve, and it is popular for blogs, documentation and small business sites because the build is quick and the configuration is a single TypeScript file. A site like that usually publishes things people want to follow, such as articles, release notes or announcements, and a feed is the standard way to let readers, aggregators and auto-posters watch them without an account. Lume ships a feed plugin for exactly this job, so you do not have to write the XML yourself. This guide shows the full setup, explains the options that matter, and ends with the checks that keep the feed dependable after you connect other systems to it.

Why a Lume site should publish a feed

A static site has no database that a visitor can query, so a feed is often the only machine-readable list of what is new. Readers who follow it in a feed reader receive every post in order. Search engines and aggregators discover fresh pages faster. And an auto-poster such as PostRSS can read the same file and share each new item on social networks, which turns a quiet publishing routine into a steady stream of visitors without extra work after each release.

If you are comparing generators, the same ideas are covered for Hexo, Zola و Astro. If you already know your site produces a feed somewhere and only need its address, read which RSS feed URL to use.

Install and configure the plugin

The feed plugin is part of Lume, so there is nothing to install. Open _config.ts and register it. The configuration below creates a feed of the newest posts, written to the output folder as /feed.rss and also as a JSON feed for tools that prefer it. It also sets the location of the site, which Lume uses to build absolute addresses.

// _config.ts
import lume from "lume/mod.ts";
import feed from "lume/plugins/feed.ts";

const site = lume({
  location: new URL("https://example.com"),
});

site.use(feed({
  output: ["/feed.rss", "/feed.json"],
  query: "type=post",
  sort: "date=desc",
  limit: 20,
  info: {
    title: "Example Journal",
    description: "News and guides from Example Journal.",
    lang: "en",
    authorName: "Example Journal",
  },
  items: {
    title: "=title",
    description: "=excerpt",
    published: "=date",
    content: "=children",
    categories: "=tags",
    lang: "=lang",
  },
}));

export default site;

The options are short but each one matters. The query selects pages, here every page whose type variable is post. The sort option orders them by date, newest first, and the limit keeps the file small; by default the plugin includes only the ten newest items, so raise it if your readers or tools expect a longer history. The extension of the output file chooses the format: the rss extension produces RSS and the json extension produces a JSON feed.

Mark your posts so the query finds them

The query only works if your posts carry the variable it looks for. The simplest approach is a data file in the posts folder, so that every page inside it receives the same type, layout and tags without repeating them. Each post then needs a title, a date and an excerpt of one or two sentences.

# posts/_data.yml
type: post
layout: layouts/post.vto
tags:
  - news

# posts/2026-10-27_hello-lume.md
---
title: Hello, Lume
date: 2026-10-27 09:00:00
excerpt: A short note on how this site publishes new posts.
---
The body of the post goes here.

Write the date explicitly. A feed is sorted by it, and every auto-poster uses it to decide what is new. If a page has no date, a generator may fall back to a file timestamp, and on a build server that is often the moment the repository was checked out, which makes old posts look new after every deployment. An explicit date in the front matter or in the file name removes the guesswork.

Absolute links and the site location

Feed readers and auto-posters fetch your feed from outside your site, so a relative address such as /blog/hello-lume/ means nothing to them. The location option in the example above tells Lume which domain the site will be served from, and the plugin uses it to write absolute links for items and for the feed itself. Without it, links can point to the local development address and look correct on your own computer while failing everywhere else. After the first build, open the generated file and confirm that every link starts with your real domain and uses https; the reasons are explained in why relative URLs break feed links.

If you publish from a CI service, pass the location as a command line option or an environment variable in the build step, so that preview builds do not leak a staging address into a feed that is later cached. Staging feeds cause real trouble when an auto-poster finds one; see staging sites and RSS auto-posting.

Choose the item fields on purpose

The items option maps Lume variables to feed fields. Each decision changes what readers and auto-posters see:

  • title becomes the headline of each item and is the first thing an auto-poster uses for the text of a post.
  • description should be a short plain summary. If it is empty, many tools fall back to the first words of the content.
  • content carries the full text. If you include it, keep the output reasonable; if you prefer readers to visit your site, leave full content out and rely on the description. The trade-off is explained in full text or excerpt in an RSS feed.
  • published must come from the date of the post, never from the build time.
  • image can be set from a cover variable if you want an image to travel with each item, which helps auto-posters attach a picture.

You can also read values from the rendered page with a CSS selector, for example taking the content from the element that holds the article body, and define fallbacks with double vertical bars, so that a missing excerpt falls back to a different field. Keep fallbacks simple; every extra rule is one more thing that can silently produce an empty field.

Where each field comes from

Feed elementLume sourceRule
Titletitle variablePlain text, no markup
LinkPage address plus locationAbsolute, https, returns 200
Published datedate variableSet in front matter, never the build time
Summaryexcerpt variableOne or two sentences
الفئاتtags variableShort, consistent names
Feed addressoutput optionNever changes once published

The address of the feed itself deserves the most care. Subscribers and auto-posters store it, so if you rename the file you break every connection. Choose a path once, such as /feed.rss, and keep it. If you must move it, leave a copy at the old address.

Make the feed discoverable

Add a link element to the head of your base layout so browsers, feed readers and tools can find the feed from any page. It needs a rel value of alternate, a type of application/rss+xml, a title and the address of the feed. With that in place, a visitor or an auto-poster that only knows your home page can locate the feed on its own. The details, including how to add several feeds to one site, are in the guide to feed autodiscovery.

<!-- in layouts/base.vto, inside head -->
<link rel="alternate" type="application/rss+xml"
      title="Example Journal" href="https://example.com/feed.rss">

Use the address exactly as it is served, and keep the link on every page, not only on the home page.

Build, serve and test the feed

Run the build and look at the output before you publish anything. The commands below build the site once and then serve the output folder locally, so you can fetch the file with curl as an outside tool would.

deno task build
deno task serve
curl -i http://localhost:3000/feed.rss

Then work through a short list of checks:

  • Confirm a 200 status and that the file starts with an XML declaration and an rss element.
  • Confirm that every link is absolute and uses your real domain.
  • Paste the public address into the W3C Feed Validation Service and fix every error.
  • Check that the newest post is first and that the dates are correct and in the past.
  • Rebuild without changing anything and confirm that no item changed its address or date.

There is a longer checklist in the feed validation guide and a short routine in the guide to debugging a feed with curl. Remember that a static host may serve the correct content type only if the file extension is known to it; if your host sends the file as plain text, see the content type header guide.

Publishing and scheduling on a static host

A static site contains only what existed at the last build. That has two consequences for a feed. First, a new post appears in the feed only after you rebuild and deploy, so make sure your host or CI service rebuilds whenever content changes. Second, if you want to schedule posts for a future date, you need a scheduled rebuild, for example a daily job, and a condition that keeps posts dated in the future out of the build. Lume can exclude pages marked as drafts from production builds, which is a convenient way to hold back work in progress; keep drafts out of the feed query so an auto-poster never shares an unfinished article.

Whatever setup you choose, avoid republishing old posts by accident. Moving files, changing a slug or editing the date in front matter changes what a feed contains, and an auto-poster may treat the changed item as new. The reasons and the fixes are covered in why a feed auto-posts the same article twice.

Common mistakes to avoid

  • No location set. Links point to the development address and fail for every outside reader.
  • Build time instead of the post date. Every deployment makes old posts look new.
  • A limit that is too small. The default of ten items is fine for a blog that posts weekly, but a site that publishes several items a day can push items out of the feed before a slow reader sees them.
  • Changing the feed path. Every stored subscription breaks silently.
  • Drafts in the feed. A query that is too wide shares unfinished work.
  • Unescaped markup in titles. Validate after every change to the templates that produce them.

How PostRSS works with a Lume feed

PostRSS has been publishing RSS and Atom feeds to social networks since 2014. Paste the address of your Lume feed, connect your accounts and choose how each post is built from the title, the description or the page title. PostRSS checks the feed as often as every minute and shares each new item, with its image and link, to the channels you choose among 66 supported networks, messengers, team chats and blogs, including LinkedIn, X, Bluesky, Mastodon and Telegram. Keyword filters, UTM parameters and posting windows let you tune each channel, and webhooks connect PostRSS to your own systems. See the PostRSS features page and the plan limits on the pricing page. More developer guides are under the Technical Guide tag.

قراءة ذات صلة

The bottom line

Lume needs one plugin call to publish a dependable feed: register the feed plugin, select your posts with a query, sort by date, raise the limit if you publish often and map the title, summary, date and tags to the item fields. Set the location of the site so links are absolute, write an explicit date for every post, add a discovery link to your layout, rebuild whenever content changes, test the generated file with curl and a validator, keep its address unchanged and connect it to an auto-poster. After that, every post you publish can reach your readers and your social channels automatically.

FAQ

Does Lume have a built-in RSS feed?

Yes. Lume includes a feed plugin that generates RSS and JSON feeds from any collection of pages, so you only configure it in _config.ts and rebuild the site.

Why are my feed links pointing to localhost?

The location of the site is not set. Pass a URL with your real domain in the options of the lume function, or as a build option on your CI service, and rebuild.

How many items does the Lume feed include?

The default is ten. Set the limit option to a higher number if you publish often or want readers and tools to see a longer history.

Can I schedule posts on a static Lume site?

Not by itself, because a static site contains only what existed at the last build. Use a scheduled rebuild and keep future-dated or draft pages out of the build and out of the feed query.

Can I use this feed with PostRSS?

Yes. PostRSS reads any valid RSS or Atom address that is reachable without a login. Paste the address, connect your channels and new items are shared as soon as they appear.

New guides, once a month

What changed in the networks, what broke, and how to fix it before it costs you reach.

We send a confirmation e-mail first. Unsubscribe any time.

المزيد من أدوات فريقنا

من تطوير Internet Solutions، الفريق الذي يقف وراء PostRSS. كل منتج يوفّر وقتك بطريقته الخاصة.

دردشة مباشرة بالذكاء الاصطناعي للمواقع Talkmio يجيب موقعك على الزوار على مدار الساعة من محتواك الخاص وبلغتهم. خطة مجانية · دون بطاقة مساعد ذكاء اصطناعي Ask Mio دردشة وبرمجة وتصميم وكتابة وبحث. يختار Mio أفضل نموذج لكل مهمة. خطة مجانية طيار آلي بالذكاء الاصطناعي للمدونة ووسائل التواصل AI Blog Autopilot يكتب الذكاء الاصطناعي مقالات SEO من 2,000 إلى 3,000 كلمة وينشر كل مقال على أكثر من 60 شبكة اجتماعية. أول 3 مقالات مجانًا فحص صحة الموقع تدقيق الذكاء الاصطناعي للموقع SEO والسرعة وSSL والأمان وإعدادات البريد في تقرير واحد، مرتبة حسب الأولوية. أول فحص مجانًا زحف SEO متعمّق تدقيق الذكاء الاصطناعي لتحسين محركات البحث للموقع زحف SEO كامل عبر 7 محاور، بما فيها الظهور في البحث بالذكاء الاصطناعي، مع إصلاحات مرتبة حسب الأثر. أول فحص مجانًا خلاصات RSS والمنتجات منشئ خلاصة RSS أنشئ RSS من أي صفحة ويب، إضافةً إلى خلاصات منتجات لـ Google وMeta تُحدَّث تلقائيًا. خطة مجانية تطوير المواقع وSEO حلول الإنترنت مواقع ومتاجر إلكترونية وأنظمة مخصصة يصممها فريقنا ويبنيها ويديرها. منذ 2011