{"action":"created","issue":{"url":"https://api.github.com/repos/middleman/middleman/issues/1478","labels_url":"https://api.github.com/repos/middleman/middleman/issues/1478/labels{/name}","comments_url":"https://api.github.com/repos/middleman/middleman/issues/1478/comments","events_url":"https://api.github.com/repos/middleman/middleman/issues/1478/events","html_url":"https://github.com/middleman/middleman/issues/1478","id":59415409,"number":1478,"title":"How to access config from helpers?","user":{"login":"Naatan","id":278649,"avatar_url":"https://avatars.githubusercontent.com/u/278649?v=3","gravatar_id":"","url":"https://api.github.com/users/Naatan","html_url":"https://github.com/Naatan","followers_url":"https://api.github.com/users/Naatan/followers","following_url":"https://api.github.com/users/Naatan/following{/other_user}","gists_url":"https://api.github.com/users/Naatan/gists{/gist_id}","starred_url":"https://api.github.com/users/Naatan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Naatan/subscriptions","organizations_url":"https://api.github.com/users/Naatan/orgs","repos_url":"https://api.github.com/users/Naatan/repos","events_url":"https://api.github.com/users/Naatan/events{/privacy}","received_events_url":"https://api.github.com/users/Naatan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-01T20:21:15Z","updated_at":"2015-03-01T21:14:18Z","closed_at":"2015-03-01T20:30:18Z","body":"In config.rb I've set a few default config \"vars\", eg.\r\n\r\n```\r\nset :title, \"Website Title\"\r\n```\r\n\r\nI seem to be able to access this from helpers using `title`, however this does not work when the helper is accessed from a partial\r\n\r\nWhat's the proper way of accessing these config vars? \r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/middleman/middleman/issues/comments/76631114","html_url":"https://github.com/middleman/middleman/issues/1478#issuecomment-76631114","issue_url":"https://api.github.com/repos/middleman/middleman/issues/1478","id":76631114,"user":{"login":"Arcovion","id":2716027,"avatar_url":"https://avatars.githubusercontent.com/u/2716027?v=3","gravatar_id":"","url":"https://api.github.com/users/Arcovion","html_url":"https://github.com/Arcovion","followers_url":"https://api.github.com/users/Arcovion/followers","following_url":"https://api.github.com/users/Arcovion/following{/other_user}","gists_url":"https://api.github.com/users/Arcovion/gists{/gist_id}","starred_url":"https://api.github.com/users/Arcovion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arcovion/subscriptions","organizations_url":"https://api.github.com/users/Arcovion/orgs","repos_url":"https://api.github.com/users/Arcovion/repos","events_url":"https://api.github.com/users/Arcovion/events{/privacy}","received_events_url":"https://api.github.com/users/Arcovion/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T21:14:18Z","updated_at":"2015-03-01T21:14:18Z","body":"These should all work:\r\n```ruby\r\ntitle\r\nconfig.title\r\nconfig[:title]\r\nsettings[:title]\r\n```\r\nI like to use a `site` variable for this (same as Jekyll), so as to not pollute the core namespace which you can view here: [http://localhost:4567/__middleman/config/#core](http://localhost:4567/__middleman/config/#core)\r\n```ruby\r\nset :site, OpenStruct.new(\r\n  title: 'Website Title'\r\n).freeze\r\n# site.title\r\n```"}}