Releases: solution-loisir/markdown-it-eleventy-img
Releases · solution-loisir/markdown-it-eleventy-img
[email protected]
Updated dependencies. Now using @11ty/eleventy-img 4.0.2.
[email protected]
- Bumped eleventy-img to v3.1.0.
[email protected]
Breaking changes
- Bumped eleventy-img to v3.0.0. Eleventy-img v3.0.0 requires Node 14.15+.
[email protected]
New features
resolvePath
method allow changing path resolution in execution context that give access to image source path through Markdown-itenv
parameter. Was only tested with Eleventy:
config.setLibrary("md", md.use(markdownItEleventyImg, {
resolvePath: (filepath, env) => path.join(path.dirname(env.page.inputPath), filepath)
}));
Thanks to @davidwesst for the heavy lifting! 🎉
Breaking changes
- Brought remote sources pass through handling at the top of the execution. Prevents users of
renderImage
or users ofresolvePath
to have to handle remote images themselves. Due to the synchronous nature of Markdown-it,markdown-it-eleventy-img
does not support remote sources. I suspect this breaking change to be low impact.
Notes
- Set dependabot
versioning-strategy
toincrease
.
[email protected]
Patch (non-critical)
- Fixed typo in project description.
- Reformulated some sentences in README for clarity.
- Refactored
tokenAttributes
variable name tonormalizedTokenAttributes
to clarify the nature of the variable and ease maintenance. - Refactored the attribution of
alt
value in the remote source fallback to rely solely on markdown-it API (see Token#content).
[email protected]
Breaking changes
- Removed restriction on
globalAttributes
title
. It is now possible to settitle
gobally through theglobalAttributes
config object. Attributes set on the token will always override global ones. This breaking change is expected to have low impact. Settingtitle
globally has very few real use case. - Trim and lower case
globalAttributes
as well astokenAttributes
to make sure token attributes will have precedence and to avoid double attributes on edge cases.
Notes
- Integrated ESLint tooling.
- Refactored warnings for
src
andalt
for better clarity. - Added code of conduct.
- Removed warning for
title
.
[email protected]
Patch
- Fixes passing
alt
value to the token attributes before returning the default markdown-it renderer on remote sources. Without this step,alt
value will always be empty whether user set it on the token or not. Thanks to @marcus-crane 🙌 for the PR!
[email protected]
New features
- Default behavior reverts to native markdown-it renderer whenever remote images are encountered (local sources will still be rendered through eleventy-img).
Notes
- Unit testing
- markdown-it-implicit-figures plugin for compatibility (it seems fully compatible!)
- Remote images falls back to default markdown-it renderer
- Remote images with
statsByDimensionsSync
[email protected]
Notes
- Integrated unit testing.
- Cleaned-up README.
[email protected]
Breaking changes
- Put
src
in first position inattributes
tuple. - Remove lazy flag feature. Other plugins already deal with setting attributes to individual token like markdown-it-attrs which is compatible with this plugin. I don't see the need to double up on that feature.
Notes
- Integrated errors for parameter types.