1. Oliver Tonnhofer
  2. poole

Commits

Oliver Tonnhofer  committed 09deb6d

new --relative-urls build option

  • Participants
  • Parent commits a3923d9
  • Branches default

Comments (0)

Files changed (1)

File poole.py

View file
         # un-escape escaped python code blocks
         out = regx_escp.sub(repl_escp, out)
 
-        # make relative links absolute
-        out = regx_rurl.sub(repl_rurl, out)
+        if not opts.relative_urls:
+            # make relative links absolute
+            out = regx_rurl.sub(repl_rurl, out)
 
         # write HTML page
         fname = page.fname.replace(dir_in, dir_out)
                   help="encoding of file names (default: utf-8)")
     og.add_option("", "--live", action="store_true", default=False,
                   help="rebuild if anything changed")
+    og.add_option("", "--relative-urls", action="store_true", default=False,
+                  help="do not create absolute URLs")
     op.add_option_group(og)
 
     og = optparse.OptionGroup(op, "Serve options")