{"action":"opened","issue":{"url":"https://api.github.com/repos/node-press/node-press/issues/13","labels_url":"https://api.github.com/repos/node-press/node-press/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/node-press/node-press/issues/13/comments","events_url":"https://api.github.com/repos/node-press/node-press/issues/13/events","html_url":"https://github.com/node-press/node-press/issues/13","id":54757360,"number":13,"title":"Implement getTemplate() api for theming and plugins","user":{"login":"Oza94","id":6735336,"avatar_url":"https://avatars.githubusercontent.com/u/6735336?v=3","gravatar_id":"","url":"https://api.github.com/users/Oza94","html_url":"https://github.com/Oza94","followers_url":"https://api.github.com/users/Oza94/followers","following_url":"https://api.github.com/users/Oza94/following{/other_user}","gists_url":"https://api.github.com/users/Oza94/gists{/gist_id}","starred_url":"https://api.github.com/users/Oza94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oza94/subscriptions","organizations_url":"https://api.github.com/users/Oza94/orgs","repos_url":"https://api.github.com/users/Oza94/repos","events_url":"https://api.github.com/users/Oza94/events{/privacy}","received_events_url":"https://api.github.com/users/Oza94/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/node-press/node-press/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"Oza94","id":6735336,"avatar_url":"https://avatars.githubusercontent.com/u/6735336?v=3","gravatar_id":"","url":"https://api.github.com/users/Oza94","html_url":"https://github.com/Oza94","followers_url":"https://api.github.com/users/Oza94/followers","following_url":"https://api.github.com/users/Oza94/following{/other_user}","gists_url":"https://api.github.com/users/Oza94/gists{/gist_id}","starred_url":"https://api.github.com/users/Oza94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oza94/subscriptions","organizations_url":"https://api.github.com/users/Oza94/orgs","repos_url":"https://api.github.com/users/Oza94/repos","events_url":"https://api.github.com/users/Oza94/events{/privacy}","received_events_url":"https://api.github.com/users/Oza94/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/node-press/node-press/milestones/3","labels_url":"https://api.github.com/repos/node-press/node-press/milestones/3/labels","id":939945,"number":3,"title":"0.3.x","description":"New article editor :\r\n\r\n * The article editor should be divided in two parts :\r\n   * one editable part on the right where the user type its article in markdown\r\n   * one preview part on the left where typed markdown is rendered in html\r\n\r\nPublication jobs :\r\n\r\n * Set a publication date to your article\r\n * Article will have a publication date (date displayed as creation date on the public site)\r\n * Jobs will probably use [kue](https://github.com/learnboost/kue)\r\n\r\nKarma/PhantomJS tests :\r\n\r\n * Implement e2e testing to check that all features are working as expected\r\n\r\nSite settings :\r\n\r\n * Change theme from web interface\r\n * Create, delete or suspend user account\r\n\r\nUser account settings :\r\n\r\n * Edit my account settings from the web interface\r\n * Change email or password\r\n * Recover password (email sent with recover link)\r\n","creator":{"login":"Oza94","id":6735336,"avatar_url":"https://avatars.githubusercontent.com/u/6735336?v=3","gravatar_id":"","url":"https://api.github.com/users/Oza94","html_url":"https://github.com/Oza94","followers_url":"https://api.github.com/users/Oza94/followers","following_url":"https://api.github.com/users/Oza94/following{/other_user}","gists_url":"https://api.github.com/users/Oza94/gists{/gist_id}","starred_url":"https://api.github.com/users/Oza94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oza94/subscriptions","organizations_url":"https://api.github.com/users/Oza94/orgs","repos_url":"https://api.github.com/users/Oza94/repos","events_url":"https://api.github.com/users/Oza94/events{/privacy}","received_events_url":"https://api.github.com/users/Oza94/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2015-01-17T17:56:25Z","updated_at":"2015-01-19T12:20:49Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-01-19T12:20:49Z","updated_at":"2015-01-19T12:20:49Z","closed_at":null,"body":"Now it is not possible for a theme (or a plugin although this is not implemented yet) to override a jade template. We should offer this feature by exposing a `getTemplate('path/to/template')` method and using this method rather than standard `include path/to/template`.\r\n\r\nOn application startup, we will lookup for templates in 4 locations (higher number means higher priority)\r\n\r\n1. default template\r\n2. theme folder\r\n3. plugins folder\r\n4. site templates (user defined templates)\r\n\r\nIf two plugins override the same template, then the last one who overrides the template has won.\r\n\r\nTherefore, templates should be as modular as possible. The recommendation if there is a conflict between themes/plugins (e.g. and theme and a plugin booth try to change the editor template) is to create a proper template in site templates."}}