Closed Erin-Cecele closed 1 year ago
@zsofiaj, Thank you for reporting this issue. This also appears to be occurring in our Getty Quire publications. There appears to be a straightforward solution that we are working on now. We will keep you updated!
This has been fixed with PR #799, and will be released in upcoming Quire 11ty version 1.0.0-rc.13
.
In the meantime, to fix the issue in existing projects, open the _plugins/vite/index.js
file in your project and add the _assets/downloads
directory to the list of copy targets there that start around line 55. So, it looks like this:
plugins: [
copy({
targets: [
{
src: 'public/*',
dest: outputDir,
},
{
src: path.join(inputDir, '_assets', 'images', '*'),
dest: path.join(outputDir, '_assets', 'images')
},
{
src: path.join(inputDir, '_assets', 'downloads', '*'),
dest: path.join(outputDir, '_assets', 'downloads')
},
{
src: path.join(inputDir, '_assets', 'fonts', '*'),
dest: path.join(outputDir, '_assets', 'fonts')
}
]
})
]
Thanks so much, @geealbers. I was not able to find a _plugins/vite/index.js file, though. I don't see the "vite" folder in my "_plugins" folder. See attached screenshot. Am I looking in the wrong place?
@geealbers Actually I found that same text in the .eleventy.js file in the main directory. I added the missing _assets/downloads directory to the list of copy targets there, and that fixed it. Our pdf downloads fine now. Is this an okay way to fix it? And will I need to undo this once the Quire 11ty version 1.0.0-rc.13 has been released?
@zsofiaj good sleuthing! I wasn't aware of this but I guess sometime between the version you started your project on, and the latest version of Quire, we moved some stuff from .eleventy.js
and into vite/index.js
. Whenever you go to update your project the next time, as long as you bring in both the _plugins
directory and the .eleventy.js
along with everything else (which is what you would normally do anyway), the fix will persist and you won't need to do or undo anything.
Great, thank you @geealbers !
Discussed in https://github.com/thegetty/quire/discussions/787