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

"Missing helper: "md"" after update to v0.6.0 #59

Closed
rejas opened this issue Mar 16, 2017 · 5 comments
Closed

"Missing helper: "md"" after update to v0.6.0 #59

rejas opened this issue Mar 16, 2017 · 5 comments

Comments

@rejas
Copy link

rejas commented Mar 16, 2017

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

@assemblebot
Copy link

@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.

@rejas
Copy link
Author

rejas commented Mar 16, 2017

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']
                }
            }
        },

@doowb
Copy link
Member

doowb commented Mar 16, 2017

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']
    }
  }
},

@rejas
Copy link
Author

rejas commented Mar 16, 2017

Thx, that worked flawlessly. Sorry for not looking at the migration guide first :-(

@rejas rejas closed this as completed Mar 16, 2017
@doowb
Copy link
Member

doowb commented Mar 16, 2017

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.

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

No branches or pull requests

3 participants