Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use absolute nunjucks import path #355

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lhokktyn
Copy link
Contributor

The "header" component macro currently imports the "site-search" macro using a relative URL. This prevents customisation of the "site-search" macro using the Nunjucks import prioritisation logic. Bringing this import inline with other import syntax across the plugin fixes this issue.

For example, a consuming 11ty app wants to override the site-search macro, so can now create a "_includes/components/site-search/macro.njk" template to do that.

The "header" component macro currently imports the "site-search" macro
using a relative URL. This prevents customisation of the "site-search"
macro using the Nunjucks import prioritisation logic. Bringing this
import inline with other import syntax across the plugin fixes this
issue.

For example, a consuming 11ty app wants to override the site-search macro,
so can now create a "_includes/components/site-search/macro.njk" template
to do that.
@lhokktyn
Copy link
Contributor Author

@paulrobertlloyd this is related to the recent change of nunjucks priority ordering in #354. As far as I could see, this was the only place relative URLs were used to import, but so happens to be the macro Id like to override :)

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.

1 participant