              toc += template + '\n'
  
          content = markdown.markdown(text, ['headerid'])
  
          relative_dir = dirpath.replace(docs_dir, '').lstrip(os.path.sep)
          build_dir = os.path.join(html_dir, relative_dir)
          build_file = os.path.join(build_dir, filename[:-3] + '.html')
  
          if not os.path.exists(build_dir):
              os.makedirs(build_dir)
          output = page.replace('{{ content }}', content).replace('{{ toc }}', toc).replace('{{ base_url }}', base_url).replace('{{ suffix }}', suffix).replace('{{ index }}', index)
          output = output.replace('{{ page_id }}', filename[:-3])
          output = re.sub(r'a href="([^"]*)\.md"', r'a href="\1%s"' % suffix, output)
          output = re.sub(r'<pre><code>:::bash', r'<pre class="prettyprint lang-bsh">', output)
          output = re.sub(r'<pre>', r'<pre class="prettyprint lang-py">', output)
 
</s> remove         open(build_file, 'w').write(output.encode('utf-8'))
 </s> add         open(output_path, 'w').write(output.encode('utf-8')) </s> remove         text = open(os.path.join(dirpath, filename), 'r').read().decode('utf-8')
 </s> add         text = open(path, 'r').read().decode('utf-8') </s> remove         if not filename.endswith('.md'):
 </s> add         path = os.path.join(dirpath, filename)

        if filename.endswith('.png'):
            output_path = os.path.join(build_dir, filename)
            shutil.copy(path, output_path)
            continue
        elif not filename.endswith('.md'):
              toc += template + '\n'
  
          content = markdown.markdown(text, ['headerid'])
  






          output = page.replace('{{ content }}', content).replace('{{ toc }}', toc).replace('{{ base_url }}', base_url).replace('{{ suffix }}', suffix).replace('{{ index }}', index)
          output = output.replace('{{ page_id }}', filename[:-3])
          output = re.sub(r'a href="([^"]*)\.md"', r'a href="\1%s"' % suffix, output)
          output = re.sub(r'<pre><code>:::bash', r'<pre class="prettyprint lang-bsh">', output)
          output = re.sub(r'<pre>', r'<pre class="prettyprint lang-py">', output)
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Flesh out quickstart guide and make some style tweaks 
mkdocs.py