Fix the front page building issue on Ubuntu 12.04

See http://daringfireball.net/projects/markdown/syntax#html

Note that Markdown formatting syntax is not processed within block-level
HTML tags. E.g., you can’t use Markdown-style *emphasis* inside an HTML block.

Python-Markdown conforms to the syntax rule above since version 2.1

This change moves the inside markdown text as the separate files.

Change-Id: I0b88d5c93836f9ee5c35cbeda87b11f2944b7662
diff --git a/scripts/build.py b/scripts/build.py
index 33a1e33..f33fe0c 100755
--- a/scripts/build.py
+++ b/scripts/build.py
@@ -102,6 +102,16 @@
   else:
     sidebar3 = parent[2]
 
+  if 'index-intro.md' in files:
+    intro = md(os.path.join(curdir, 'index-intro.md'))
+  else:
+    intro = ''
+
+  if 'index-news.md' in files:
+    news = md(os.path.join(curdir, 'index-news.md'))
+  else:
+    news = ''
+
   parents[curdir] = (sidebar, sidebar2, sidebar3)
 
   # Step D: mirror all non-*.md files, and translate (file).md files into (file).html
@@ -115,6 +125,9 @@
       final = template.safe_substitute(main=main, sidebar=sidebar, sidebar2=sidebar2, \
           sidebar3=sidebar3, category=category, title=get_title(absfilename))
 
+      if cmp(absfilename, 'src/index.md') == 0:
+        final = string.Template(final).safe_substitute(intro=intro, news=news)
+
       html = codecs.open(os.path.join(outdir, f.replace('.md', '.html')), 'w', encoding="utf8")
       html.write(final)
     else: