-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assets not routing to _site (?) #1
Comments
Are you getting any issues when building the site? I have a similar structure and am getting issues when building the site. |
Nope, my build looks like this: ▶ npm run serve
> eleventy-base-blog@5.0.2 serve /Users/stephennixon/code/blog
> eleventy --serve
Writing _site/sitemap.xml from ./sitemap.xml.njk.
Writing _site/feed/feed.xml from ./feed/feed.njk.
Writing _site/feed/.htaccess from ./feed/htaccess.njk.
Writing _site/feed/feed.json from ./feed/json.njk.
Writing _site/404.html from ./404.md.
Writing _site/index.html from ./index.njk.
Writing _site/page-list/index.html from ./page-list.njk.
Writing _site/tags/index.html from ./tags-list.njk.
Writing _site/tags/tips/index.html from ./tags.njk.
Writing _site/posts/getting-started/index.html from ./posts/2020-05-01--getting-started-in-type/index.md.
Writing _site/posts/better-zips/index.html from ./posts/2020-08-25--making-better-zips/index.md.
Writing _site/posts/drawbot-vscode/index.html from ./posts/2020-06-15--drawbot-in-vscode/index.md.
Writing _site/posts/intro-to-fonttools/index.html from ./posts/2020-06-16--intro-to-fonttools/index.md.
Writing _site/posts/font-design-on-a-chromebook/index.html from ./posts/2020-11-01--font-design-on-a-chromebook/index.md.
Writing _site/posts/exploring-HOI/index.html from ./posts/2020-11-08--nonlinear-interpolation/index.md.
Writing _site/posts/robofont-tips/index.html from ./posts/2020-12-11--robofont-tips/index.md.
Writing _site/posts/name-sans-v04/index.html from ./posts/2020-12-15--name-sans-v04/index.md.
Writing _site/tags/tools/index.html from ./tags.njk.
Writing _site/tags/command line/index.html from ./tags.njk.
Writing _site/tags/font engineering/index.html from ./tags.njk.
Writing _site/tags/open source/index.html from ./tags.njk.
Writing _site/tags/drawbot/index.html from ./tags.njk.
Writing _site/tags/variable fonts/index.html from ./tags.njk.
Writing _site/tags/robofont/index.html from ./tags.njk.
Writing _site/tags/name sans/index.html from ./tags.njk.
Copied 4 files / Wrote 25 files in 0.27 seconds (10.8ms each, v0.11.1)
Watching…
[Browsersync] Access URLs:
---------------------------------
Local: http://localhost:8080
External: http://192.168.1.5:8080
---------------------------------
[Browsersync] Serving files from: _site |
I should add that this also fails for me with the default config recommendation from the README:
|
Oh; I did find one silly error on my part: I’m starting my project from https://github.com/11ty/eleventy-base-blog, and the posts are not in a
So, now I am getting build errors:
|
At const assets = [];
if (pluginOptions.recursive) {
for await (const file of walk(templateDir)) {
assets.push(file);
}
} else {
assets = await fs.promises.readdir(templateDir);
assets = assets.map((f) => path.join(templateDir, f));
} And indeed – if I change that to |
UPDATE: I made a small error in my config, and there is a small error in this plugin, fixed by #2. I’m leaving this issue here in case it helps others, but closing it because the problem has been found, along with a (hopefully temporary) workaround.
@victornpb This seems like exactly what I am looking for in a basic image plugin for 11ty. I came across it in this issue comment. Thanks so much for taking the time to make it and share it!
Unfortunately, I’m having difficulties getting it to work so far. I’m using a setup (based on the 11ty-starter-blog) which I think should be working well, which so far really only has the customization of using permalinks.
Here is a public repo version of my WIP 11ty blog: https://github.com/arrowtype/blog--public_src
My input:
My expected output is something like this (but I mostly just want it to work with controlled permalinks, and I’m not too worried about the specific asset folder structure):
So, if you visit one of the posts, you will see that the image is not yet getting copied in.
My
.eleventy.js
includes the following, as recommended in your readme with a couple of the options set:However, the images just aren’t getting moved along with the posts.
I have my permalinks already working, following the default 11ty recommendations for using a
permalink
in my frontmatter. Potentially, might this process be tripping up the plugin? Or, am I missing a step?Thank you for any thoughts or advice!
The text was updated successfully, but these errors were encountered: