{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common/issues/157","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common/issues/157/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common/issues/157/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-common/pull/157","id":168410497,"number":157,"title":"site: modularization support","user":{"login":"callmehiphop","id":1707267,"avatar_url":"https://avatars.githubusercontent.com/u/1707267?v=3","gravatar_id":"","url":"https://api.github.com/users/callmehiphop","html_url":"https://github.com/callmehiphop","followers_url":"https://api.github.com/users/callmehiphop/followers","following_url":"https://api.github.com/users/callmehiphop/following{/other_user}","gists_url":"https://api.github.com/users/callmehiphop/gists{/gist_id}","starred_url":"https://api.github.com/users/callmehiphop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callmehiphop/subscriptions","organizations_url":"https://api.github.com/users/callmehiphop/orgs","repos_url":"https://api.github.com/users/callmehiphop/repos","events_url":"https://api.github.com/users/callmehiphop/events{/privacy}","received_events_url":"https://api.github.com/users/callmehiphop/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common/labels/cla:%20yes","name":"cla: yes","color":"009800"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common/labels/docs","name":"docs","color":"ededed"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common/labels/site","name":"site","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":59,"created_at":"2016-07-29T20:43:10Z","updated_at":"2016-08-17T21:17:25Z","closed_at":"2016-08-11T19:02:14Z","pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common/pulls/157","html_url":"https://github.com/GoogleCloudPlatform/gcloud-common/pull/157","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-common/pull/157.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-common/pull/157.patch"},"body":"Closes #52 \r\n\r\nThis PR aims to add support for multiple modules while also upholding the old way of doing docs.\r\n\r\n## Notable Changes\r\n\r\n### manifest.json\r\n\r\nThe big change here is the addition of the `modules` key, this will be an array of modules that can be viewed. Each module should include a default service to be routed to as well as all available versions of said module.\r\n\r\nYou can specify the default module with the new `defaultModule` key.\r\n\r\n```json\r\n{\r\n  \"lang\": \"node\",\r\n  \"friendlyLang\": \"Node.js\",\r\n  \"markdown\": \"javascript\",\r\n  \"titleDelimiter\": \"::\",\r\n  \"defaultModule\": \"google-cloud\",\r\n  \"moduleName\": \"gcloud-node\",\r\n  \"content\": \"json\",\r\n  \"home\": \"home.html\",\r\n  \"package\": {\r\n    \"title\": \"npm\",\r\n    \"href\": \"https://www.npmjs.com/package/gcloud\"\r\n  },\r\n  \"modules\": [{\r\n    \"id\": \"google-cloud\",\r\n    \"name\": \"google-cloud\",\r\n    \"defaultService\": \"gcloud\",\r\n    \"versions\": [\r\n      \"v0.29.0\",\r\n      \"v0.10.0\",\r\n      \"master\"\r\n    ]\r\n  }, {\r\n    \"id\": \"bigquery\",\r\n    \"name\": \"google-cloud-bigquery\",\r\n    \"defaultService\": \"bigquery\",\r\n    \"versions\": [\r\n      \"v0.10.0\",\r\n      \"master\"\r\n    ]\r\n  }]\r\n}\r\n```\r\n\r\nYou'll also notice a `moduleName` key - this is for when `gcloud` goes away. Rather than the app trying to guess your repo name/stackoverflow tag, I thought it would be best to provide it in the manifest.json.\r\n\r\n### Folder Hierarchy \r\n\r\nTo support multiple modules a folder hierarchy change was needed, here is a rough example of how the JSON files should be laid out.\r\n\r\n```sh\r\n ├─── google-cloud\r\n |     └─── master\r\n |           ├─── index.json\r\n |           ├─── types.json\r\n |           ├─── toc.json\r\n |           └─── vision\r\n |                 └─── index.json\r\n └─── vision\r\n       ├─── master\r\n       |     ├─── index.json\r\n       |     ├─── types.json\r\n       |     └─── toc.json\r\n       └─── v0.2.0\r\n             ├─── index.json\r\n             ├─── types.json\r\n             └─── toc.json\r\n```\r\n\r\nThe obvious thing here being that since each version of each module should viewable, that means we'll need a table of contents and a list of available types per version.\r\n\r\n### URL Changes\r\n\r\nPreviously all the links in our docs resembled something like\r\n\r\n`/gcloud-{lang}/#/docs/{version}/{module}/{object}`\r\n\r\nNow it will look like\r\n\r\n`/gcloud-{lang}/#/docs/{module}/{version}/{object}`\r\n\r\n## TODO\r\n\r\n- [x] Update JSON Schema\r\n- [x] Add routing support for individual modules\r\n- [x] Documentation\r\n- [x] Linking to modules via `custom-type` directive\r\n- [x] Dropdown directive\r\n- [x] Remove `gcloud` references\r\n\r\n## Demo\r\n\r\nSource files - https://github.com/callmehiphop/gcloud-common-modular\r\n[Demo](https://callmehiphop.github.io/gcloud-common-modular/#/docs/google-cloud/v0.29.0/gcloud)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common/issues/comments/240551489","html_url":"https://github.com/GoogleCloudPlatform/gcloud-common/pull/157#issuecomment-240551489","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-common/issues/157","id":240551489,"user":{"login":"quartzmo","id":205445,"avatar_url":"https://avatars.githubusercontent.com/u/205445?v=3","gravatar_id":"","url":"https://api.github.com/users/quartzmo","html_url":"https://github.com/quartzmo","followers_url":"https://api.github.com/users/quartzmo/followers","following_url":"https://api.github.com/users/quartzmo/following{/other_user}","gists_url":"https://api.github.com/users/quartzmo/gists{/gist_id}","starred_url":"https://api.github.com/users/quartzmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quartzmo/subscriptions","organizations_url":"https://api.github.com/users/quartzmo/orgs","repos_url":"https://api.github.com/users/quartzmo/repos","events_url":"https://api.github.com/users/quartzmo/events{/privacy}","received_events_url":"https://api.github.com/users/quartzmo/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T21:17:25Z","updated_at":"2016-08-17T21:17:25Z","body":"@callmehiphop I'll try making a `gcloud` \"module\"."}}
{"actor":{"display_login":"quartzmo"}}