]> git.donarmstrong.com Git - lilypond.git/commitdiff
Docs: Fix links from topdocs to doc index
authorReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 6 Oct 2008 22:14:15 +0000 (00:14 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 6 Oct 2008 22:14:15 +0000 (00:14 +0200)
buildscripts/postprocess_html.py

index 8a569240fe37bc9345614c98cbc5404dd1a6f8f9..073e5c3ad2eed4603ba0d99aec01d42c3e20d628 100644 (file)
@@ -115,12 +115,16 @@ def hack_urls (s, prefix):
         s = snippets_ref_re.sub ('href="source/input/lsr/lilypond-snippets', s)
     elif 'input/lsr' in prefix:
         s = user_ref_re.sub ('href="source/Documentation/user/lilypond\\1', s)
-    elif 'input/regression' in prefix:
+    elif 'input/regression' in prefix or 'Documentation/topdocs' in prefix:
         # fix the link from the regtest pages to the doc index (rewrite the prefix
         # name to obtain the relative path of the doc index page)
         rel_link = re.sub (r'out-www/.*$', '', prefix)
         rel_link = re.sub (r'[^/]*/', '../', rel_link)
-        s = docindex_link_re.sub ('href="' + rel_link + 'Documentation/devel.html\"', s)
+        if 'Documentation/topdocs' in prefix:
+            targetfile = "index"
+        else:
+            targetfile = "Documentation/devel"
+        s = docindex_link_re.sub ('href="' + rel_link + targetfile + '.html\"', s)
 
     source_path = os.path.join (os.path.dirname (prefix), 'source')
     if not os.path.islink (source_path):