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

Custom helper registration from themes #158

Closed
rasjani opened this issue May 15, 2016 · 3 comments
Closed

Custom helper registration from themes #158

rasjani opened this issue May 15, 2016 · 3 comments

Comments

@rasjani
Copy link

rasjani commented May 15, 2016

Preface:

In the past, I've been basicly writing my CV in vim and then just converting it to pdf and doc based on what ever the needs have been but now im in progress of converting everything to hackmyresume by using freshca format and template.

Since i'm dev, I love monotype fonts and fixed width data and my main template is still going to be following this rule either in markdown or just text.

Actual issue:

Since hbs is not really primarily intended for txt/markdown formatting, it lacks string padding and splitting helpers. I have no problem for writing these on my own but hackmyresume itself does not support custom helpers from the provided theme.

Would it be possible add custom helper registeration ? =)

Alternatively, maybe adding https://github.com/assemble/handlebars-helpers as dependency and importing those helpers would be great.

@jonathan-chin
Copy link

I'd love this also. None of the prebuilt or user submitted themes really give me 100% of what I want, so I want to build my own.

@hacksalot
Copy link
Owner

hacksalot commented Jan 25, 2018

Absolutely. Look for this in 1.9.0. Sorry for the delay.

hacksalot added a commit that referenced this issue Jan 27, 2018
Register handlebars helpers in themes. Fix #158.
@hacksalot
Copy link
Owner

Starting in v1.9.0 you can load custom theme helpers (for FRESH themes) with the helpers property in the theme.json file. Accepts a single path/glob or an array of paths/globs:

{
  "helpers": ["helpers/*.js", "some-other-helper.js", "../node_modules/handlebars-helpers/**/*.js"]
}

@hacksalot hacksalot added this to the v1.9.0 milestone Feb 1, 2018
@hacksalot hacksalot reopened this Feb 1, 2018
@hacksalot hacksalot self-assigned this Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants