Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 1 | # HOW TO BUILD SOURCE.ANDROID.COM # |
| 2 | |
Dan Morrill | 00950e1 | 2011-04-12 15:54:17 -0700 | [diff] [blame^] | 3 | source.android.com contains tutorials, references, and miscellaneous |
| 4 | information relating to the Android Open Source Project (AOSP). The current |
| 5 | iteration of this site is fully static HTML (notably lacking in javascript and |
| 6 | doxygen content), and is and/or was maintained by skyler (illustrious intern |
| 7 | under Dan Morrill and assistant to the almighty JBQ). |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 8 | |
| 9 | ## Short Instructions ## |
| 10 | |
Dan Morrill | 00950e1 | 2011-04-12 15:54:17 -0700 | [diff] [blame^] | 11 | Run the build script, from the same directory as this file: |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 12 | |
Dan Morrill | 00950e1 | 2011-04-12 15:54:17 -0700 | [diff] [blame^] | 13 | python scripts/build.py |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 14 | |
Dan Morrill | 00950e1 | 2011-04-12 15:54:17 -0700 | [diff] [blame^] | 15 | This generates the directory ./out, which is the fully built site. Hoorah. |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 16 | |
Dan Morrill | 00950e1 | 2011-04-12 15:54:17 -0700 | [diff] [blame^] | 17 | The included scripts/micro-httpd.py script is helpful for testing the site on |
| 18 | your own machine. Running it will start up a tiny HTTP server that you can hit |
| 19 | to test changes in a browser: |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 20 | |
Dan Morrill | 00950e1 | 2011-04-12 15:54:17 -0700 | [diff] [blame^] | 21 | cd ./out |
| 22 | HTTP_PORT=8080 python ../scripts/micro-httpd.py |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 23 | |
| 24 | ### Contents Included in Box ### |
| 25 | |
| 26 | Necessary source files include: |
| 27 | |
Dan Morrill | 00950e1 | 2011-04-12 15:54:17 -0700 | [diff] [blame^] | 28 | src/ individual page content in markdown format |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 29 | templates/ templates for page content |
| 30 | |
| 31 | and the following content which is copied directly: |
| 32 | |
| 33 | assets/ stylish things that make the page look pretty |
| 34 | images/ exactly what it sounds like |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 35 | |
| 36 | ### Structure of Site Source ### |
| 37 | |
Skyler Kaufman | 4443691 | 2011-04-07 15:11:52 -0700 | [diff] [blame] | 38 | The build script assumes that |
Dan Morrill | 00950e1 | 2011-04-12 15:54:17 -0700 | [diff] [blame^] | 39 | - Every .md file under src/ is an individual page in markdown format. |
| 40 | - Each directory under src/ is a tab of source.android.com and contains its |
| 41 | particular sidebar. Note, the sidebar in the root of site_src/ itself is |
| 42 | present but empty. |
| 43 | - Please use .md if possible (because this will pick up the global site CSS |
| 44 | and layout.) But the build.py script will indeed copy arbitrary files to the |
| 45 | output dir, so it is possible to simply place .html, .pdf, and similar files |
| 46 | to the src/ tree and they will be copied directly to ./out. |
Skyler Kaufman | 4443691 | 2011-04-07 15:11:52 -0700 | [diff] [blame] | 47 | |
| 48 | |
| 49 | # HOW TO PUSH SOURCE.ANDROID.COM TO PROD # |
Dan Morrill | 00950e1 | 2011-04-12 15:54:17 -0700 | [diff] [blame^] | 50 | Coming soon. For now, harass morrildl, jbq, and/or btmura. |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 51 | |
| 52 | |
| 53 | # SORDID HISTORY OF SOURCE.ANDROID.COM # |
| 54 | |
Skyler Kaufman | 4443691 | 2011-04-07 15:11:52 -0700 | [diff] [blame] | 55 | Once upon a time, source.android.com used to be a site on Sites. |
Dan Morrill | 00950e1 | 2011-04-12 15:54:17 -0700 | [diff] [blame^] | 56 | Then it was rewritten to use the developer SDK docs, but this was hard to edit |
| 57 | and overkill. |
| 58 | Now it is as you see it. |