diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f65498..901a876 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.0.4] + +- Bugfix template `content` variable not being set when rendering embed (#10) +- Bugfix incorrect alias lookup when only embedded as alias (#11) + ## [1.0.3] - Updated npm dependencies @@ -29,3 +34,4 @@ First release [1.0.1]: https://github.com/photogabble/eleventy-plugin-font-subsetting/releases/tag/v1.0.1 [1.0.2]: https://github.com/photogabble/eleventy-plugin-font-subsetting/releases/tag/v1.0.2 [1.0.3]: https://github.com/photogabble/eleventy-plugin-font-subsetting/releases/tag/v1.0.3 +[1.0.4]: https://github.com/photogabble/eleventy-plugin-font-subsetting/releases/tag/v1.0.4 diff --git a/index.js b/index.js index 0784fb3..50035c5 100644 --- a/index.js +++ b/index.js @@ -49,7 +49,7 @@ module.exports = function (eleventyConfig, options = {}) { : `{% layout "${layout}" %} {% block content %} ${frontMatter.content} {% endblock %}`; const fn = await rm.compile(tpl, language, {templateConfig, extensionMap}); - const result = await fn(data.data); + const result = await fn({content: frontMatter.content, ...data.data}); compiledEmbeds.set(data.inputPath, result); } @@ -144,7 +144,7 @@ module.exports = function (eleventyConfig, options = {}) { const found = (page.fileSlug === link.slug || (page.data.title && opts.slugifyFn(page.data.title) === link.slug)); if (found) return true; - const aliases = (page.aliases ?? []).reduce(function(set, alias){ + const aliases = (page.data.aliases ?? []).reduce(function(set, alias){ set.add(opts.slugifyFn(alias)); return set; }, new Set()); diff --git a/package.json b/package.json index 713450b..b9ddd87 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@photogabble/eleventy-plugin-interlinker", - "version": "1.0.3", + "version": "1.0.4", "description": "Obsidian WikiLinks, BackLinks and Embed support for 11ty", "keywords": [ "11ty",