Custom theme hbs helper


#1

Feature request

Consider adding a custom helper feature?

like this

 .
 ├── /assets
 |   └── /css
 |       ├── screen.css
 |   ├── /fonts
 |   ├── /images
 |   ├── /js
+├── /helpers
+|   ├── helper1.js
+|   └── helper2.js
 ├── default.hbs
 ├── index.hbs [required]
 └── post.hbs [required]
 └── package.json [required]

or

 .
 ├── /assets
 |   └── /css
 |       ├── screen.css
 |   ├── /fonts
 |   ├── /images
 |   ├── /js
 ├── default.hbs
+├── functions.js
 ├── index.hbs [required]
 └── post.hbs [required]
 └── package.json [required]

In this way, we can add more advanced features to the theme more easily.

If there is no problem, I can contribute the pr code.


#2

It’s easy to add custom helpers with Ghost-App module.
Use npm install ghost-app.
Guide has been removed, but you find it here:


And a example here:

This tutorial is also useful:


#3

I know this method, but I think it would be better to put these helpers in the theme.