{"action":"closed","number":149,"pull_request":{"url":"https://api.github.com/repos/electricbookworks/electric-book/pulls/149","id":137841791,"html_url":"https://github.com/electricbookworks/electric-book/pull/149","diff_url":"https://github.com/electricbookworks/electric-book/pull/149.diff","patch_url":"https://github.com/electricbookworks/electric-book/pull/149.patch","issue_url":"https://api.github.com/repos/electricbookworks/electric-book/issues/149","number":149,"state":"closed","locked":false,"title":"Variant outputs","user":{"login":"arthurattwell","id":1053331,"avatar_url":"https://avatars0.githubusercontent.com/u/1053331?v=4","gravatar_id":"","url":"https://api.github.com/users/arthurattwell","html_url":"https://github.com/arthurattwell","followers_url":"https://api.github.com/users/arthurattwell/followers","following_url":"https://api.github.com/users/arthurattwell/following{/other_user}","gists_url":"https://api.github.com/users/arthurattwell/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurattwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurattwell/subscriptions","organizations_url":"https://api.github.com/users/arthurattwell/orgs","repos_url":"https://api.github.com/users/arthurattwell/repos","events_url":"https://api.github.com/users/arthurattwell/events{/privacy}","received_events_url":"https://api.github.com/users/arthurattwell/received_events","type":"User","site_admin":false},"body":"This is a fairly large update because it adds support for variant output. \r\n\r\nFor most books, our four main outputs (`print-pdf`, `screen-pdf`, `web` and `epub`) are sufficient. But sometimes you need a variation on one or more of these. For instance, you might be producing two versions of a printed book with different designs (e.g. for schools and for trade) with different selections of chapters. Or you may be white-labelling a website, and need to output various versions with different colours or logos. Variants make that possible.\r\n\r\nTo activate a variant, put its name as the `active-variant` in `settings.yml`. Make sure you deactivate it, for instance by commenting it out, to get your default output back.\r\n\r\nYou can create new stylesheets in addition to our standard four, and specify these in the new `_data/settings.yml` files. And you can set variant-specific metadata in `_data/meta.yml` in the same way you'd create metadata for a translation, by creating a `variants` node in a `work` containing all the same metadata you would for the `work`; except instead of setting a `directory`, you set a `variant`, which matches the name of the variant you created in `settings.yml`. This can include things like `identifier`s, `files` lists, and `toc` and `nav` nodes. \r\n\r\nFor TOCs, you can also change the TOC output for a variant by adding the names of the variants in which a TOC item should appear to the item's node as 'variants', e.g.:\r\n\r\n```\r\ntoc:\r\n  label: \"Study tips\"\r\n  file: \"05-study-tips\"\r\n  variants: school, varsity\r\n```\r\n\r\nWhen an `active-variant` is set, and the default `toc` or `nav` are output, any items that do not include the `active-variant`'s name in its `variants` list here will not be output.\r\n\r\nThis can be easier to maintain than creating a whole new `toc` node to the variant's metadata, which would mostly be a straight duplication of the default output.","created_at":"2017-08-27T17:46:36Z","updated_at":"2017-09-02T08:47:34Z","closed_at":"2017-09-02T08:47:34Z","merged_at":"2017-09-02T08:47:34Z","merge_commit_sha":"d29edaf5fcfa5f29ec2c2114e1e78fee94421ef4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/electricbookworks/electric-book/pulls/149/commits","review_comments_url":"https://api.github.com/repos/electricbookworks/electric-book/pulls/149/comments","review_comment_url":"https://api.github.com/repos/electricbookworks/electric-book/pulls/comments{/number}","comments_url":"https://api.github.com/repos/electricbookworks/electric-book/issues/149/comments","statuses_url":"https://api.github.com/repos/electricbookworks/electric-book/statuses/24d9af0afc9f75ae3768f8d1ea7d0b8a01a6dad5","head":{"label":"electricbookworks:variant-outputs","ref":"variant-outputs","sha":"24d9af0afc9f75ae3768f8d1ea7d0b8a01a6dad5","user":{"login":"electricbookworks","id":7754562,"avatar_url":"https://avatars2.githubusercontent.com/u/7754562?v=4","gravatar_id":"","url":"https://api.github.com/users/electricbookworks","html_url":"https://github.com/electricbookworks","followers_url":"https://api.github.com/users/electricbookworks/followers","following_url":"https://api.github.com/users/electricbookworks/following{/other_user}","gists_url":"https://api.github.com/users/electricbookworks/gists{/gist_id}","starred_url":"https://api.github.com/users/electricbookworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electricbookworks/subscriptions","organizations_url":"https://api.github.com/users/electricbookworks/orgs","repos_url":"https://api.github.com/users/electricbookworks/repos","events_url":"https://api.github.com/users/electricbookworks/events{/privacy}","received_events_url":"https://api.github.com/users/electricbookworks/received_events","type":"Organization","site_admin":false},"repo":{"id":63726747,"name":"electric-book","full_name":"electricbookworks/electric-book","owner":{"login":"electricbookworks","id":7754562,"avatar_url":"https://avatars2.githubusercontent.com/u/7754562?v=4","gravatar_id":"","url":"https://api.github.com/users/electricbookworks","html_url":"https://github.com/electricbookworks","followers_url":"https://api.github.com/users/electricbookworks/followers","following_url":"https://api.github.com/users/electricbookworks/following{/other_user}","gists_url":"https://api.github.com/users/electricbookworks/gists{/gist_id}","starred_url":"https://api.github.com/users/electricbookworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electricbookworks/subscriptions","organizations_url":"https://api.github.com/users/electricbookworks/orgs","repos_url":"https://api.github.com/users/electricbookworks/repos","events_url":"https://api.github.com/users/electricbookworks/events{/privacy}","received_events_url":"https://api.github.com/users/electricbookworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/electricbookworks/electric-book","description":"A Jekyll template for creating books, ebooks and book-like websites","fork":false,"url":"https://api.github.com/repos/electricbookworks/electric-book","forks_url":"https://api.github.com/repos/electricbookworks/electric-book/forks","keys_url":"https://api.github.com/repos/electricbookworks/electric-book/keys{/key_id}","collaborators_url":"https://api.github.com/repos/electricbookworks/electric-book/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/electricbookworks/electric-book/teams","hooks_url":"https://api.github.com/repos/electricbookworks/electric-book/hooks","issue_events_url":"https://api.github.com/repos/electricbookworks/electric-book/issues/events{/number}","events_url":"https://api.github.com/repos/electricbookworks/electric-book/events","assignees_url":"https://api.github.com/repos/electricbookworks/electric-book/assignees{/user}","branches_url":"https://api.github.com/repos/electricbookworks/electric-book/branches{/branch}","tags_url":"https://api.github.com/repos/electricbookworks/electric-book/tags","blobs_url":"https://api.github.com/repos/electricbookworks/electric-book/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/electricbookworks/electric-book/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/electricbookworks/electric-book/git/refs{/sha}","trees_url":"https://api.github.com/repos/electricbookworks/electric-book/git/trees{/sha}","statuses_url":"https://api.github.com/repos/electricbookworks/electric-book/statuses/{sha}","languages_url":"https://api.github.com/repos/electricbookworks/electric-book/languages","stargazers_url":"https://api.github.com/repos/electricbookworks/electric-book/stargazers","contributors_url":"https://api.github.com/repos/electricbookworks/electric-book/contributors","subscribers_url":"https://api.github.com/repos/electricbookworks/electric-book/subscribers","subscription_url":"https://api.github.com/repos/electricbookworks/electric-book/subscription","commits_url":"https://api.github.com/repos/electricbookworks/electric-book/commits{/sha}","git_commits_url":"https://api.github.com/repos/electricbookworks/electric-book/git/commits{/sha}","comments_url":"https://api.github.com/repos/electricbookworks/electric-book/comments{/number}","issue_comment_url":"https://api.github.com/repos/electricbookworks/electric-book/issues/comments{/number}","contents_url":"https://api.github.com/repos/electricbookworks/electric-book/contents/{+path}","compare_url":"https://api.github.com/repos/electricbookworks/electric-book/compare/{base}...{head}","merges_url":"https://api.github.com/repos/electricbookworks/electric-book/merges","archive_url":"https://api.github.com/repos/electricbookworks/electric-book/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/electricbookworks/electric-book/downloads","issues_url":"https://api.github.com/repos/electricbookworks/electric-book/issues{/number}","pulls_url":"https://api.github.com/repos/electricbookworks/electric-book/pulls{/number}","milestones_url":"https://api.github.com/repos/electricbookworks/electric-book/milestones{/number}","notifications_url":"https://api.github.com/repos/electricbookworks/electric-book/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/electricbookworks/electric-book/labels{/name}","releases_url":"https://api.github.com/repos/electricbookworks/electric-book/releases{/id}","deployments_url":"https://api.github.com/repos/electricbookworks/electric-book/deployments","created_at":"2016-07-19T20:43:17Z","updated_at":"2017-09-01T17:27:17Z","pushed_at":"2017-09-02T08:47:34Z","git_url":"git://github.com/electricbookworks/electric-book.git","ssh_url":"git@github.com:electricbookworks/electric-book.git","clone_url":"https://github.com/electricbookworks/electric-book.git","svn_url":"https://github.com/electricbookworks/electric-book","homepage":"http://electricbook.works","size":6552,"stargazers_count":16,"watchers_count":16,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":31,"forks":8,"open_issues":31,"watchers":16,"default_branch":"develop"}},"base":{"label":"electricbookworks:develop","ref":"develop","sha":"22ebae5b230c8dff9ab5ef4d50e47bfea731b1ab","user":{"login":"electricbookworks","id":7754562,"avatar_url":"https://avatars2.githubusercontent.com/u/7754562?v=4","gravatar_id":"","url":"https://api.github.com/users/electricbookworks","html_url":"https://github.com/electricbookworks","followers_url":"https://api.github.com/users/electricbookworks/followers","following_url":"https://api.github.com/users/electricbookworks/following{/other_user}","gists_url":"https://api.github.com/users/electricbookworks/gists{/gist_id}","starred_url":"https://api.github.com/users/electricbookworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electricbookworks/subscriptions","organizations_url":"https://api.github.com/users/electricbookworks/orgs","repos_url":"https://api.github.com/users/electricbookworks/repos","events_url":"https://api.github.com/users/electricbookworks/events{/privacy}","received_events_url":"https://api.github.com/users/electricbookworks/received_events","type":"Organization","site_admin":false},"repo":{"id":63726747,"name":"electric-book","full_name":"electricbookworks/electric-book","owner":{"login":"electricbookworks","id":7754562,"avatar_url":"https://avatars2.githubusercontent.com/u/7754562?v=4","gravatar_id":"","url":"https://api.github.com/users/electricbookworks","html_url":"https://github.com/electricbookworks","followers_url":"https://api.github.com/users/electricbookworks/followers","following_url":"https://api.github.com/users/electricbookworks/following{/other_user}","gists_url":"https://api.github.com/users/electricbookworks/gists{/gist_id}","starred_url":"https://api.github.com/users/electricbookworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electricbookworks/subscriptions","organizations_url":"https://api.github.com/users/electricbookworks/orgs","repos_url":"https://api.github.com/users/electricbookworks/repos","events_url":"https://api.github.com/users/electricbookworks/events{/privacy}","received_events_url":"https://api.github.com/users/electricbookworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/electricbookworks/electric-book","description":"A Jekyll template for creating books, ebooks and book-like websites","fork":false,"url":"https://api.github.com/repos/electricbookworks/electric-book","forks_url":"https://api.github.com/repos/electricbookworks/electric-book/forks","keys_url":"https://api.github.com/repos/electricbookworks/electric-book/keys{/key_id}","collaborators_url":"https://api.github.com/repos/electricbookworks/electric-book/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/electricbookworks/electric-book/teams","hooks_url":"https://api.github.com/repos/electricbookworks/electric-book/hooks","issue_events_url":"https://api.github.com/repos/electricbookworks/electric-book/issues/events{/number}","events_url":"https://api.github.com/repos/electricbookworks/electric-book/events","assignees_url":"https://api.github.com/repos/electricbookworks/electric-book/assignees{/user}","branches_url":"https://api.github.com/repos/electricbookworks/electric-book/branches{/branch}","tags_url":"https://api.github.com/repos/electricbookworks/electric-book/tags","blobs_url":"https://api.github.com/repos/electricbookworks/electric-book/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/electricbookworks/electric-book/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/electricbookworks/electric-book/git/refs{/sha}","trees_url":"https://api.github.com/repos/electricbookworks/electric-book/git/trees{/sha}","statuses_url":"https://api.github.com/repos/electricbookworks/electric-book/statuses/{sha}","languages_url":"https://api.github.com/repos/electricbookworks/electric-book/languages","stargazers_url":"https://api.github.com/repos/electricbookworks/electric-book/stargazers","contributors_url":"https://api.github.com/repos/electricbookworks/electric-book/contributors","subscribers_url":"https://api.github.com/repos/electricbookworks/electric-book/subscribers","subscription_url":"https://api.github.com/repos/electricbookworks/electric-book/subscription","commits_url":"https://api.github.com/repos/electricbookworks/electric-book/commits{/sha}","git_commits_url":"https://api.github.com/repos/electricbookworks/electric-book/git/commits{/sha}","comments_url":"https://api.github.com/repos/electricbookworks/electric-book/comments{/number}","issue_comment_url":"https://api.github.com/repos/electricbookworks/electric-book/issues/comments{/number}","contents_url":"https://api.github.com/repos/electricbookworks/electric-book/contents/{+path}","compare_url":"https://api.github.com/repos/electricbookworks/electric-book/compare/{base}...{head}","merges_url":"https://api.github.com/repos/electricbookworks/electric-book/merges","archive_url":"https://api.github.com/repos/electricbookworks/electric-book/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/electricbookworks/electric-book/downloads","issues_url":"https://api.github.com/repos/electricbookworks/electric-book/issues{/number}","pulls_url":"https://api.github.com/repos/electricbookworks/electric-book/pulls{/number}","milestones_url":"https://api.github.com/repos/electricbookworks/electric-book/milestones{/number}","notifications_url":"https://api.github.com/repos/electricbookworks/electric-book/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/electricbookworks/electric-book/labels{/name}","releases_url":"https://api.github.com/repos/electricbookworks/electric-book/releases{/id}","deployments_url":"https://api.github.com/repos/electricbookworks/electric-book/deployments","created_at":"2016-07-19T20:43:17Z","updated_at":"2017-09-01T17:27:17Z","pushed_at":"2017-09-02T08:47:34Z","git_url":"git://github.com/electricbookworks/electric-book.git","ssh_url":"git@github.com:electricbookworks/electric-book.git","clone_url":"https://github.com/electricbookworks/electric-book.git","svn_url":"https://github.com/electricbookworks/electric-book","homepage":"http://electricbook.works","size":6552,"stargazers_count":16,"watchers_count":16,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":31,"forks":8,"open_issues":31,"watchers":16,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/electricbookworks/electric-book/pulls/149"},"html":{"href":"https://github.com/electricbookworks/electric-book/pull/149"},"issue":{"href":"https://api.github.com/repos/electricbookworks/electric-book/issues/149"},"comments":{"href":"https://api.github.com/repos/electricbookworks/electric-book/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/electricbookworks/electric-book/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/electricbookworks/electric-book/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/electricbookworks/electric-book/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/electricbookworks/electric-book/statuses/24d9af0afc9f75ae3768f8d1ea7d0b8a01a6dad5"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"arthurattwell","id":1053331,"avatar_url":"https://avatars0.githubusercontent.com/u/1053331?v=4","gravatar_id":"","url":"https://api.github.com/users/arthurattwell","html_url":"https://github.com/arthurattwell","followers_url":"https://api.github.com/users/arthurattwell/followers","following_url":"https://api.github.com/users/arthurattwell/following{/other_user}","gists_url":"https://api.github.com/users/arthurattwell/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurattwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurattwell/subscriptions","organizations_url":"https://api.github.com/users/arthurattwell/orgs","repos_url":"https://api.github.com/users/arthurattwell/repos","events_url":"https://api.github.com/users/arthurattwell/events{/privacy}","received_events_url":"https://api.github.com/users/arthurattwell/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":10,"additions":224,"deletions":67,"changed_files":6}}
{"actor":{"display_login":"arthurattwell"}}