{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/carnival/pulls/comments/26611196","id":26611196,"diff_hunk":"@@ -0,0 +1,157 @@\n+<h1>Carnival User Guide\n+\n+<article>\n+  <p>\n+\n+    Carnival is an unobtrusive, developer-friendly way to add comments to any\n+    web site.\n+\n+  <p>\n+\n+    Installation is easy. Once you've \n+    <a href=@{SitesR}>created a Site\n+    , just add the following HTML snippet to the bottom of your page:\n+\n+  <pre>\n+    <code>\n+      \\&lt;script src='#{root}/YOUR-SITE-ID/init.js'&gt;&lt;/script&gt;\n+      \\&lt;script&gt;\n+      \\  document.addEventListener(\"DOMContentLoaded\", Carnival.init);\n+      \\&lt;/script&gt;\n+\n+  <p>\n+\n+    By default, a hidden side-bar will be added to any \n+    <code>article\n+    elements. Within these elements, each \n+    <code>p\n+    and \n+    <code>pre\n+    element will receive a small indicator, visible on hover. When clicked, the\n+    side-bar will expand allowing visitors to comment on that specific portion\n+    of your article.\n+\n+  <p>\n+\n+    Carnival also sends email notifications on replies and provides an RSS feed\n+    of recent comments on your Site.\n+\n+  <p>\n+\n+    This page itself has Carnival loaded. Feel free to add comments and \n+    <a href=view-source:@{DocsR}>view-source\n+    to see how it works.\n+\n+  <h2>Options\n+\n+  <p>\n+    <code>Carnival.init\n+    accepts an options object with any of the following keys:\n+\n+  <table .table>\n+    <tr>\n+      <th>Option\n+      <th>Default Value\n+      <th>Description\n+    <tr>\n+      <td><code>enabled</code>\n+      <td><code>true</code>\n+      <td>Add Carnival on this page?\n+    <tr>\n+      <td><code>article_author</code>\n+      <td><code>\"\"</code>\n+      <td>The Article author. Used in the Comments Feed.\n+    <tr>\n+      <td><code>article_selector</code>\n+      <td><code>\"article\"</code>\n+      <td>The CSS selector used to find the Article element.\n+    <tr>\n+      <td><code>block_selector</code>\n+      <td><code>\":scope > p, :scope > pre\"</code>\n+      <td>\n+        The CSS selector used to find elements within the Article on which to\n+        add comment Threads. When this selector is used, \n+        <code>:scope\n+        will refer to your Article element.\n+    <tr>\n+      <td><code>onNewComment</code>\n+      <td><code>function(comment) { };</code>\n+      <td>A callback invoked whenever comments are inserted in the DOM.\n+\n+  <p>\n+    To pass options, you'll need to modify your event handler like so:\n+\n+  <pre>\n+    <code>\n+      \\document.addEventListener(\"DOMContentLoaded\", function() {\n+      \\  Carnival.init({\n+      \\    enabled: true,\n+      \\    article_author: '',\n+      \\    article_selector: 'article',\n+      \\    block_selector: ':scope > p, :scope > pre',\n+      \\    onNewComment: function(comment) { };\n+      \\  });\n+      \\});\n+\n+  <h2>Impact on the DOM\n+\n+  <p>\n+\n+    Carnival will insert an element to contain the comment threads and form.\n+    This new element will be the first child of your Article element and have\n+    the class \n+    <code>carnival\n+    . To support the positioning of this element, Carnival must ensure that\n+    your Article element is \n+    <code>position: relative\n+    .\n+\n+  <p>\n+\n+    Carnival will add sibling elements after each commentable block to hold the\n+    comment indicator and count. These elements will have the class \n+    <code>carnival-comment-indicator\n+    .\n+\n+  <p>\n+\n+    When comments are opened, Carnival will add a \n+    <code>commenting\n+    class to your Article element. To make room for itself, Carnival will shift\n+    your Article element \n+    <code>150\n+    pixels to its left. It does this by taking the element's current ","path":"templates/docs.hamlet","position":123,"original_position":123,"commit_id":"9f34e454b3d5f5646100216aa9f49fd0184172b0","original_commit_id":"9f34e454b3d5f5646100216aa9f49fd0184172b0","user":{"login":"gabebw","id":257678,"avatar_url":"https://avatars.githubusercontent.com/u/257678?v=3","gravatar_id":"","url":"https://api.github.com/users/gabebw","html_url":"https://github.com/gabebw","followers_url":"https://api.github.com/users/gabebw/followers","following_url":"https://api.github.com/users/gabebw/following{/other_user}","gists_url":"https://api.github.com/users/gabebw/gists{/gist_id}","starred_url":"https://api.github.com/users/gabebw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabebw/subscriptions","organizations_url":"https://api.github.com/users/gabebw/orgs","repos_url":"https://api.github.com/users/gabebw/repos","events_url":"https://api.github.com/users/gabebw/events{/privacy}","received_events_url":"https://api.github.com/users/gabebw/received_events","type":"User","site_admin":false},"body":"Maybe \"to the left\"? Or is this text [irreplaceable](https://www.youtube.com/watch?v=2EwViQxSJJQ)?","created_at":"2015-03-17T20:13:34Z","updated_at":"2015-03-17T20:13:34Z","html_url":"https://github.com/thoughtbot/carnival/pull/176#discussion_r26611196","pull_request_url":"https://api.github.com/repos/thoughtbot/carnival/pulls/176","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/carnival/pulls/comments/26611196"},"html":{"href":"https://github.com/thoughtbot/carnival/pull/176#discussion_r26611196"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/carnival/pulls/176"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/carnival/pulls/176","id":31274897,"html_url":"https://github.com/thoughtbot/carnival/pull/176","diff_url":"https://github.com/thoughtbot/carnival/pull/176.diff","patch_url":"https://github.com/thoughtbot/carnival/pull/176.patch","issue_url":"https://api.github.com/repos/thoughtbot/carnival/issues/176","number":176,"state":"open","locked":false,"title":"First draft of /docs","user":{"login":"pbrisbin","id":50812,"avatar_url":"https://avatars.githubusercontent.com/u/50812?v=3","gravatar_id":"","url":"https://api.github.com/users/pbrisbin","html_url":"https://github.com/pbrisbin","followers_url":"https://api.github.com/users/pbrisbin/followers","following_url":"https://api.github.com/users/pbrisbin/following{/other_user}","gists_url":"https://api.github.com/users/pbrisbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pbrisbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbrisbin/subscriptions","organizations_url":"https://api.github.com/users/pbrisbin/orgs","repos_url":"https://api.github.com/users/pbrisbin/repos","events_url":"https://api.github.com/users/pbrisbin/events{/privacy}","received_events_url":"https://api.github.com/users/pbrisbin/received_events","type":"User","site_admin":false},"body":"- Move DemoR to DocsR\n- Add highlight.js\n- Write /docs content (suggestions welcome!)\n- Add link to navigation bar","created_at":"2015-03-16T19:14:46Z","updated_at":"2015-03-17T20:13:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc7305bfc6c2943a4d897889c48f5166a51e0674","assignee":null,"milestone":{"url":"https://api.github.com/repos/thoughtbot/carnival/milestones/2","html_url":"https://github.com/thoughtbot/carnival/milestones/Product%20beta","labels_url":"https://api.github.com/repos/thoughtbot/carnival/milestones/2/labels","id":1017021,"number":2,"title":"Product beta","description":"","creator":{"login":"pbrisbin","id":50812,"avatar_url":"https://avatars.githubusercontent.com/u/50812?v=3","gravatar_id":"","url":"https://api.github.com/users/pbrisbin","html_url":"https://github.com/pbrisbin","followers_url":"https://api.github.com/users/pbrisbin/followers","following_url":"https://api.github.com/users/pbrisbin/following{/other_user}","gists_url":"https://api.github.com/users/pbrisbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pbrisbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbrisbin/subscriptions","organizations_url":"https://api.github.com/users/pbrisbin/orgs","repos_url":"https://api.github.com/users/pbrisbin/repos","events_url":"https://api.github.com/users/pbrisbin/events{/privacy}","received_events_url":"https://api.github.com/users/pbrisbin/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":5,"state":"open","created_at":"2015-03-11T18:56:42Z","updated_at":"2015-03-17T19:06:35Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/thoughtbot/carnival/pulls/176/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/carnival/pulls/176/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/carnival/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/carnival/issues/176/comments","statuses_url":"https://api.github.com/repos/thoughtbot/carnival/statuses/9f34e454b3d5f5646100216aa9f49fd0184172b0","head":{"label":"thoughtbot:pb-docs","ref":"pb-docs","sha":"9f34e454b3d5f5646100216aa9f49fd0184172b0","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":16422338,"name":"carnival","full_name":"thoughtbot/carnival","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/carnival","description":"Comments server for our blog, in Haskell","fork":false,"url":"https://api.github.com/repos/thoughtbot/carnival","forks_url":"https://api.github.com/repos/thoughtbot/carnival/forks","keys_url":"https://api.github.com/repos/thoughtbot/carnival/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/carnival/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/carnival/teams","hooks_url":"https://api.github.com/repos/thoughtbot/carnival/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/carnival/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/carnival/events","assignees_url":"https://api.github.com/repos/thoughtbot/carnival/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/carnival/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/carnival/tags","blobs_url":"https://api.github.com/repos/thoughtbot/carnival/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/carnival/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/carnival/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/carnival/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/carnival/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/carnival/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/carnival/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/carnival/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/carnival/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/carnival/subscription","commits_url":"https://api.github.com/repos/thoughtbot/carnival/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/carnival/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/carnival/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/carnival/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/carnival/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/carnival/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/carnival/merges","archive_url":"https://api.github.com/repos/thoughtbot/carnival/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/carnival/downloads","issues_url":"https://api.github.com/repos/thoughtbot/carnival/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/carnival/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/carnival/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/carnival/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/carnival/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/carnival/releases{/id}","created_at":"2014-01-31T22:14:32Z","updated_at":"2015-03-16T22:28:40Z","pushed_at":"2015-03-17T19:45:50Z","git_url":"git://github.com/thoughtbot/carnival.git","ssh_url":"git@github.com:thoughtbot/carnival.git","clone_url":"https://github.com/thoughtbot/carnival.git","svn_url":"https://github.com/thoughtbot/carnival","homepage":null,"size":3123,"stargazers_count":162,"watchers_count":162,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":17,"forks":9,"open_issues":17,"watchers":162,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"38f110cbcbef5e1216312061d9c3c2bb8775beea","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":16422338,"name":"carnival","full_name":"thoughtbot/carnival","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/carnival","description":"Comments server for our blog, in Haskell","fork":false,"url":"https://api.github.com/repos/thoughtbot/carnival","forks_url":"https://api.github.com/repos/thoughtbot/carnival/forks","keys_url":"https://api.github.com/repos/thoughtbot/carnival/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/carnival/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/carnival/teams","hooks_url":"https://api.github.com/repos/thoughtbot/carnival/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/carnival/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/carnival/events","assignees_url":"https://api.github.com/repos/thoughtbot/carnival/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/carnival/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/carnival/tags","blobs_url":"https://api.github.com/repos/thoughtbot/carnival/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/carnival/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/carnival/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/carnival/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/carnival/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/carnival/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/carnival/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/carnival/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/carnival/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/carnival/subscription","commits_url":"https://api.github.com/repos/thoughtbot/carnival/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/carnival/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/carnival/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/carnival/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/carnival/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/carnival/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/carnival/merges","archive_url":"https://api.github.com/repos/thoughtbot/carnival/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/carnival/downloads","issues_url":"https://api.github.com/repos/thoughtbot/carnival/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/carnival/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/carnival/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/carnival/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/carnival/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/carnival/releases{/id}","created_at":"2014-01-31T22:14:32Z","updated_at":"2015-03-16T22:28:40Z","pushed_at":"2015-03-17T19:45:50Z","git_url":"git://github.com/thoughtbot/carnival.git","ssh_url":"git@github.com:thoughtbot/carnival.git","clone_url":"https://github.com/thoughtbot/carnival.git","svn_url":"https://github.com/thoughtbot/carnival","homepage":null,"size":3123,"stargazers_count":162,"watchers_count":162,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":17,"forks":9,"open_issues":17,"watchers":162,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/carnival/pulls/176"},"html":{"href":"https://github.com/thoughtbot/carnival/pull/176"},"issue":{"href":"https://api.github.com/repos/thoughtbot/carnival/issues/176"},"comments":{"href":"https://api.github.com/repos/thoughtbot/carnival/issues/176/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/carnival/pulls/176/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/carnival/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/carnival/pulls/176/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/carnival/statuses/9f34e454b3d5f5646100216aa9f49fd0184172b0"}}}}