diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2013-01-01 15:30:02 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2013-01-01 15:30:02 +1300 |
commit | 6f1fa30bc6bc0081917dbabe7da34c2a7ee9ea61 (patch) | |
tree | 1a14757b85c7ab3444591dce80476265bffe2e8d /doc-src/index.py | |
parent | 8b666819296e1109a3a9d92175ef507b46700e85 (diff) | |
download | mitmproxy-6f1fa30bc6bc0081917dbabe7da34c2a7ee9ea61.tar.gz mitmproxy-6f1fa30bc6bc0081917dbabe7da34c2a7ee9ea61.tar.bz2 mitmproxy-6f1fa30bc6bc0081917dbabe7da34c2a7ee9ea61.zip |
Docs: make nav sidebar work
Diffstat (limited to 'doc-src/index.py')
-rw-r--r-- | doc-src/index.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/doc-src/index.py b/doc-src/index.py index 2c4aa992..5b6fcc5e 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 = '<li class="active">' + else: + pre = "<li>" + p = state.application.getPage(page) + return pre + '<a href="%s">%s</a></li>'%(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"), |