{"action":"closed","issue":{"url":"https://api.github.com/repos/emiloberg/markdown-styleguide-generator/issues/4","labels_url":"https://api.github.com/repos/emiloberg/markdown-styleguide-generator/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/emiloberg/markdown-styleguide-generator/issues/4/comments","events_url":"https://api.github.com/repos/emiloberg/markdown-styleguide-generator/issues/4/events","html_url":"https://github.com/emiloberg/markdown-styleguide-generator/issues/4","id":73692430,"number":4,"title":"Custom handlebars variables","user":{"login":"Cleecanth","id":1230957,"avatar_url":"https://avatars.githubusercontent.com/u/1230957?v=3","gravatar_id":"","url":"https://api.github.com/users/Cleecanth","html_url":"https://github.com/Cleecanth","followers_url":"https://api.github.com/users/Cleecanth/followers","following_url":"https://api.github.com/users/Cleecanth/following{/other_user}","gists_url":"https://api.github.com/users/Cleecanth/gists{/gist_id}","starred_url":"https://api.github.com/users/Cleecanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cleecanth/subscriptions","organizations_url":"https://api.github.com/users/Cleecanth/orgs","repos_url":"https://api.github.com/users/Cleecanth/repos","events_url":"https://api.github.com/users/Cleecanth/events{/privacy}","received_events_url":"https://api.github.com/users/Cleecanth/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-06T18:00:52Z","updated_at":"2015-05-11T15:25:26Z","closed_at":"2015-05-11T15:25:26Z","body":"First, I just want to thank you. This is exactly what I was looking for (and came unbelievably close to trying to create on my own). So, thank you for this — you've saved me numerous hours and answered like 30 of my prayers.\r\n\r\nThat said, it would be nice to be able to define custom handlebars variables within the `.styleguide` file for use within the `template.html`.\r\n\r\nAs a very simple example, within the `.styleguide`, if you could do something like:\r\n```Javascript\r\n{\r\n  //...config stuff\r\n  \"customVars\": {\r\n    \"externalJs\": \"/my/script.js\",\r\n    \"pageTitle\" : \"My Project Style Guide\"\r\n  }\r\n}\r\n```\r\nand in `template.html`:\r\n```Handlebars\r\n<title>{{customVars.pageTitle}}</title>\r\n{{#if customVars.externalJS}}\r\n  <script src=\"{{customVars.externalJs}}\">\r\n{{/if}}\r\n```\r\n\r\nYou could obviously do a whole lot more. But the general idea is that you'd be making your template  more portable (for use across projects)."}}