Halo-Lab / eleventy-packages

Monorepo for all Eleventy plugins.
24 stars 1 forks source link

Bug: eleventy-plugin-styles: Creates page folders which conflict with page .html files #9

Closed seangwright closed 2 years ago

seangwright commented 2 years ago

For some reason, my site is creating folders for pages but then failing to create the pages because the names of the html files generated for the pages conflicts with the folders created by this plugin:

image

Here's my config

const { styles } = require('eleventy-plugin-styles');

module.exports = function (eleventyConfig) {
  // Site title
  eleventyConfig.addGlobalData('siteTitle', '...');

  // Add plugins
  eleventyConfig.addPlugin(styles, {
    inputDirectory: 'src/styles',
    publicDirectory: 'styles',
  });

  // ..

  return {
    dir: {
      input: 'src',
      output: '_site',
      includes: 'includes',
      layouts: 'layouts',
      data: 'data',
    },
    templateFormats: ['njk', 'md'],
    htmlTemplateEngine: 'njk',
    markdownTemplateEngine: 'njk',
  };

I created a minimal reproduction

https://github.com/seangwright/eleventy-plugin-styles-path-error

Kapelianovych commented 2 years ago

Hi! Sorry for the late answer and fix. It turned out that Eleventy uses the / character as a path delimiter even on Windows. It is fixed in 1.4.3. Thanks for your contribution!