blob: 3af3a0772e8a62d71ebd6abb3d0ee0eb75ad66cc [file] [log] [blame]
Skyler Kaufman991ae4d2011-04-07 12:30:41 -07001# HOW TO BUILD SOURCE.ANDROID.COM #
2
Dan Morrill00950e12011-04-12 15:54:17 -07003source.android.com contains tutorials, references, and miscellaneous
4information relating to the Android Open Source Project (AOSP). The current
5iteration of this site is fully static HTML (notably lacking in javascript and
6doxygen content), and is and/or was maintained by skyler (illustrious intern
7under Dan Morrill and assistant to the almighty JBQ).
Skyler Kaufman991ae4d2011-04-07 12:30:41 -07008
9## Short Instructions ##
10
Dan Morrill00950e12011-04-12 15:54:17 -070011Run the build script, from the same directory as this file:
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070012
Dan Morrill00950e12011-04-12 15:54:17 -070013 python scripts/build.py
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070014
Dan Morrill00950e12011-04-12 15:54:17 -070015This generates the directory ./out, which is the fully built site. Hoorah.
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070016
Dan Morrill00950e12011-04-12 15:54:17 -070017The included scripts/micro-httpd.py script is helpful for testing the site on
18your own machine. Running it will start up a tiny HTTP server that you can hit
19to test changes in a browser:
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070020
Dan Morrill00950e12011-04-12 15:54:17 -070021 cd ./out
22 HTTP_PORT=8080 python ../scripts/micro-httpd.py
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070023
Dan Morrillf781f802011-04-12 16:52:23 -070024### Markdown ###
25Markdown is a very simple markup format for plain-text that converts it to
26decent HTML. Useful docs:
27http://daringfireball.net/projects/markdown/syntax
28
29Yes, it was created by John Gruber himself. BWAHAHA!
30
31### Dependencies ###
32
33You need the Python markdown implementation. The original Perl impl probably
34will NOT work.
35
36For (Goo|U)buntu:
37% sudo apt-get install python-markdown
38
39For Mac:
40Eh, haven't tried this yet, not sure. But it should be enough to just install
41Python Markdown by hook or crook and make sure it's in your PATH.
42http://www.freewisdom.org/projects/python-markdown/
43
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070044### Contents Included in Box ###
45
46Necessary source files include:
47
Dan Morrill00950e12011-04-12 15:54:17 -070048 src/ individual page content in markdown format
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070049 templates/ templates for page content
50
51and the following content which is copied directly:
52
53 assets/ stylish things that make the page look pretty
54 images/ exactly what it sounds like
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070055
56### Structure of Site Source ###
57
Skyler Kaufman44436912011-04-07 15:11:52 -070058The build script assumes that
Dan Morrill00950e12011-04-12 15:54:17 -070059- Every .md file under src/ is an individual page in markdown format.
60- Each directory under src/ is a tab of source.android.com and contains its
61 particular sidebar. Note, the sidebar in the root of site_src/ itself is
62 present but empty.
63- Please use .md if possible (because this will pick up the global site CSS
64 and layout.) But the build.py script will indeed copy arbitrary files to the
65 output dir, so it is possible to simply place .html, .pdf, and similar files
66 to the src/ tree and they will be copied directly to ./out.
Skyler Kaufman44436912011-04-07 15:11:52 -070067
68
69# HOW TO PUSH SOURCE.ANDROID.COM TO PROD #
Dan Morrill00950e12011-04-12 15:54:17 -070070Coming soon. For now, harass morrildl, jbq, and/or btmura.
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070071
72
73# SORDID HISTORY OF SOURCE.ANDROID.COM #
74
Skyler Kaufman44436912011-04-07 15:11:52 -070075Once upon a time, source.android.com used to be a site on Sites.
Dan Morrill00950e12011-04-12 15:54:17 -070076Then it was rewritten to use the developer SDK docs, but this was hard to edit
77and overkill.
78Now it is as you see it.