aboutsummaryrefslogtreecommitdiffstats
path: root/doc-src/index.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc-src/index.py')
-rw-r--r--doc-src/index.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc-src/index.py b/doc-src/index.py
index 930037ec..7b65adb9 100644
--- a/doc-src/index.py
+++ b/doc-src/index.py
@@ -6,9 +6,15 @@ sys.path.insert(0, "..")
from libmproxy import filt
MITMPROXY_SRC = "~/git/public/mitmproxy"
-this.layout = countershape.Layout("_layout.html")
+
+if ns.options.website:
+ this.layout = countershape.Layout("_websitelayout.html")
+else:
+ this.layout = countershape.Layout("_layout.html")
+
+ns.title = countershape.template.Template(None, "<h1>@!this.title!@</h1>")
this.titlePrefix = "mitmproxy 0.9 - "
-this.markup = markup.Markdown()
+this.markup = markup.Markdown(extras=["footnotes"])
ns.docMaintainer = "Aldo Cortesi"
ns.docMaintainerEmail = "aldo@corte.si"
@@ -21,11 +27,12 @@ def mpath(p):
ns.index_contents = file(mpath("README.mkd")).read()
def example(s):
- d = file(mpath(s)).read()
+ d = file(mpath(s)).read().rstrip()
extemp = """<div class="example">%s<div class="example_legend">(%s)</div></div>"""
return extemp%(countershape.template.Syntax("py")(d), s)
ns.example = example
+
filt_help = []
for i in filt.filt_unary:
filt_help.append(
@@ -73,5 +80,4 @@ pages = [
Directory("tutorials"),
Page("transparent.html", "Overview"),
Directory("transparent"),
- Page("faq.html", "FAQ"),
]