We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
public
Thanks for your work on 11ty! Amazing project, and works really nicely with Cloudflare Pages.
I see there's a directory in this project with a keep file: https://github.com/11ty/eleventy-base-blog/tree/main/public/img
If I put images in there, the only way I can access them from within a sub-directory of content, is something like this:
content
<img src="/../../../myimage.webp">
In the base blog as is, it seems to assume that images are either in the same dir as the post (such as https://github.com/11ty/eleventy-base-blog/tree/main/content/blog/fourthpost - so called 'relative'), or in the root of content (so called absolute)
If they are in _site/public (due to https://github.com/11ty/eleventy-base-blog/blob/main/eleventy.config.js#L18), the only way for the img tag to produce a valid path is with multiple ../ parent paths to break out of the nested content/ dir.
_site/public
img
../
content/
I asked in Discord #help, and I see there are a few similar questions/confusions around this, without a solution.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Thanks for your work on 11ty! Amazing project, and works really nicely with Cloudflare Pages.
I see there's a directory in this project with a keep file: https://github.com/11ty/eleventy-base-blog/tree/main/public/img
If I put images in there, the only way I can access them from within a sub-directory of
content
, is something like this:<img src="/../../../myimage.webp">
In the base blog as is, it seems to assume that images are either in the same dir as the post (such as https://github.com/11ty/eleventy-base-blog/tree/main/content/blog/fourthpost - so called 'relative'), or in the root of
content
(so called absolute)If they are in
_site/public
(due to https://github.com/11ty/eleventy-base-blog/blob/main/eleventy.config.js#L18), the only way for theimg
tag to produce a valid path is with multiple../
parent paths to break out of the nestedcontent/
dir.I asked in Discord #help, and I see there are a few similar questions/confusions around this, without a solution.
The text was updated successfully, but these errors were encountered: