-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make --template-dir option search in standard template dir too #1221
Comments
Good idea to use the default location as the fallback location if |
Happy to give it a go, although I'm more of a Python developer, so it might take me a while to get going with Ruby. Would you have some quick pointers as to where the |
I like the idea, but I wonder whether this is possible without patching |
Argh. Thanks for the comment. So essentially, this means that it's an issue in upstream mustache instead of Gollum, correct? |
Looks that way. 😞 |
Yes, that's right. You could report the issue there, though, as it seems If progress is made on it, we'll reopen this, and we would be more than happy to incorporate it into gollum. |
Thanks, closing sounds good for now. I need to spend some more time on it to better understand mustache before I open an issue there, but for future reference next time I look at it, this is somewhat related: http://stackoverflow.com/q/20358730 |
Right now, unless I did not understand it correctly, from my own tests I notice that if I specify the
template-dir
for gollum to use that path to look for mustache templates, it will completely ignore the templates in the original standard path.That makes overriding templates a bit cumbersome. That is, if I just want to modify the
page.rb
template, it's not enough to edit it and place it undertemplate-dir
. I will need to copy all of the other templates totemplate-dir
, even if they are unmodified from stock. Otherwise gollum won't find it.It would be good to make the
template-dir
option a bit cleverer by makingtemplate-dir
the first location to search for templates, and then fall back to the stock template location if it cannot find a given template intemplate-dir
. In this waytemplate-dir
would only define a priority location, and modified templates could simply be dropped in there.Another option would be to enable
template-dir
to accept multiple directories ordered by priority, but I find that falling back to the stock location is simpler and cleaner.Thanks!
The text was updated successfully, but these errors were encountered: