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

tpl: Ensure site templates can override theme templates #4377

Merged
merged 3 commits into from
Feb 5, 2018

Conversation

moorereason
Copy link
Contributor

The tplimpl package was misusing the TemplateLookupDescriptor.WorkingDir
field from the output package. By incorrectly setting it to the theme
directory instead of the site root, the user is unable to override theme
templates in some situations.

Fixes #3505

@moorereason moorereason requested a review from bep February 4, 2018 02:10
Copy link
Member

@bep bep left a comment

Choose a reason for hiding this comment

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

This needs a test.

It looks like we left some debugging code in place that caused all but
one test case to run.
Add an additional test to "Variant 4, theme, use site base" to also test
for the index.html base (from by testing of gohugoio#3505).  Also add a "name"
field to the test cases to make it easier to know which test is failing
versus just getting a slice index.
The tplimpl package was misusing the TemplateLookupDescriptor.WorkingDir
field from the output package. By incorrectly setting it to the theme
directory instead of the site root, the user is unable to override theme
templates in some situations.

Fixes gohugoio#3505
@moorereason
Copy link
Contributor Author

@bep,
Turns out that we already had tests...we just weren't running them. Ready for your review.

@bep
Copy link
Member

bep commented Feb 5, 2018

Turns out that we already had tests...we just weren't running them. Ready for your review.

Looks like my clever construct :-) Thanks.

@bep bep merged commit 084cf41 into gohugoio:master Feb 5, 2018
@moorereason moorereason deleted the iss3505 branch December 17, 2020 18:20
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Baseof.html in a theme is prioritized over non-theme peer equivalent
2 participants