1 # HOW TO BUILD SOURCE.ANDROID.COM # 2 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). 8 9 ## Short Instructions ## 10 11 Run the build script, from the same directory as this file: 12 13 python scripts/build.py 14 15 This generates the directory ./out, which is the fully built site. Hoorah. 16 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: 20 21 cd ./out 22 HTTP_PORT=8080 python ../scripts/micro-httpd.py 23 24 ### Markdown ### 25 Markdown is a very simple markup format for plain-text that converts it to 26 decent HTML. Useful docs: 27 http://daringfireball.net/projects/markdown/syntax 28 29 Yes, it was created by John Gruber himself. BWAHAHA! 30 31 ### Dependencies ### 32 33 You need the Python markdown implementation. The original Perl impl probably 34 will NOT work. 35 36 For (Goo|U)buntu: 37 % sudo apt-get install python-markdown 38 39 For Mac: 40 $ sudo easy_install ElementTree 41 $ sudo easy_install Markdown 42 43 More information here: 44 http://www.freewisdom.org/projects/python-markdown/Installation 45 46 ### Contents Included in Box ### 47 48 Necessary source files include: 49 50 src/ individual page content in markdown format 51 templates/ templates for page content 52 53 and the following content which is copied directly: 54 55 assets/ stylish things that make the page look pretty 56 images/ exactly what it sounds like 57 58 ### Structure of Site Source ### 59 60 The build script assumes that 61 - Every .md file under src/ is an individual page in markdown format. 62 - Each directory under src/ is a tab of source.android.com and contains its 63 particular sidebar. Note, the sidebar in the root of site_src/ itself is 64 present but empty. 65 - Please use .md if possible (because this will pick up the global site CSS 66 and layout.) But the build.py script will indeed copy arbitrary files to the 67 output dir, so it is possible to simply place .html, .pdf, and similar files 68 to the src/ tree and they will be copied directly to ./out. 69 70 71 # HOW TO PUSH SOURCE.ANDROID.COM TO PROD # 72 Coming soon. For now, harass morrildl, jbq, and/or btmura. 73 74 75 # SORDID HISTORY OF SOURCE.ANDROID.COM # 76 77 Once upon a time, source.android.com used to be a site on Sites. 78 Then it was rewritten to use the developer SDK docs, but this was hard to edit 79 and overkill. 80 Now it is as you see it. 81