11ty / eleventy

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.
https://www.11ty.dev/
MIT License
16.68k stars 484 forks source link

HTML files that should be passed through unmodified are being duplicated to directory + index.html #1377

Open gvwilson opened 3 years ago

gvwilson commented 3 years ago

Describe the bug

To Reproduce

./.eleventy.js configuration file

const pluginRss = require('@11ty/eleventy-plugin-rss')
const pluginSass = require('eleventy-plugin-sass')

module.exports = function(eleventyConfig) {
  eleventyConfig.addPlugin(pluginRss)
  eleventyConfig.addPlugin(pluginSass)

  eleventyConfig.addPassthroughCopy('dist')
  eleventyConfig.addPassthroughCopy('docs')

  eleventyConfig.setTemplateFormats([
    'css',
    'html',
    'jpg',
    'md',
    'njk',
    'png',
    'svg'
  ])

  return {
    passthroughFileCopy: true
  }
}

./.eleventyignore file (probably not relevant, but hey...)

README.md
old-examples

Excerpt from ./package.json:

  "scripts": {
    "build-dev": "webpack --config webpack.config.js",
    "build": "webpack --config webpack.production.config.js",
    "watch": "webpack --config webpack.config.js --watch",
    "check": "node bin/check_translations.js",
    "coverage": "nyc --reporter=html --reporter=text mocha",
    "data": "data/generate.js data/*.csv",
    "docs": "jsdoc -c .jsdocrc --destination docs --readme README.md libs/*.js",
    "lint": "eslint index.js libs/*.js blocks/*.js",
    "serve": "npx @11ty/eleventy --serve",
    "site": "npx @11ty/eleventy",
    "test": "mocha"
  }

Expected behavior

Environment:

leepowelldev commented 3 years ago

Same issue - is there anyway to prevent the behaviour of directory + index.html ? and just build templates to their respective .html files?