{"action":"created","issue":{"url":"https://api.github.com/repos/hexojs/hexo/issues/2202","repository_url":"https://api.github.com/repos/hexojs/hexo","labels_url":"https://api.github.com/repos/hexojs/hexo/issues/2202/labels{/name}","comments_url":"https://api.github.com/repos/hexojs/hexo/issues/2202/comments","events_url":"https://api.github.com/repos/hexojs/hexo/issues/2202/events","html_url":"https://github.com/hexojs/hexo/pull/2202","id":181609421,"number":2202,"title":"added inject tag","user":{"login":"pipirt","id":14897503,"avatar_url":"https://avatars.githubusercontent.com/u/14897503?v=3","gravatar_id":"","url":"https://api.github.com/users/pipirt","html_url":"https://github.com/pipirt","followers_url":"https://api.github.com/users/pipirt/followers","following_url":"https://api.github.com/users/pipirt/following{/other_user}","gists_url":"https://api.github.com/users/pipirt/gists{/gist_id}","starred_url":"https://api.github.com/users/pipirt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipirt/subscriptions","organizations_url":"https://api.github.com/users/pipirt/orgs","repos_url":"https://api.github.com/users/pipirt/repos","events_url":"https://api.github.com/users/pipirt/events{/privacy}","received_events_url":"https://api.github.com/users/pipirt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-07T08:16:30Z","updated_at":"2016-10-07T08:20:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hexojs/hexo/pulls/2202","html_url":"https://github.com/hexojs/hexo/pull/2202","diff_url":"https://github.com/hexojs/hexo/pull/2202.diff","patch_url":"https://github.com/hexojs/hexo/pull/2202.patch"},"body":"After looking around a bit and creating the question/feature request https://github.com/hexojs/hexo/issues/2201, I created a tag plugin that will insert the raw contents of a file into a post directly from its markdown file. In this way, you can inject pre-written HTML or JS or **the raw content of _any_ file** into the body of the post without having to fumble around with new layouts to use the layout equivalent `<%- partial('path/to/file') %>` or rewrite exiting files in hexo markdown. To inject any content into a post you simply add this to your markdown:\r\n```\r\n<% inject path/to/file.bar %>\r\n```\r\nAll paths are relative to `/source/`. I chose `inject` so as not to get confused with `insert_code`.\r\n\r\nI'll write a bit in the docs for it if it's happily merged."},"comment":{"url":"https://api.github.com/repos/hexojs/hexo/issues/comments/252180833","html_url":"https://github.com/hexojs/hexo/pull/2202#issuecomment-252180833","issue_url":"https://api.github.com/repos/hexojs/hexo/issues/2202","id":252180833,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T08:20:50Z","updated_at":"2016-10-07T08:20:50Z","body":"\n[![Coverage Status](https://coveralls.io/builds/8229062/badge)](https://coveralls.io/builds/8229062)\n\nCoverage increased (+0.01%) to 95.958% when pulling **c5b4a334dfbe9cdd35a6f090df0842d546fb031c on pipirt:inject_tag** into **5234c4a85dc6cd418e9a1c169e43de169cf98e95 on hexojs:master**.\n"}}
{"actor":{"display_login":"coveralls"}}