You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to declare a default layout for each of the visited URLs on my local Express server but can't get it to work. I've tried using several methods and parse the template literal with the {% layout "xx" %} but I never manage to have elements called within the parsed templates to resolve. For instance, parsing a file buttons.html with this content: {% render 'partials/elements/button' %} fails because it never resolves this path, but when using static HTML code, it works.
I have to admit I have trouble getting my way through the documentation of the methods of the api, so I might have tried random things, but anyone has an idea on how to achieve this?
PS: I am already able to make this work with the {% layout "xx" %} in the template itself, but the whole point is to avoid having to repeat that in every file.
Activity
harttle commentedon Jan 6, 2026
Try set a custom fs instance and change the file content when returning to Liquid parser. See https://liquidjs.com/tutorials/render-file.html#Abstract-File-System