"Missing helper: "md"" after update to v0.6.0
rejas opened this issue · 5 comments
Used the latest version of assemble and grunt-assemble for my private prohject, but after updating grunt-assemble from v0.5.0 to v0.6.0 I get this error when running it:
Running "assemble:pages" (assemble) task
Assembling tmp/travel_01_aus.html OK
Assembling tmp/blog.html ERROR
Warning: Missing helper: "md" Use --force to continue.
Aborted due to warnings.
What has changed that needs to be accomodated on my side for my project to run again?
Using node v7.7.2, assemble 0.23.0
@rejas Thanks for the issue! If you're reporting a bug, please be sure to include:
- The version of
assemble
you are using. - Your assemblefile.js (This can be in a gist)
- The commandline output. (Screenshot or gist is fine)
- What you expected to happen instead.
My grunt-task
assemble: {
pages: {
options: {
flatten: true,
layout: '<%= dir.assemble %>/layouts/default.hbs',
data: '<%= dir.assemble %>/data/*.{json,yml}',
partials: '<%= dir.assemble %>/partials/*.hbs'
},
files: {
'<%= dir.tmp %>/': ['<%= dir.assemble %>/pages/*.hbs']
}
}
},
Hi @rejas I anticipated there being issues and this is one of them. Check out the migration section in the readme that addresses missing "md" and "markdown" helpers.
There's a code snippet that you can put in <%= dir.assemble %>/helpers/markdown.js
, then update the assemble config in your Gruntfile.js to register the helpers:
assemble: {
pages: {
options: {
flatten: true,
layout: '<%= dir.assemble %>/layouts/default.hbs',
data: '<%= dir.assemble %>/data/*.{json,yml}',
partials: '<%= dir.assemble %>/partials/*.hbs',
helpers: '<%= dir.assemble %>/helpers/*.js'
},
files: {
'<%= dir.tmp %>/': ['<%= dir.assemble %>/pages/*.hbs']
}
}
},
Thx, that worked flawlessly. Sorry for not looking at the migration guide first :-(
No problem. If you run into any other issues with migrating, please open an issue so we can fix it, find a workaround, or update the migration section.