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

Add support for --partials-dir #974

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

Add support for --partials-dir #974

wants to merge 1 commit into from

Conversation

frison
Copy link

@frison frison commented Feb 11, 2025

Prior to this change, partials were discovered by first checking ./partials and then ../partials. However, we can unlock easier sharing of partials with the ability to provide your own partials directory that is checked first.

What are you trying to accomplish with this PR?

The ability to include partials from non-standard/hard-coded partial paths (ie: ./partials and ../partials) via a command-line parameter of --partials-dir.

How is this accomplished?

When a --partials-dir is included, it's prepended to the @partials_dirs in the Renderer, and consequently is used first (if the partials are present).

What could go wrong?

🤔 -- the test coverage in this area is pretty good, and I've maintained all existing test behaviours. I think the worst case, is failing to render templates.

Prior to this change, partials were discovered by first checking
`./partials` and then `../partials`. However, we can unlock easier
sharing of partials with the ability to provide your own partials
directory that is checked first.
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