{"action":"created","comment":{"url":"https://api.github.com/repos/w3c/respec/pulls/comments/81793615","pull_request_review_id":2745404,"id":81793615,"diff_hunk":"@@ -0,0 +1,55 @@\n+\n+// Module core/seo\n+// Manages SEO information for documents\n+// e.g. set the canonical URL for the document if configured\n+\n+define(\n+    [\"core/pubsubhub\"],\n+    function (pubsubhub) {\n+        return {\n+            run:    function (conf, doc, cb) {\n+                var warnings = [];\n+                var uri;\n+                switch(conf.canonicalURI) {\n+                case \"edDraft\":\n+                    if (conf.edDraftURI) {\n+                        uri = conf.edDraftURI;\n+                    } else {\n+                        warnings.push(\"Canonical URI set to edDraft, but \" +\n+                                      \"no edDraftURI is set in configuration\");\n+                    }\n+                    break;\n+                case \"TR\":\n+                    if (conf.shortName) {\n+                        uri = 'https://www.w3.org/TR/' + conf.shortName + '/';\n+                    } else {\n+                        warnings.push(\"Canonical URI set to TR, but \" +\n+                                      \"no shortName is set in configuration\");\n+                    }\n+                    break;\n+                default:\n+                    if (conf.canonicalURI\n+                        && conf.canonicalURI.match(/^https?:/)) {\n+                        uri = conf.canonicalURI;\n+                    } else if (conf.shortName) {\n+                        uri = 'https://www.w3.org/TR/' + conf.shortName + '/';\n+                    }\n+                    break;\n+                }\n+                if (uri) {\n+                    var linkElem = document.createElement(\"link\");\n+                    linkElem.setAttribute(\"rel\", \"canonical\");\n+                    linkElem.setAttribute(\"href\", uri);\n+                    document.head.appendChild(linkElem);","path":"js/core/seo.js","position":43,"original_position":43,"commit_id":"ea48244be0f9ca5fd722e9ee0c72bf42e0734935","original_commit_id":"ea48244be0f9ca5fd722e9ee0c72bf42e0734935","user":{"login":"marcoscaceres","id":870154,"avatar_url":"https://avatars.githubusercontent.com/u/870154?v=3","gravatar_id":"","url":"https://api.github.com/users/marcoscaceres","html_url":"https://github.com/marcoscaceres","followers_url":"https://api.github.com/users/marcoscaceres/followers","following_url":"https://api.github.com/users/marcoscaceres/following{/other_user}","gists_url":"https://api.github.com/users/marcoscaceres/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoscaceres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoscaceres/subscriptions","organizations_url":"https://api.github.com/users/marcoscaceres/orgs","repos_url":"https://api.github.com/users/marcoscaceres/repos","events_url":"https://api.github.com/users/marcoscaceres/events{/privacy}","received_events_url":"https://api.github.com/users/marcoscaceres/received_events","type":"User","site_admin":false},"body":"Probably want doc.head here","created_at":"2016-10-04T16:10:03Z","updated_at":"2016-10-04T16:11:39Z","html_url":"https://github.com/w3c/respec/pull/938#discussion_r81793615","pull_request_url":"https://api.github.com/repos/w3c/respec/pulls/938","_links":{"self":{"href":"https://api.github.com/repos/w3c/respec/pulls/comments/81793615"},"html":{"href":"https://github.com/w3c/respec/pull/938#discussion_r81793615"},"pull_request":{"href":"https://api.github.com/repos/w3c/respec/pulls/938"}}},"pull_request":{"url":"https://api.github.com/repos/w3c/respec/pulls/938","id":87923087,"html_url":"https://github.com/w3c/respec/pull/938","diff_url":"https://github.com/w3c/respec/pull/938.diff","patch_url":"https://github.com/w3c/respec/pull/938.patch","issue_url":"https://api.github.com/repos/w3c/respec/issues/938","number":938,"state":"open","locked":false,"title":"Allow configurable canonical URIs for documents","user":{"login":"dontcallmedom","id":216410,"avatar_url":"https://avatars.githubusercontent.com/u/216410?v=3","gravatar_id":"","url":"https://api.github.com/users/dontcallmedom","html_url":"https://github.com/dontcallmedom","followers_url":"https://api.github.com/users/dontcallmedom/followers","following_url":"https://api.github.com/users/dontcallmedom/following{/other_user}","gists_url":"https://api.github.com/users/dontcallmedom/gists{/gist_id}","starred_url":"https://api.github.com/users/dontcallmedom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dontcallmedom/subscriptions","organizations_url":"https://api.github.com/users/dontcallmedom/orgs","repos_url":"https://api.github.com/users/dontcallmedom/repos","events_url":"https://api.github.com/users/dontcallmedom/events{/privacy}","received_events_url":"https://api.github.com/users/dontcallmedom/received_events","type":"User","site_admin":false},"body":"Can be configured to be either the latest TR url (default), the editors draft url, or any http(s) URL","created_at":"2016-10-04T15:55:21Z","updated_at":"2016-10-04T16:11:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e72e37ba40b559d00e5140ee4a161d28280cd8a4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/w3c/respec/pulls/938/commits","review_comments_url":"https://api.github.com/repos/w3c/respec/pulls/938/comments","review_comment_url":"https://api.github.com/repos/w3c/respec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/w3c/respec/issues/938/comments","statuses_url":"https://api.github.com/repos/w3c/respec/statuses/ea48244be0f9ca5fd722e9ee0c72bf42e0734935","head":{"label":"w3c:canonicaluri","ref":"canonicaluri","sha":"ea48244be0f9ca5fd722e9ee0c72bf42e0734935","user":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"repo":{"id":4287066,"name":"respec","full_name":"w3c/respec","owner":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/w3c/respec","description":"Specification Edition Support Tool","fork":false,"url":"https://api.github.com/repos/w3c/respec","forks_url":"https://api.github.com/repos/w3c/respec/forks","keys_url":"https://api.github.com/repos/w3c/respec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/w3c/respec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/w3c/respec/teams","hooks_url":"https://api.github.com/repos/w3c/respec/hooks","issue_events_url":"https://api.github.com/repos/w3c/respec/issues/events{/number}","events_url":"https://api.github.com/repos/w3c/respec/events","assignees_url":"https://api.github.com/repos/w3c/respec/assignees{/user}","branches_url":"https://api.github.com/repos/w3c/respec/branches{/branch}","tags_url":"https://api.github.com/repos/w3c/respec/tags","blobs_url":"https://api.github.com/repos/w3c/respec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/w3c/respec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/w3c/respec/git/refs{/sha}","trees_url":"https://api.github.com/repos/w3c/respec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/w3c/respec/statuses/{sha}","languages_url":"https://api.github.com/repos/w3c/respec/languages","stargazers_url":"https://api.github.com/repos/w3c/respec/stargazers","contributors_url":"https://api.github.com/repos/w3c/respec/contributors","subscribers_url":"https://api.github.com/repos/w3c/respec/subscribers","subscription_url":"https://api.github.com/repos/w3c/respec/subscription","commits_url":"https://api.github.com/repos/w3c/respec/commits{/sha}","git_commits_url":"https://api.github.com/repos/w3c/respec/git/commits{/sha}","comments_url":"https://api.github.com/repos/w3c/respec/comments{/number}","issue_comment_url":"https://api.github.com/repos/w3c/respec/issues/comments{/number}","contents_url":"https://api.github.com/repos/w3c/respec/contents/{+path}","compare_url":"https://api.github.com/repos/w3c/respec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/w3c/respec/merges","archive_url":"https://api.github.com/repos/w3c/respec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/w3c/respec/downloads","issues_url":"https://api.github.com/repos/w3c/respec/issues{/number}","pulls_url":"https://api.github.com/repos/w3c/respec/pulls{/number}","milestones_url":"https://api.github.com/repos/w3c/respec/milestones{/number}","notifications_url":"https://api.github.com/repos/w3c/respec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/w3c/respec/labels{/name}","releases_url":"https://api.github.com/repos/w3c/respec/releases{/id}","deployments_url":"https://api.github.com/repos/w3c/respec/deployments","created_at":"2012-05-10T16:39:37Z","updated_at":"2016-09-21T08:49:30Z","pushed_at":"2016-10-04T15:55:21Z","git_url":"git://github.com/w3c/respec.git","ssh_url":"git@github.com:w3c/respec.git","clone_url":"https://github.com/w3c/respec.git","svn_url":"https://github.com/w3c/respec","homepage":null,"size":20411,"stargazers_count":128,"watchers_count":128,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":102,"mirror_url":null,"open_issues_count":112,"forks":102,"open_issues":112,"watchers":128,"default_branch":"develop"}},"base":{"label":"w3c:develop","ref":"develop","sha":"77a64ffdab7cd27fd6fb63b7a66e49e92a34a439","user":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"repo":{"id":4287066,"name":"respec","full_name":"w3c/respec","owner":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/w3c/respec","description":"Specification Edition Support Tool","fork":false,"url":"https://api.github.com/repos/w3c/respec","forks_url":"https://api.github.com/repos/w3c/respec/forks","keys_url":"https://api.github.com/repos/w3c/respec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/w3c/respec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/w3c/respec/teams","hooks_url":"https://api.github.com/repos/w3c/respec/hooks","issue_events_url":"https://api.github.com/repos/w3c/respec/issues/events{/number}","events_url":"https://api.github.com/repos/w3c/respec/events","assignees_url":"https://api.github.com/repos/w3c/respec/assignees{/user}","branches_url":"https://api.github.com/repos/w3c/respec/branches{/branch}","tags_url":"https://api.github.com/repos/w3c/respec/tags","blobs_url":"https://api.github.com/repos/w3c/respec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/w3c/respec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/w3c/respec/git/refs{/sha}","trees_url":"https://api.github.com/repos/w3c/respec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/w3c/respec/statuses/{sha}","languages_url":"https://api.github.com/repos/w3c/respec/languages","stargazers_url":"https://api.github.com/repos/w3c/respec/stargazers","contributors_url":"https://api.github.com/repos/w3c/respec/contributors","subscribers_url":"https://api.github.com/repos/w3c/respec/subscribers","subscription_url":"https://api.github.com/repos/w3c/respec/subscription","commits_url":"https://api.github.com/repos/w3c/respec/commits{/sha}","git_commits_url":"https://api.github.com/repos/w3c/respec/git/commits{/sha}","comments_url":"https://api.github.com/repos/w3c/respec/comments{/number}","issue_comment_url":"https://api.github.com/repos/w3c/respec/issues/comments{/number}","contents_url":"https://api.github.com/repos/w3c/respec/contents/{+path}","compare_url":"https://api.github.com/repos/w3c/respec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/w3c/respec/merges","archive_url":"https://api.github.com/repos/w3c/respec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/w3c/respec/downloads","issues_url":"https://api.github.com/repos/w3c/respec/issues{/number}","pulls_url":"https://api.github.com/repos/w3c/respec/pulls{/number}","milestones_url":"https://api.github.com/repos/w3c/respec/milestones{/number}","notifications_url":"https://api.github.com/repos/w3c/respec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/w3c/respec/labels{/name}","releases_url":"https://api.github.com/repos/w3c/respec/releases{/id}","deployments_url":"https://api.github.com/repos/w3c/respec/deployments","created_at":"2012-05-10T16:39:37Z","updated_at":"2016-09-21T08:49:30Z","pushed_at":"2016-10-04T15:55:21Z","git_url":"git://github.com/w3c/respec.git","ssh_url":"git@github.com:w3c/respec.git","clone_url":"https://github.com/w3c/respec.git","svn_url":"https://github.com/w3c/respec","homepage":null,"size":20411,"stargazers_count":128,"watchers_count":128,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":102,"mirror_url":null,"open_issues_count":112,"forks":102,"open_issues":112,"watchers":128,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/w3c/respec/pulls/938"},"html":{"href":"https://github.com/w3c/respec/pull/938"},"issue":{"href":"https://api.github.com/repos/w3c/respec/issues/938"},"comments":{"href":"https://api.github.com/repos/w3c/respec/issues/938/comments"},"review_comments":{"href":"https://api.github.com/repos/w3c/respec/pulls/938/comments"},"review_comment":{"href":"https://api.github.com/repos/w3c/respec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/w3c/respec/pulls/938/commits"},"statuses":{"href":"https://api.github.com/repos/w3c/respec/statuses/ea48244be0f9ca5fd722e9ee0c72bf42e0734935"}}}}
{"actor":{"display_login":"marcoscaceres"}}