Skip to content

RSS-plugin causes --pathprefix to be output twice in the regular site #60

@lsolesen

Description

@lsolesen

When enabling the RSS-plugin like this:

  // RSS-feed
  eleventyConfig.addPlugin(feedPlugin, {
    type: "rss", // 'atom' or "rss", "json"
		outputPath: "/feed.xml",
		collection: {
			name: "posts", // iterate over `collections.posts`
			limit: 0,     // 0 means no limit
		},
		metadata: {
			language: "en",
			title: "Blog Title",
			subtitle: "This is a longer description about your blog.",
			base: "https://example.com/",
			author: {
				name: "Your Name",
				email: "", // Optional
			}
		},
    htmlBasePluginOptions: {
      baseHref: '/local-test/',
    }
  });

Having:

import { EleventyHtmlBasePlugin } from "@11ty/eleventy";

export default async function (eleventyConfig) {

  // Make it possible to have the site served in a sub directory
  eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
};

And I run my site with:

``´
"watch:eleventy": "eleventy --serve --pathprefix=/minimal-mistakes/",


I get the following output in my regular site:

``` Removing this part from the setup of the RSS-plugin just gives me:
    htmlBasePluginOptions: {
      baseHref: '/local-test/',
    }
<link href="/minimal-mistakes/minimal-mistakes/minimal-mistakes/feed.xml" type="application/atom+xml" rel="alternate" title="Minimal Mistakes Feed">

Removing the EleventyHtmlBasePlugin from my config, gives me:

So the pathprefix is outputted twice for my pages without me enabling the module at all.

This issue has also been created in the main 11ty repos - 11ty/eleventy#3547

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions