Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 1 | # HOW TO UPDATE SOURCE.ANDROID.COM # |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 2 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 3 | The source.android.com site contains tutorials, references, and other |
| 4 | information related to the Android Open Source Project (AOSP). The rendered |
| 5 | output of this site is static HTML, although the source contents are stored |
| 6 | in Javadoc. Conduct your edits in the Javadoc (.jd files). |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 7 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 8 | Note that the currently viewable docs at http://source.android.com/ |
| 9 | are not necessarily exactly in sync with the doc sources you can download from |
| 10 | AOSP. If you want to make a contribution to the doc sources, please check in at |
| 11 | android-contrib@ group. That way, we can make sure the affected docs are stable |
| 12 | before you upload your CL. |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 13 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 14 | ### File Location ### |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 15 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 16 | The source.android.com source files are stored in the platform/docs/source.android.com/ |
| 17 | Android project: |
| 18 | https://android.googlesource.com/platform/docs/source.android.com/ |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 19 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 20 | The files to be edited are located in: <root>/docs/source.android.com/src |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 21 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 22 | Every .jd file under src/ is an individual page in Javadoc format. This format |
| 23 | closely resembles HTML with different headers. |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 24 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 25 | Subdirectories exist for the tabs of source.android.com with their structure |
| 26 | roughly (but not identically) mirroring navigation of the site. |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 27 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 28 | In addition, each tab and subdirectory contains a *_toc.cs file (such as |
| 29 | devices_toc.cs) that defines the navigation for that section of the site. When |
| 30 | pages are added or removed, the corresponding *_toc.cs file must be updated to |
| 31 | match. |
Dan Morrill | f781f80 | 2011-04-12 16:52:23 -0700 | [diff] [blame] | 32 | |
| 33 | ### Dependencies ### |
| 34 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 35 | - Vi, Emacs or another plain-text editor |
| 36 | - Python |
| 37 | - App Engine - https://developers.google.com/appengine/ |
| 38 | - An app.yaml configuration file placed in the root of the |
| 39 | out/target/common/docs/online-sac directory with these contents: |
| 40 | ----- |
| 41 | application: NAMEOFYOURAPP |
| 42 | version: 1 |
| 43 | runtime: python |
| 44 | api_version: 1 |
Dan Morrill | f781f80 | 2011-04-12 16:52:23 -0700 | [diff] [blame] | 45 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 46 | handlers: |
| 47 | - url: / |
| 48 | static_dir: / |
| 49 | ----- |
Dan Morrill | f781f80 | 2011-04-12 16:52:23 -0700 | [diff] [blame] | 50 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 51 | ## Edit Instructions ## |
Jeff Brown | a049dde | 2011-06-29 16:51:54 -0700 | [diff] [blame] | 52 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 53 | 1. Initialize the repository and download the Android source per: |
| 54 | http://source.android.com/source/downloading.html |
Dan Morrill | f781f80 | 2011-04-12 16:52:23 -0700 | [diff] [blame] | 55 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 56 | 2. Start a temporary branch for your changes, such as: |
| 57 | http://source.android.com/source/using-repo.html#start |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 58 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 59 | 3. Edit the Javadoc file(s) and save your changes. |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 60 | |
Collin El-Hossari | ba472e9 | 2015-02-03 16:44:00 -0800 | [diff] [blame] | 61 | 4. If a page was added or removed, update the corresponding _toc.cs file to |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 62 | reflect the change. |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 63 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 64 | 5. Run the following make command from the root of the project parent directory: |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 65 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 66 | make online-sac-docs |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 67 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 68 | This generates the output in: |
| 69 | <root>/out/target/common/docs/online-sac |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 70 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 71 | 6. Start App Engine and point it at the output directory, like so: |
Skyler Kaufman | 4443691 | 2011-04-07 15:11:52 -0700 | [diff] [blame] | 72 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 73 | python /bin/google_appengine/dev_appserver.py \ |
| 74 | /master/out/target/common/docs/online-sac \ |
| 75 | --address 0.0.0.0 --port 8080 & |
Skyler Kaufman | 4443691 | 2011-04-07 15:11:52 -0700 | [diff] [blame] | 76 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 77 | 7. Review your changes at localhost:8080/index.html |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 78 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 79 | 8. Once satisfied, submit the changes as described at: |
| 80 | http://source.android.com/source/submit-patches.html |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 81 | |
Clay Murphy | b339f4f | 2013-11-12 15:22:14 -0800 | [diff] [blame] | 82 | Your change will be routed to the source.android.com team for inclusion. |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 83 | |