OLD | NEW |
1 This directory contains the chromium extensions documentation, and the mechanism | 1 This directory contains the chromium extensions documentation, and the mechanism |
2 by which they are generated. | 2 by which they are generated. |
3 | 3 |
4 -------------------------------------------------------------------------------- | 4 -------------------------------------------------------------------------------- |
5 Contributing To The Extension Docs: | 5 Contributing To The Extension Docs: |
6 | 6 |
7 [When making changes, open the relevant /<page>.html in chrome via the file: | 7 [When making changes, open the relevant /<page>.html in chrome via the file: |
8 scheme. If you do, you can refresh to instantly see any changes you make]. | 8 scheme. If you do, you can refresh to instantly see any changes you make]. |
9 | 9 |
10 *I want to document methods, events or parameters in the api itself: | 10 *I want to document methods, events or parameters in the api itself: |
11 =>Edit the JSON file for the api in ../api/. Usually you can just add or edit | 11 =>Edit the JSON file for the api in ../api/. Usually you can just add or edit |
12 the "description" property. This will appear automatically in the corresponding | 12 the "description" property. This will appear automatically in the corresponding |
13 doc page at ./<page>.html (where <page> is the name of the apimodule ("tabs", | 13 doc page at ./<page>.html (where <page> is the name of the apimodule ("tabs", |
14 etc..) that contains the change you are making. | 14 etc..) that contains the change you are making. |
15 | 15 |
16 *I want to edit static content for an API reference module: | 16 *I want to edit static content for an API reference module: |
17 =>Look in /static/<page>.html (for your module). If the file exists, edit it, | 17 =>Look in /static/<page>.html (for your module). If the file exists, edit it, |
18 check you changes by viewing /<page>.html. If the file doesn't exist, add it, | 18 check you changes by viewing /<page>.html. If the file doesn't exist, add it, |
19 and make a copy of /template/page_shell.html and copy it to /<page>.html. | 19 and make a copy of /template/page_shell.html and copy it to /<page>.html. |
20 | 20 |
21 *I want to edit or add a purely static page: | 21 *I want to edit or add a purely static page: |
22 =>Follow the same steps for editing static content for an API page. | 22 =>Follow the same steps for editing static content for an API page. |
23 | 23 |
24 IN ALL CASES. When you have finished, run build/build.bat (on windows) or | 24 IN ALL CASES. When you have finished, run ./build/build.bat (on windows) or |
25 build/build.py (on mac/linux). This may generate new files or changes to the | 25 ./build/build.py (on mac/linux). This may generate new files or changes to the |
26 /*.html pages. Include any new or changed files in the changelist you create. | 26 /*.html pages. Include any new or changed files in the changelist you create. |
27 | 27 |
| 28 When submitting changes for review, please host the contents of your version |
| 29 of chrome/common/extensions/docs on a web server accessible to your reviewer. |
| 30 |
28 -------------------------------------------------------------------------------- | 31 -------------------------------------------------------------------------------- |
29 Building | 32 Building |
30 | 33 |
31 Changes to the extension docs must be checked into source control. Any changes | 34 Changes to the extension docs must be checked into source control. Any changes |
32 to any input sources require the docs to be regenerated. | 35 to any input sources require the docs to be regenerated. |
33 | 36 |
34 To build the extension docs, run the build.py script in the ./build directory. | 37 To build the extension docs, run the build.py script in the ./build directory. |
35 This will regenerate the docs and report which, if any, files have changed | 38 This will regenerate the docs and report which, if any, files have changed |
36 and need to be included in the changelist that changed the dependent files. | 39 and need to be included in the changelist that changed the dependent files. |
37 | 40 |
(...skipping 26 matching lines...) Expand all Loading... |
64 For each given <page>: | 67 For each given <page>: |
65 1) A copy of ./page_shell.html is copied to ./<page>.html. | 68 1) A copy of ./page_shell.html is copied to ./<page>.html. |
66 2) This page loads bootstrap.js which inspects the <page> name | 69 2) This page loads bootstrap.js which inspects the <page> name |
67 3) ./template/api_template.html is loaded and inserted into the body of the page | 70 3) ./template/api_template.html is loaded and inserted into the body of the page |
68 4) If a ./static/<page>.html exists, its content is inserted into the main | 71 4) If a ./static/<page>.html exists, its content is inserted into the main |
69 content column of the api_template.html | 72 content column of the api_template.html |
70 5) If the <page> matches an api "module" in ../api/, the api is then | 73 5) If the <page> matches an api "module" in ../api/, the api is then |
71 fed through the api template within api_template.html | 74 fed through the api template within api_template.html |
72 6) The result is written on top of the existing /<page>.html. If the new file | 75 6) The result is written on top of the existing /<page>.html. If the new file |
73 differs in content, it is reported as changed by the build.py script. | 76 differs in content, it is reported as changed by the build.py script. |
OLD | NEW |