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

Unnecessary hard-coding of src/partials during render #31

Open
julrichkieffer opened this issue Dec 9, 2016 · 0 comments
Open

Unnecessary hard-coding of src/partials during render #31

julrichkieffer opened this issue Dec 9, 2016 · 0 comments
Labels

Comments

@julrichkieffer
Copy link

The partial plugin creates a custom query to discover partial documents:

.setQuery('isPartial', {
	$or:
		isPartial: true
		fullPath: $startsWith: config.partialsPath  # src/partials
})

Notably, $or: allows a document to be discovered outside of the src/partials folder by merely including isPartial: true in the metadata. However, when time to render the documents, the below is hardcoded, making partials outside the src/partials folder give rise to an error:

partialFuzzyPath = pathUtil.join(config.partialsPath, partialName)
partial.document ?= docpad.getCollection('partials').fuzzyFindOne(partialFuzzyPath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants