photogabble / eleventy-plugin-interlinker

Adds wikilink and wikilink embed support with tracking of backlinks.
https://photogabble.co.uk/projects/eleventyjs-interlink-plugin/
MIT License
17 stars 1 forks source link

BUGFIX: Don't render embeds if link doesn't exist #35

Closed carbontwelve closed 6 months ago

carbontwelve commented 6 months ago

This PR solves an issue where the wikilink detection would set a links href to /stubs/ before the interlinker looked up the file in question. This would result in the stubs page (if the file exists in the project) file object being loaded and passed to the embed compiler function.

On my website the stubs page is nunjucks and due to the plugin defaulting to liquid for rendering templates it would crash on invalid template syntax. This in of itself is a separate bug I will raise issue for.