11ty / eleventy-plugin-rss

A pack of Eleventy plugins for generating an RSS feed.
https://www.11ty.dev/docs/plugins/rss/
MIT License
92 stars 22 forks source link

Virtual Template does not seem to work with `all` #54

Closed d3v1an7 closed 2 weeks ago

d3v1an7 commented 2 weeks ago

Having a play with the new goodness, and the first thing I tried to build was a full sitemap.

eleventy.config.js

import markdownIt from "markdown-it";
import { feedPlugin } from "@11ty/eleventy-plugin-rss";
export default async function (eleventyConfig) {
  eleventyConfig.addFilter("head", (arr, num) => {
    return num ? arr.slice(0, num) : arr;
  });
  eleventyConfig.addPlugin(feedPlugin, {
    type: "atom",
    outputPath: "/all.xml",
    collection: {
      name: "all",
      limit: 0,
    },
  });
  eleventyConfig.setLibrary("md", markdownIt());
}

page1.md

---
tags: tag1
---

Tag 1

page2.md

---
tags: tag2
---

Tag 2

When running npx @11ty/eleventy

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] Dependency Cycle Found: ___TAG___all -> ./eleventy-plugin-feed-atom.njk -> ___TAG___all (via Error)

Am using:

    "@11ty/eleventy": "3.0.0-alpha.13",
    "@11ty/eleventy-plugin-rss": "^2.0.0"

Works fine when using tag1 or tag2, but no dice for all!

zachleat commented 2 weeks ago

Shipping with RSS Plugin v2.0.2