{"action":"created","comment":{"url":"https://api.github.com/repos/18F/hub/pulls/comments/29530292","id":29530292,"diff_hunk":"@@ -12,8 +12,9 @@ class Site\n     def after_render\n       pages_api_after_render\n       return if self.config['skip_index']\n-      index = Hub::SearchIndexBuilder.build_index(self)\n+      index, url_to_doc = Hub::SearchIndexBuilder.build_index(self)\n       self.pages << index if index != nil\n+      self.pages << url_to_doc if url_to_doc != nil","path":"_plugins/search_hook.rb","position":7,"original_position":7,"commit_id":"8c79bae90fada16c4300dbb94f6b28238bc18727","original_commit_id":"8c79bae90fada16c4300dbb94f6b28238bc18727","user":{"login":"afeld","id":86842,"avatar_url":"https://avatars.githubusercontent.com/u/86842?v=3","gravatar_id":"","url":"https://api.github.com/users/afeld","html_url":"https://github.com/afeld","followers_url":"https://api.github.com/users/afeld/followers","following_url":"https://api.github.com/users/afeld/following{/other_user}","gists_url":"https://api.github.com/users/afeld/gists{/gist_id}","starred_url":"https://api.github.com/users/afeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afeld/subscriptions","organizations_url":"https://api.github.com/users/afeld/orgs","repos_url":"https://api.github.com/users/afeld/repos","events_url":"https://api.github.com/users/afeld/events{/privacy}","received_events_url":"https://api.github.com/users/afeld/received_events","type":"User","site_admin":false},"body":"Why would the page be `nil`? I'd simplify to\r\n\r\n```ruby\r\nsearch_pages = Hub::SearchIndexBuilder.build_index(self)\r\nself.pages.concat(search_pages)\r\n```","created_at":"2015-05-01T20:17:54Z","updated_at":"2015-05-01T20:17:54Z","html_url":"https://github.com/18F/hub/pull/279#discussion_r29530292","pull_request_url":"https://api.github.com/repos/18F/hub/pulls/279","_links":{"self":{"href":"https://api.github.com/repos/18F/hub/pulls/comments/29530292"},"html":{"href":"https://github.com/18F/hub/pull/279#discussion_r29530292"},"pull_request":{"href":"https://api.github.com/repos/18F/hub/pulls/279"}}},"pull_request":{"url":"https://api.github.com/repos/18F/hub/pulls/279","id":34561786,"html_url":"https://github.com/18F/hub/pull/279","diff_url":"https://github.com/18F/hub/pull/279.diff","patch_url":"https://github.com/18F/hub/pull/279.patch","issue_url":"https://api.github.com/repos/18F/hub/issues/279","number":279,"state":"open","locked":false,"title":"Ship a url-to-doc map for search, not pages.json","user":{"login":"mbland","id":301547,"avatar_url":"https://avatars.githubusercontent.com/u/301547?v=3","gravatar_id":"","url":"https://api.github.com/users/mbland","html_url":"https://github.com/mbland","followers_url":"https://api.github.com/users/mbland/followers","following_url":"https://api.github.com/users/mbland/following{/other_user}","gists_url":"https://api.github.com/users/mbland/gists{/gist_id}","starred_url":"https://api.github.com/users/mbland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbland/subscriptions","organizations_url":"https://api.github.com/users/mbland/orgs","repos_url":"https://api.github.com/users/mbland/repos","events_url":"https://api.github.com/users/mbland/events{/privacy}","received_events_url":"https://api.github.com/users/mbland/received_events","type":"User","site_admin":false},"body":"Size comparison:\r\n$ ls -l _site/api/v1/pages.json _site/url_to_doc.json\r\n-rw-r--r--  1 _  _  675772 May  1 15:34 _site/api/v1/pages.json\r\n-rw-r--r--  1 _  _   50932 May  1 15:34 _site/url_to_doc.json\r\n\r\n$ python -c 'print \"%0.2f%%\" % ((50932 / 675772.0) * 100)'\r\n7.54%\r\n\r\ncc: @afeld @dhcole ","created_at":"2015-05-01T19:45:07Z","updated_at":"2015-05-01T20:17:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dff94d0661f2179b7c6aec5a89612671c79aa787","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/18F/hub/pulls/279/commits","review_comments_url":"https://api.github.com/repos/18F/hub/pulls/279/comments","review_comment_url":"https://api.github.com/repos/18F/hub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/hub/issues/279/comments","statuses_url":"https://api.github.com/repos/18F/hub/statuses/8c79bae90fada16c4300dbb94f6b28238bc18727","head":{"label":"18F:stop-shipping-pages-json","ref":"stop-shipping-pages-json","sha":"8c79bae90fada16c4300dbb94f6b28238bc18727","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":27776551,"name":"hub","full_name":"18F/hub","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/hub","description":"Documentation hub for the 18F team","fork":false,"url":"https://api.github.com/repos/18F/hub","forks_url":"https://api.github.com/repos/18F/hub/forks","keys_url":"https://api.github.com/repos/18F/hub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/hub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/hub/teams","hooks_url":"https://api.github.com/repos/18F/hub/hooks","issue_events_url":"https://api.github.com/repos/18F/hub/issues/events{/number}","events_url":"https://api.github.com/repos/18F/hub/events","assignees_url":"https://api.github.com/repos/18F/hub/assignees{/user}","branches_url":"https://api.github.com/repos/18F/hub/branches{/branch}","tags_url":"https://api.github.com/repos/18F/hub/tags","blobs_url":"https://api.github.com/repos/18F/hub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/hub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/hub/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/hub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/hub/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/hub/languages","stargazers_url":"https://api.github.com/repos/18F/hub/stargazers","contributors_url":"https://api.github.com/repos/18F/hub/contributors","subscribers_url":"https://api.github.com/repos/18F/hub/subscribers","subscription_url":"https://api.github.com/repos/18F/hub/subscription","commits_url":"https://api.github.com/repos/18F/hub/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/hub/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/hub/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/hub/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/hub/contents/{+path}","compare_url":"https://api.github.com/repos/18F/hub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/hub/merges","archive_url":"https://api.github.com/repos/18F/hub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/hub/downloads","issues_url":"https://api.github.com/repos/18F/hub/issues{/number}","pulls_url":"https://api.github.com/repos/18F/hub/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/hub/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/hub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/hub/labels{/name}","releases_url":"https://api.github.com/repos/18F/hub/releases{/id}","created_at":"2014-12-09T16:48:37Z","updated_at":"2015-05-01T16:56:52Z","pushed_at":"2015-05-01T19:45:07Z","git_url":"git://github.com/18F/hub.git","ssh_url":"git@github.com:18F/hub.git","clone_url":"https://github.com/18F/hub.git","svn_url":"https://github.com/18F/hub","homepage":"https://18f.gsa.gov/hub/","size":13140,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":61,"forks":20,"open_issues":61,"watchers":14,"default_branch":"master"}},"base":{"label":"18F:master","ref":"master","sha":"6840f7eb6c3682cb508a8651a15c65e11bac8d00","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":27776551,"name":"hub","full_name":"18F/hub","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/hub","description":"Documentation hub for the 18F team","fork":false,"url":"https://api.github.com/repos/18F/hub","forks_url":"https://api.github.com/repos/18F/hub/forks","keys_url":"https://api.github.com/repos/18F/hub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/hub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/hub/teams","hooks_url":"https://api.github.com/repos/18F/hub/hooks","issue_events_url":"https://api.github.com/repos/18F/hub/issues/events{/number}","events_url":"https://api.github.com/repos/18F/hub/events","assignees_url":"https://api.github.com/repos/18F/hub/assignees{/user}","branches_url":"https://api.github.com/repos/18F/hub/branches{/branch}","tags_url":"https://api.github.com/repos/18F/hub/tags","blobs_url":"https://api.github.com/repos/18F/hub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/hub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/hub/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/hub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/hub/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/hub/languages","stargazers_url":"https://api.github.com/repos/18F/hub/stargazers","contributors_url":"https://api.github.com/repos/18F/hub/contributors","subscribers_url":"https://api.github.com/repos/18F/hub/subscribers","subscription_url":"https://api.github.com/repos/18F/hub/subscription","commits_url":"https://api.github.com/repos/18F/hub/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/hub/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/hub/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/hub/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/hub/contents/{+path}","compare_url":"https://api.github.com/repos/18F/hub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/hub/merges","archive_url":"https://api.github.com/repos/18F/hub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/hub/downloads","issues_url":"https://api.github.com/repos/18F/hub/issues{/number}","pulls_url":"https://api.github.com/repos/18F/hub/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/hub/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/hub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/hub/labels{/name}","releases_url":"https://api.github.com/repos/18F/hub/releases{/id}","created_at":"2014-12-09T16:48:37Z","updated_at":"2015-05-01T16:56:52Z","pushed_at":"2015-05-01T19:45:07Z","git_url":"git://github.com/18F/hub.git","ssh_url":"git@github.com:18F/hub.git","clone_url":"https://github.com/18F/hub.git","svn_url":"https://github.com/18F/hub","homepage":"https://18f.gsa.gov/hub/","size":13140,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":61,"forks":20,"open_issues":61,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/hub/pulls/279"},"html":{"href":"https://github.com/18F/hub/pull/279"},"issue":{"href":"https://api.github.com/repos/18F/hub/issues/279"},"comments":{"href":"https://api.github.com/repos/18F/hub/issues/279/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/hub/pulls/279/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/hub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/hub/pulls/279/commits"},"statuses":{"href":"https://api.github.com/repos/18F/hub/statuses/8c79bae90fada16c4300dbb94f6b28238bc18727"}}}}