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
Custom HTML templates #38
Conversation
@tylerjpeterson thanks for your contribution. The only thing I am worried is the flag name since the diff2html library already has a template parameter that represents the actual templates of the diff and I think this would be confusing. This template is a different thing that I never migrated to hogan.js and is still using a hardcoded replaces. What do you think of changing the name to |
@rtfpessoa - makes sense to me - I'm happy to update the flag. I'll try to get to it sometime this evening. Thanks! |
@rtfpessoa - had a chance to update it now. Sorry for the sloppy commits, I didn't realize there was support for multi-character flags (which further reduces chance of confusion / collision with other dependencies). Let me know if this requires further updates. |
Thanks @rtfpessoa, release looks good and thanks for the help. |
Resolves #33 by allowing users to provide a path to a custom markup template when rendering output as html. More specifically:
README.md
with a list of variables that can be used within a custom templatemain.js
with the-t, --template
option to use a custom htmlcli.js
to use template set in user config, otherwise defaults to existing templatefs
fromcli.js
to confirm existence of custom template, otherwise throws an errorI realize this means your authorship may no longer appear in the generated output, so I fully understand if you're not comfortable accepting this PR.
Thanks!