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

BUG: unable to render embed template (v1.1.0-rc2) #31

Closed carbontwelve closed 6 months ago

carbontwelve commented 6 months ago
[11ty] (unknown path) [Line 1, Column 4]
[11ty]   unknown block tag: layout (via Template render error)
[11ty] 
[11ty] Original error stack trace: Template render error: (unknown path) [Line 1, Column 4]
[11ty]   unknown block tag: layout
[11ty]     at Object._prettifyError (/Users/simon/Code/photogabble/website/node_modules/nunjucks/src/lib.js:32:11)
[11ty]     at Template.init (/Users/simon/Code/photogabble/website/node_modules/nunjucks/src/environment.js:416:19)
[11ty]     at Template.Obj (/Users/simon/Code/photogabble/website/node_modules/nunjucks/src/object.js:51:15)
[11ty]     at new Template (/Users/simon/Code/photogabble/website/node_modules/nunjucks/src/environment.js:390:18)
[11ty]     at Nunjucks.compile (/Users/simon/Code/photogabble/website/node_modules/@11ty/eleventy/src/Engines/Nunjucks.js:404:14)
[11ty]     at TemplateRender.getCompiledTemplate (/Users/simon/Code/photogabble/website/node_modules/@11ty/eleventy/src/TemplateRender.js:278:26)
[11ty]     at compile (/Users/simon/Code/photogabble/website/node_modules/@11ty/eleventy/src/Plugins/RenderPlugin.js:43:13)
[11ty]     at RenderManager.compile (/Users/simon/Code/photogabble/website/node_modules/@11ty/eleventy/src/Plugins/RenderPlugin.js:389:12)
[11ty]     at Interlinker.compileTemplate (/Users/simon/Code/photogabble/website/node_modules/@photogabble/eleventy-plugin-interlinker/src/interlinker.js:61:30)
[11ty]     at /Users/simon/Code/photogabble/website/node_modules/@photogabble/eleventy-plugin-interlinker/src/interlinker.js:153:37
carbontwelve commented 6 months ago

Upon investigation the cause is trying to embed a file that doesn't exist. Due to my refactoring the plugin is attempting to embed the stub file into the page with the incorrect template language selected.

This is a regression, if a page can't be found, it can't be embedded.

carbontwelve commented 6 months ago

Regression caused by splitting on # for <a id="..."/> linking

image
carbontwelve commented 6 months ago

Ah-ha! Looks like Obsidian get around this by stopping you from having certain characters in page titles.

image