Skip to content

Make --template-dir option search in standard template dir too #1221

@dplanella

Description

@dplanella

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 under template-dir. I will need to copy all of the other templates to template-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 making template-dir the first location to search for templates, and then fall back to the stock template location if it cannot find a given template in template-dir. In this way template-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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions