Skip to content
Plugin for Assemble for gathering data from partials
HTML JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

assemble-partial-data NPM version

Plugin for Assemble which collects data from partials and groups it by key. Each value in the data hash has a list of associated partials.

This plugin was created to be used along with albogdano/handlebars-helper-mdpartial. When used together, these allow you to treat partials as mini pages and provide flexibility when working with partial data.


Use npm to install the package in your project's directory:

$ cd your-project
$ npm install assemble-partial-data --save-dev

Register the plugin

To register the plugin explicitly in the Gruntfile:

  assemble: {
    options: {
      // the "assemble-partial-data" npm module must also be listed in
      // devDependencies for assemble to automatically resolve the plugin
      plugins: ["assemble-partial-data", "foo/*.js"]
    files: {
      "dist/": ["src/templates/*.html"]


In your partials and pages use {{partialData}} to access the partial data object which contains the grouped data from all partials.

The YAML data is collected from each partial and grouped by key in a similar way to how Assemble groups categories and tags for pages.

Example data returned by {{partialData}}:

"somedata": [
      "value": "foo",
      "partials": [
      "value": "bar",
      "partials": [
  • The value field contains the value of a somedata.
  • The partials field contains a list of partials where this same piece of data was found.


MIT License

Something went wrong with that request. Please try again.