diff --git a/doc-src/_layout.html b/doc-src/_layout.html
index 1ea11bf2f..ecc107363 100644
--- a/doc-src/_layout.html
+++ b/doc-src/_layout.html
@@ -19,42 +19,42 @@
- - Introduction
- - Installation
- - mitmproxy
- - mitmdump
- - FAQ
+ $!nav("intro.html", this, state)!$
+ $!nav("install.html", this, state)!$
+ $!nav("mitmproxy.html", this, state)!$
+ $!nav("mitmdump.html", this, state)!$
+ $!nav("faq.html", this, state)!$
- - Client-side replay
- - Server-side replay
- - Sticky cookies and auth
- - Reverse proxy mode
- - Upstream Certs
- - Replacements
- - Anticache
- - Filter expressions
-
-
- - Inline Scripts
- - libmproxy
+ $!nav("clientreplay.html", this, state)!$
+ $!nav("serverreplay.html", this, state)!$
+ $!nav("sticky.html", this, state)!$
+ $!nav("reverseproxy.html", this, state)!$
+ $!nav("upstreamcerts.html", this, state)!$
+ $!nav("replacements.html", this, state)!$
+ $!nav("anticache.html", this, state)!$
+ $!nav("filters.html", this, state)!$
- - Overview
- - Firefox
- - OSX
- - Windows 7
- - iPhone/iPad
- - Android
+ $!nav("ssl.html", this, state)!$
+ $!nav("certinstall/firefox.html", this, state)!$
+ $!nav("certinstall/osx.html", this, state)!$
+ $!nav("certinstall/windows7.html", this, state)!$
+ $!nav("certinstall/ios.html", this, state)!$
+ $!nav("certinstall/android.html", this, state)!$
- - Overview
- - Linux
- - OSX
+ $!nav("transparent.html", this, state)!$
+ $!nav("transparent/linux.html", this, state)!$
+ $!nav("transparent/osx.html", this, state)!$
- - Client replay: a 30 second example
- - Setting highscores on Apple's GameCenter
+ $!nav("tutorials/30second.html", this, state)!$
+ $!nav("tutorials/gamecenter.html", this, state)!$
+
+
+ $!nav("scripting/inlinescripts.html", this, state)!$
+ $!nav("scripting/libmproxy.html", this, state)!$
diff --git a/doc-src/index.py b/doc-src/index.py
index 2c4aa992e..5b6fcc5ee 100644
--- a/doc-src/index.py
+++ b/doc-src/index.py
@@ -1,6 +1,6 @@
import os, sys
import countershape
-from countershape import Page, Directory, PythonModule, markup
+from countershape import Page, Directory, PythonModule, markup, model
import countershape.template
sys.path.insert(0, "..")
from libmproxy import filt
@@ -64,6 +64,15 @@ filt_help.extend(
ns.filt_help = filt_help
+def nav(page, current, state):
+ if current.match(page, False):
+ pre = ''
+ else:
+ pre = ""
+ p = state.application.getPage(page)
+ return pre + '%s'%(model.UrlTo(page), p.title)
+ns.nav = nav
+
pages = [
Page("index.html", "docs"),
@@ -79,8 +88,8 @@ pages = [
Page("reverseproxy.html", "Reverse proxy mode"),
Page("anticache.html", "Anticache"),
Page("filters.html", "Filter expressions"),
- Page("ssl.html", "Setting up SSL interception"),
- Page("transparent.html", "Transparent Proxying"),
+ Page("ssl.html", "SSL Overview"),
+ Page("transparent.html", "Transparent Overview"),
Directory("certinstall"),
Directory("scripting"),
Directory("tutorials"),