{"action":"created","issue":{"url":"https://api.github.com/repos/middleman/middleman/issues/1217","labels_url":"https://api.github.com/repos/middleman/middleman/issues/1217/labels{/name}","comments_url":"https://api.github.com/repos/middleman/middleman/issues/1217/comments","events_url":"https://api.github.com/repos/middleman/middleman/issues/1217/events","html_url":"https://github.com/middleman/middleman/issues/1217","id":29702527,"number":1217,"title":"Templates in extensions","user":{"login":"Aupajo","id":14123,"avatar_url":"https://avatars.githubusercontent.com/u/14123?v=3","gravatar_id":"","url":"https://api.github.com/users/Aupajo","html_url":"https://github.com/Aupajo","followers_url":"https://api.github.com/users/Aupajo/followers","following_url":"https://api.github.com/users/Aupajo/following{/other_user}","gists_url":"https://api.github.com/users/Aupajo/gists{/gist_id}","starred_url":"https://api.github.com/users/Aupajo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aupajo/subscriptions","organizations_url":"https://api.github.com/users/Aupajo/orgs","repos_url":"https://api.github.com/users/Aupajo/repos","events_url":"https://api.github.com/users/Aupajo/events{/privacy}","received_events_url":"https://api.github.com/users/Aupajo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/middleman/middleman/labels/Bug","name":"Bug","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"bhollis","id":313208,"avatar_url":"https://avatars.githubusercontent.com/u/313208?v=3","gravatar_id":"","url":"https://api.github.com/users/bhollis","html_url":"https://github.com/bhollis","followers_url":"https://api.github.com/users/bhollis/followers","following_url":"https://api.github.com/users/bhollis/following{/other_user}","gists_url":"https://api.github.com/users/bhollis/gists{/gist_id}","starred_url":"https://api.github.com/users/bhollis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhollis/subscriptions","organizations_url":"https://api.github.com/users/bhollis/orgs","repos_url":"https://api.github.com/users/bhollis/repos","events_url":"https://api.github.com/users/bhollis/events{/privacy}","received_events_url":"https://api.github.com/users/bhollis/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2014-03-19T02:26:53Z","updated_at":"2015-06-29T20:26:00Z","closed_at":null,"body":"I'd like to include a template in my extension, but it doesn't seem possible.\r\n\r\n```ruby\r\ndef manipulate_resource_list(resources)\r\n  resources << my_extension_resource\r\nend\r\n\r\ndef my_extension_resource\r\n  template = File.expand_path(\"../path/to/extension/template\", __FILE__)\r\n  # ...\r\n  Middleman::Sitemap::Resource.new(app.sitemap, target_path, template)\r\nend\r\n```\r\n\r\nWhat I'd like to do is create a `Resource` with an absolute `source_file` path, but there seems to be numerous checks peppered throughout Middleman to ensure a file is relative to the source root.\r\n\r\nAs a last-ditch effort, I thought that it might be possible to inherit from `Resource` and provide my own `render` method.\r\n\r\n```ruby\r\nclass MyExtensionResource < Middleman::Sitemap::Resource\r\n  def render\r\n    # ...\r\n  end\r\nend\r\n```\r\n\r\nBut:\r\n\r\n```\r\nsuper: no superclass method `get_source_file`\r\n```\r\n\r\nIs there a way, or is this not currently supported?"},"comment":{"url":"https://api.github.com/repos/middleman/middleman/issues/comments/116832228","html_url":"https://github.com/middleman/middleman/issues/1217#issuecomment-116832228","issue_url":"https://api.github.com/repos/middleman/middleman/issues/1217","id":116832228,"user":{"login":"Aupajo","id":14123,"avatar_url":"https://avatars.githubusercontent.com/u/14123?v=3","gravatar_id":"","url":"https://api.github.com/users/Aupajo","html_url":"https://github.com/Aupajo","followers_url":"https://api.github.com/users/Aupajo/followers","following_url":"https://api.github.com/users/Aupajo/following{/other_user}","gists_url":"https://api.github.com/users/Aupajo/gists{/gist_id}","starred_url":"https://api.github.com/users/Aupajo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aupajo/subscriptions","organizations_url":"https://api.github.com/users/Aupajo/orgs","repos_url":"https://api.github.com/users/Aupajo/repos","events_url":"https://api.github.com/users/Aupajo/events{/privacy}","received_events_url":"https://api.github.com/users/Aupajo/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T20:25:59Z","updated_at":"2015-06-29T20:25:59Z","body":"Would you accept a PR allowing exceptions to be made to the ignore list?"}}