Error loading layout files
smcjustin opened this issue · 2 comments
smcjustin commented
Version
v2.3.2
Platform
MacOS Sequoia 15.0
What steps will reproduce the bug?
- Install Deno v1.46.3 and Lume v2.3.2, Lume CMS v0.6.3
- In the
/src
folder create aindex.md
file. In the front matter addlayout: layouts/base.vto
- Create the folder
_includes/layouts
and add the filebase.vto
with boilerplate html - Run
lume serve
How often does it reproduce? Is there a required condition?
Every time.
What is the expected behavior?
Lume should create the file index.html
in the _src
directory using the base.vto
template.
What do you see instead?
Lume throws an error: The layout file "/_includes/layouts/base.vto" doesn't exist
Here is the full output:
error: Uncaught (in worker "") (in promise) Error: Error rendering the layout of the page /index.md
throw new Error(
^
at https://deno.land/x/lume@v2.3.2/core/renderer.ts:176:19
at eventLoopTick (ext:core/01_core.js:175:7)
Caused by: Error: The layout file "/_includes/layouts/base.vto" doesn't exist
at Renderer.#renderLayout (https://deno.land/x/lume@v2.3.2/core/renderer.ts:279:15)
at https://deno.land/x/lume@v2.3.2/core/renderer.ts:159:52
at concurrent (https://deno.land/x/lume@v2.3.2/core/utils/concurrent.ts:10:33)
at eventLoopTick (ext:core/01_core.js:175:7)
at async Renderer.renderPages (https://deno.land/x/lume@v2.3.2/core/renderer.ts:155:7)
at async Site.#buildPages (https://deno.land/x/lume@v2.3.2/core/site.ts:641:5)
at async Site.build (https://deno.land/x/lume@v2.3.2/core/site.ts:541:9)
at async buildSite (https://deno.land/x/lume@v2.3.2/cli/utils.ts:48:3)
at async onmessage (https://deno.land/x/lume@v2.3.2/cli/build_worker.ts:23:16)
error: Uncaught (in promise) Error: Unhandled error in child worker.
at Worker.#pollControl (ext:runtime/11_workers.js:204:19)
at eventLoopTick (ext:core/01_core.js:175:7)
Additional information
No response
oscarotero commented
Is the _includes
folder inside the src
folder?
smcjustin commented
Sorry, that was the issue.
It would be helpful to update this line in Getting Started > Create a Layout to be more clear:
Create a new directory
_includes
and the filelayout.vto
inside it.
To:
Create a new directory
_includes
inside thesrc
directory. Create the filelayout.vto
inside it.