Skip to content

Copy unprocessed static files, including HTML, to output directory #1889

Answered by pdehaan
robindotis asked this question in Q&A
Discussion options

You must be logged in to vote

I think this largely depends on how your project is set up, and where your "old/" folder lives.
The one gotcha I always forget about is: https://www.11ty.dev/docs/copy/#manual-passthrough-file-copy-(faster)

Passthrough File Copy entries are relative to the root of your project and not your Eleventy input directory.

Here's what my sample project looks like:

tree -aI node_modules
.
├── .eleventy.js
├── old/
│   ├── site.css
│   ├── site.html
│   ├── site.js
│   └── site.png
├── package-lock.json
├── package.json
├── src/      ########## My input directory
│   ├── assets/
│   │   ├── foo.css
│   │   ├── foo.js
│   │   └── foo.png
│   └── index.njk
└── www/      ######### My output directory

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@robindotis
Comment options

@pdehaan
Comment options

@robindotis
Comment options

Answer selected by robindotis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants