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

Add the standard template helpers #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RobLoach
Copy link
Contributor

Allow Handlebars to use DocPad's Standard Template Helpers as #2.

Problem

<h2>getBlock blockname</h2>

{{{getBlock "scripts"}}}
{{{getBlock "styles"}}}
{{{getBlock "meta"}}}

It renders to:

<h2>getBlock blockname</h2>

[object Object]
[object Object]
[object Object]

Will we need a toHTML helper?

# Add the template helper as a Handlebars helper
for own key,value of @docpad.getTemplateData()
if Object::toString.call(value) is '[object Function]'
@handlebars.registerHelper(key, value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@balupton
Copy link
Member

balupton commented Aug 1, 2019

I have become too preoccupied by other things to review, merge, and release this PR.

However, you should have received an invite a while ago to join the DocPad Extras Team, which will give you write access to this repository, so you can merge in the PR.

For an orientation, or if you need any assistance following the semi-automatic release process from CONTRIBUTING.md, reach out via https://bevry.me/discord/dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants