Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Moved to ejs now helpers aren’t loading #457

@aarongustafson

Description

@aarongustafson

Any idea how the helpers are being loaded?

I defined them in .hygen.js:

export default {
	helpers: {
		getFilename: (locals, include_date) => {
			// …
		}
	}
}

But then when I use them in the template, they are undefined:

Loaded templates: _templates
TypeError: ejs:1
 >> 1| src/posts/<%= h.getFilename(locals) %>.md

h.getFilename is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions