OLD | NEW |
1 Overview | 1 Overview |
2 | 2 |
3 This is a Google App Engine server which serves the documentation for Chrome | 3 This is a Google App Engine server which serves the documentation for Chrome |
4 apps and extensions. At time of this writing, the primary URL is: | 4 apps and extensions. At time of this writing, the primary URL is: |
5 http://developer.chrome.com/. | 5 http://developer.chrome.com/. |
6 | 6 |
7 Documentation for Chrome apps and extensions is partly generated from API | 7 Documentation for Chrome apps and extensions is partly generated from API |
8 definitions (for the reference material), and partly hand-written. | 8 definitions (for the reference material), and partly hand-written. |
9 | 9 |
10 All documentation sources are checked into source control, just like any other | 10 All documentation sources are checked into source control, just like any other |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 * Users can always find the current doc for any Chrome release channel (i.e., | 29 * Users can always find the current doc for any Chrome release channel (i.e., |
30 /trunk/extensions/, /beta/apps/, etc.). These URLs are updated automatically | 30 /trunk/extensions/, /beta/apps/, etc.). These URLs are updated automatically |
31 with Chrome's release process. | 31 with Chrome's release process. |
32 | 32 |
33 | 33 |
34 Editing Docs | 34 Editing Docs |
35 | 35 |
36 1. Edit files. | 36 1. Edit files. |
37 | 37 |
38 - They will mostly be in chrome/common/extensions/api/ or | 38 - If you are not updating the static HTML for a docs page, you will most |
39 chrome/common/extensions/docs/server2/templates/. | 39 likely not have to do anything. The docs server will automatically pick |
| 40 up changes to the JSON or IDL schemas. |
| 41 |
| 42 - Otherwise, they will be in |
| 43 chrome/common/extensions/docs/server2/templates/. See the |
| 44 "Overview of ./tempaltes Directory" section for more information. |
40 | 45 |
41 - Files in templates directory use the Handlebar template language. It is | 46 - Files in templates directory use the Handlebar template language. It is |
42 extremely simple. See third_party/handlebar/README.md. | 47 extremely simple, essentially: write HTML. |
| 48 See third_party/handlebar/README.md. |
43 | 49 |
44 2. Run './preview.py' | 50 2. Run './preview.py' |
45 | 51 |
46 3. Check your work at http://localhost:8000/(apps|extensions)/<doc_name> | 52 3. Check your work at http://localhost:8000/(apps|extensions)/<doc_name> |
47 | 53 |
48 4. Send a CL and commit files as with any other Chrome change. The live | 54 4. Send a CL and commit files as with any other Chrome change. The live |
49 server will update within 5-10 minutes. | 55 server will update within 5-10 minutes. |
50 | 56 |
51 | 57 |
| 58 Overview of ./templates Directory |
| 59 |
| 60 The ./templates directory has four subdirectories. |
| 61 |
| 62 - intros -> The static content that appears before the API reference on API |
| 63 pages. |
| 64 |
| 65 - articles -> The static content that appears on non-API pages. |
| 66 |
| 67 - public -> The top level templates for all pages. |
| 68 |
| 69 - private -> Helper templates used in rendering the docs. |
| 70 |
| 71 |
52 Developing the Server | 72 Developing the Server |
53 | 73 |
54 You shouldn't need app engine locally to develop the server, preview.py should | 74 You shouldn't need app engine locally to develop the server, preview.py should |
55 be sufficient. If for some reason you want to test against the app engine SDK: | 75 be sufficient. If for some reason you want to test against the app engine SDK: |
56 | 76 |
57 1. Download the python Google App Engine SDK from: | 77 1. Download the python Google App Engine SDK from: |
58 https://developers.google.com/appengine/downloads | 78 https://developers.google.com/appengine/downloads |
59 | 79 |
60 2. Run './start_dev_server.py <path/to/dev_appserver.py>' | 80 2. Run './start_dev_server.py <path/to/dev_appserver.py>' |
61 (dev_appserver.py is part of the App Engine) | 81 (dev_appserver.py is part of the App Engine) |
(...skipping 20 matching lines...) Expand all Loading... |
82 | 102 |
83 4. When prompted for your credentials, enter the information for the account | 103 4. When prompted for your credentials, enter the information for the account |
84 that has access to the production app. | 104 that has access to the production app. |
85 | 105 |
86 5. Go to http://www.appspot.com, select the docs project, click "versions" in | 106 5. Go to http://www.appspot.com, select the docs project, click "versions" in |
87 the sidebar, and make the version you just deployed the "default" version. | 107 the sidebar, and make the version you just deployed the "default" version. |
88 | 108 |
89 If you get an error about too many versions when deploying, go into this | 109 If you get an error about too many versions when deploying, go into this |
90 view and delete the version which was deployed the longest time ago. Then | 110 view and delete the version which was deployed the longest time ago. Then |
91 try to deploy again. | 111 try to deploy again. |
OLD | NEW |