Skip to content

Conversation

drashevsky
Copy link
Contributor

The multilingual example would not work, threw me off when I tried it on a personal website. After much debugging I discovered that you need to use the locals object as described in Yeah.js to access a passed parameter in the included template. I.e.
<%- include('_content.ejs', {lang: 'en'}) -%> would be read in _content.ejs as <% if (locals.lang == 'en') { %>.

Copy link
Owner

@mourner mourner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, apologies.

@mourner mourner merged commit b056e6e into mourner:master Feb 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants