{"action":"created","issue":{"url":"https://api.github.com/repos/SassDoc/generator-sassdoc-theme/issues/22","labels_url":"https://api.github.com/repos/SassDoc/generator-sassdoc-theme/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/SassDoc/generator-sassdoc-theme/issues/22/comments","events_url":"https://api.github.com/repos/SassDoc/generator-sassdoc-theme/issues/22/events","html_url":"https://github.com/SassDoc/generator-sassdoc-theme/issues/22","id":66244447,"number":22,"title":"handlebars engine, ctx.data goes from array of objects to 'true'","user":{"login":"aristretto","id":1207032,"avatar_url":"https://avatars.githubusercontent.com/u/1207032?v=3","gravatar_id":"","url":"https://api.github.com/users/aristretto","html_url":"https://github.com/aristretto","followers_url":"https://api.github.com/users/aristretto/followers","following_url":"https://api.github.com/users/aristretto/following{/other_user}","gists_url":"https://api.github.com/users/aristretto/gists{/gist_id}","starred_url":"https://api.github.com/users/aristretto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aristretto/subscriptions","organizations_url":"https://api.github.com/users/aristretto/orgs","repos_url":"https://api.github.com/users/aristretto/repos","events_url":"https://api.github.com/users/aristretto/events{/privacy}","received_events_url":"https://api.github.com/users/aristretto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-03T23:08:29Z","updated_at":"2015-04-06T15:58:51Z","closed_at":null,"body":"My Node's a little rusty, and I may be looking at this with a tired brain / pair of eyes. For the life of me I can't figure out why `ctx.data` goes from an array of objects (as seen below);\r\n\r\n```Javascript\r\n\r\n// in https://github.com/SassDoc/generator-sassdoc-theme/blob/master/templates/handlebars/_index.js#L149\r\n// console.log(ctx);\r\n// return theme.apply(this, arguments);\r\n...\r\ndisplayTheme: 'sassdoc-theme-foo',\r\n  src: [ 'source/features/**/*.scss' ],\r\n  data: \r\n   [ { description: '<p>lorem ipsum dolor sit amet</p>\\n',\r\n       commentRange: [Object],\r\n       context: [Object],\r\n       access: 'public',\r\n       example: [Object],\r\n       group: [Object],\r\n       require: [],\r\n       file: [Object],\r\n       groupName: [Object] },\r\n     { description: '<p>lorem ipsum dolor sit amet</p>\\n',\r\n       commentRange: [Object],\r\n       context: [Object],\r\n       access: 'public',\r\n       example: [Object],\r\n       group: [Object],\r\n       require: [],\r\n       file: [Object],\r\n       groupName: [Object] },\r\n     byGroupAndType: { undefined: [Object] } ],\r\n  load: [Function: load],\r\n  loadObject: [Function: loadObject],\r\n...\r\n```\r\n\r\nto `true` when it finally reaches my `index.handlebars` template (as seen below:)\r\n\r\n```Javascript\r\n\r\n// this debug helper shows what the context is in `index.handlebars`\r\n\r\nvar theme = themeleon(__dirname, function (t) {\r\n  t.copy('assets');\r\n\r\n  var options = {\r\n    helpers: {\r\n      'debug': function() {\r\n        console.log(\"Current Context\");\r\n        console.log(\"====================\");\r\n        console.log(this);\r\n      }\r\n    }\r\n  };\r\n  t.handlebars('views/index.handlebars', 'index.html', options);\r\n});\r\n\r\n// \"this.data\" === true now\r\n// ...\r\n// displayTheme: 'sassdoc-theme-masq',\r\n//  src: [ 'source/features/**/*.scss' ],\r\n//  data: true,\r\n//  load: [Function: load],\r\n//  loadObject: [Function: loadObject],\r\n// ...\r\n```\r\n\r\nThe end result is I can't loop over anything in `index.handlebars`."},"comment":{"url":"https://api.github.com/repos/SassDoc/generator-sassdoc-theme/issues/comments/90123904","html_url":"https://github.com/SassDoc/generator-sassdoc-theme/issues/22#issuecomment-90123904","issue_url":"https://api.github.com/repos/SassDoc/generator-sassdoc-theme/issues/22","id":90123904,"user":{"login":"pascalduez","id":335467,"avatar_url":"https://avatars.githubusercontent.com/u/335467?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalduez","html_url":"https://github.com/pascalduez","followers_url":"https://api.github.com/users/pascalduez/followers","following_url":"https://api.github.com/users/pascalduez/following{/other_user}","gists_url":"https://api.github.com/users/pascalduez/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalduez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalduez/subscriptions","organizations_url":"https://api.github.com/users/pascalduez/orgs","repos_url":"https://api.github.com/users/pascalduez/repos","events_url":"https://api.github.com/users/pascalduez/events{/privacy}","received_events_url":"https://api.github.com/users/pascalduez/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T15:58:51Z","updated_at":"2015-04-06T15:58:51Z","body":"> Also FYI, the SassDoc syntax used in the default theme's scss folder is deprecated (uses /** style comments instead of ///.\r\n\r\nThe default theme documented items are in [`scss/utils`](https://github.com/SassDoc/sassdoc-theme-default/tree/master/scss/utils) i.e. functions, mixins, variables. They properly use the 3 slashes notation."}}