{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/35504548","id":35504548,"diff_hunk":"@@ -66,44 +42,59 @@ func addHeader(filename string) error {\n \tif err != nil {\n \t\treturn err\n \t}\n-\t//<head>\n-\thtmlNode2 := target.FirstChild.NextSibling\n-\n-\theadNode2 := htmlNode2.FirstChild\n-\n-\t//append source <head> after target <head>\n-\tdetachNode(headNode)\n-\thtmlNode2.InsertBefore(headNode, headNode2)\n-\tbodyNode2 := headNode2.NextSibling.NextSibling\n-\t//insert nav header\n-\tdetachNode(headerNode)\n-\tbodyNode2.InsertBefore(headerNode, bodyNode2.FirstChild)\n-\t//insert navContainerDivNode as target bodyNode's first child. Need to clean navContainerDivNode's Parent and Siblings first.\n-\tdetachNode(navContainerDivNode)\n-\tbodyNode2.InsertBefore(navContainerDivNode, bodyNode2.FirstChild)\n+\t//node for <head>\n+\theadNode := target.FirstChild.NextSibling.FirstChild\n \n-\tif err := targetHTML.Truncate(0); err != nil {\n+\terr = targetHTML.Truncate(0)\n+\tif err != nil {\n \t\treturn err\n \t}\n-\tif _, err := targetHTML.Seek(0, 0); err != nil {\n+\t_, err = targetHTML.Seek(0, 0)\n+\tif err != nil {\n \t\treturn err\n \t}\n-\terr = html.Render(targetHTML, target)\n-\treturn err\n+\tfor node := headNode; node != nil; node = node.NextSibling {\n+\t\terr = html.Render(targetHTML, node)\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t}\n+\treturn nil\n }\n \n-//TODO: These really should be fixed when generating the original html files\n-func fixHeadAlign(filename string) error {\n+func nitFix(filename string) error {\n \tfile, err := ioutil.ReadFile(filename)\n \tif err != nil {\n \t\treturn err\n \t}\n-\tnewContents := strings.Replace(string(file), \"h2 { font-size: 2.3125em; }\", \"h2 { font-size: 2.3125em; text-align: left;}\", 1)\n-\tnewContents = strings.Replace(newContents, \"h4 { font-size: 1.4375em; } }\", \"h4 { font-size: 1.4375em; text-align: left;} }\", 1)\n-\tnewContents = strings.Replace(newContents, \"<h2 id=\\\"_paths\\\">Paths</h2>\", \"<h2 id=\\\"_paths\\\">Operations</h2>\", 1)\n+\t//TODO: This really should be fixed when generating the original html files\n+\tnewContents := strings.Replace(string(file), \"<h2 id=\\\"_paths\\\">Paths</h2>\", \"<h2 id=\\\"_paths\\\">Operations</h2>\", 1)\n+\t//Adapt the color of headings to k8s style\n+\tnewContents = strings.Replace(newContents, \"color: #ba3925\", \"color: #428BCB\", -1)","path":"_tools/release_docs/api-reference-process.go","position":104,"original_position":104,"commit_id":"3d3b787ed3cf50bd95d4de1d788d6de8250f007b","original_commit_id":"3d3b787ed3cf50bd95d4de1d788d6de8250f007b","user":{"login":"caesarxuchao","id":2823529,"avatar_url":"https://avatars.githubusercontent.com/u/2823529?v=3","gravatar_id":"","url":"https://api.github.com/users/caesarxuchao","html_url":"https://github.com/caesarxuchao","followers_url":"https://api.github.com/users/caesarxuchao/followers","following_url":"https://api.github.com/users/caesarxuchao/following{/other_user}","gists_url":"https://api.github.com/users/caesarxuchao/gists{/gist_id}","starred_url":"https://api.github.com/users/caesarxuchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caesarxuchao/subscriptions","organizations_url":"https://api.github.com/users/caesarxuchao/orgs","repos_url":"https://api.github.com/users/caesarxuchao/repos","events_url":"https://api.github.com/users/caesarxuchao/events{/privacy}","received_events_url":"https://api.github.com/users/caesarxuchao/received_events","type":"User","site_admin":false},"body":"The color is defined in the style of hmtl files in the master branch. We need some of the style to keep the table format. I think we should look for a way to overwrite these using _layouts/ and _scss/.","created_at":"2015-07-27T04:02:52Z","updated_at":"2015-07-27T04:02:52Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11870#discussion_r35504548","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11870","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/35504548"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11870#discussion_r35504548"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11870"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11870","id":40859303,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11870","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11870.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11870.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11870","number":11870,"state":"closed","locked":false,"title":"Fix the api-reference pages in gh-pages, and update the _tool/","user":{"login":"caesarxuchao","id":2823529,"avatar_url":"https://avatars.githubusercontent.com/u/2823529?v=3","gravatar_id":"","url":"https://api.github.com/users/caesarxuchao","html_url":"https://github.com/caesarxuchao","followers_url":"https://api.github.com/users/caesarxuchao/followers","following_url":"https://api.github.com/users/caesarxuchao/following{/other_user}","gists_url":"https://api.github.com/users/caesarxuchao/gists{/gist_id}","starred_url":"https://api.github.com/users/caesarxuchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caesarxuchao/subscriptions","organizations_url":"https://api.github.com/users/caesarxuchao/orgs","repos_url":"https://api.github.com/users/caesarxuchao/repos","events_url":"https://api.github.com/users/caesarxuchao/events{/privacy}","received_events_url":"https://api.github.com/users/caesarxuchao/received_events","type":"User","site_admin":false},"body":"Now the tool in _tool/ strips the <!DOCTYPE> and <html> tags in definitions.html and operations.html, and move them to _includes/.\r\n\r\nAlso pushed a third commit to remove the underlines when rendering hyperlinks in these two pages. It looks more consistent with other pages now.\r\n\r\nYou can check the effects here: http://caesarxuchao.github.io/v1.0/docs/api-reference/operations.html\r\n\r\nreplace #11850 #11851\r\n\r\n@thockin @RichieEscarez @nikhiljindal ","created_at":"2015-07-26T20:34:19Z","updated_at":"2015-07-27T04:02:53Z","closed_at":"2015-07-27T03:51:20Z","merged_at":"2015-07-27T03:51:20Z","merge_commit_sha":"9d46b255847da6fad33d136f0855cd94f2c2d153","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11870/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11870/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11870/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/3d3b787ed3cf50bd95d4de1d788d6de8250f007b","head":{"label":"caesarxuchao:fix-nav-bar-api","ref":"fix-nav-bar-api","sha":"3d3b787ed3cf50bd95d4de1d788d6de8250f007b","user":{"login":"caesarxuchao","id":2823529,"avatar_url":"https://avatars.githubusercontent.com/u/2823529?v=3","gravatar_id":"","url":"https://api.github.com/users/caesarxuchao","html_url":"https://github.com/caesarxuchao","followers_url":"https://api.github.com/users/caesarxuchao/followers","following_url":"https://api.github.com/users/caesarxuchao/following{/other_user}","gists_url":"https://api.github.com/users/caesarxuchao/gists{/gist_id}","starred_url":"https://api.github.com/users/caesarxuchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caesarxuchao/subscriptions","organizations_url":"https://api.github.com/users/caesarxuchao/orgs","repos_url":"https://api.github.com/users/caesarxuchao/repos","events_url":"https://api.github.com/users/caesarxuchao/events{/privacy}","received_events_url":"https://api.github.com/users/caesarxuchao/received_events","type":"User","site_admin":false},"repo":{"id":34024678,"name":"kubernetes","full_name":"caesarxuchao/kubernetes","owner":{"login":"caesarxuchao","id":2823529,"avatar_url":"https://avatars.githubusercontent.com/u/2823529?v=3","gravatar_id":"","url":"https://api.github.com/users/caesarxuchao","html_url":"https://github.com/caesarxuchao","followers_url":"https://api.github.com/users/caesarxuchao/followers","following_url":"https://api.github.com/users/caesarxuchao/following{/other_user}","gists_url":"https://api.github.com/users/caesarxuchao/gists{/gist_id}","starred_url":"https://api.github.com/users/caesarxuchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caesarxuchao/subscriptions","organizations_url":"https://api.github.com/users/caesarxuchao/orgs","repos_url":"https://api.github.com/users/caesarxuchao/repos","events_url":"https://api.github.com/users/caesarxuchao/events{/privacy}","received_events_url":"https://api.github.com/users/caesarxuchao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caesarxuchao/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/caesarxuchao/kubernetes","forks_url":"https://api.github.com/repos/caesarxuchao/kubernetes/forks","keys_url":"https://api.github.com/repos/caesarxuchao/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caesarxuchao/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caesarxuchao/kubernetes/teams","hooks_url":"https://api.github.com/repos/caesarxuchao/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/caesarxuchao/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/caesarxuchao/kubernetes/events","assignees_url":"https://api.github.com/repos/caesarxuchao/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/caesarxuchao/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/caesarxuchao/kubernetes/tags","blobs_url":"https://api.github.com/repos/caesarxuchao/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caesarxuchao/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caesarxuchao/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/caesarxuchao/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caesarxuchao/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/caesarxuchao/kubernetes/languages","stargazers_url":"https://api.github.com/repos/caesarxuchao/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/caesarxuchao/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/caesarxuchao/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/caesarxuchao/kubernetes/subscription","commits_url":"https://api.github.com/repos/caesarxuchao/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/caesarxuchao/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/caesarxuchao/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/caesarxuchao/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/caesarxuchao/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/caesarxuchao/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caesarxuchao/kubernetes/merges","archive_url":"https://api.github.com/repos/caesarxuchao/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caesarxuchao/kubernetes/downloads","issues_url":"https://api.github.com/repos/caesarxuchao/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/caesarxuchao/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/caesarxuchao/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/caesarxuchao/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caesarxuchao/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/caesarxuchao/kubernetes/releases{/id}","created_at":"2015-04-15T23:57:43Z","updated_at":"2015-05-07T17:21:06Z","pushed_at":"2015-07-26T21:13:11Z","git_url":"git://github.com/caesarxuchao/kubernetes.git","ssh_url":"git@github.com:caesarxuchao/kubernetes.git","clone_url":"https://github.com/caesarxuchao/kubernetes.git","svn_url":"https://github.com/caesarxuchao/kubernetes","homepage":"http://kubernetes.io","size":96284,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:gh-pages","ref":"gh-pages","sha":"3b56c4a009e5dcf504c2eb0d983620ccaec91094","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-07-27T04:00:33Z","pushed_at":"2015-07-27T03:56:44Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":332594,"stargazers_count":9362,"watchers_count":9362,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2146,"mirror_url":null,"open_issues_count":1663,"forks":2146,"open_issues":1663,"watchers":9362,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11870"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11870"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11870"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11870/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11870/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11870/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/3d3b787ed3cf50bd95d4de1d788d6de8250f007b"}}}}