Conversation
@@ -50,7 +52,7 @@ def make_aggregated_pages(app): | |||
# following pages prev-link to previous page (titled as "Newer") | |||
pagename = "page%d" % (i + 1) | |||
context["prev"]["title"] = UIStr.NEWER | |||
context["prev"]["link"] = "index.html" if i == 1 else "page%d.html" % i | |||
context["prev"]["link"] = "index" if i == 1 else "page%d%s" % (i, context["html_link_suffix"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't index also get an extension?
Thanks! Overall looks good though I added a couple of comments. Would be great to also add a unit test that sets the extension to something different than html and then makes sure all files generated have the expected extension. |
…_suffix and context["html_link_suffux"]
Thank you for the detailed comments! |
You can take a look at tinkertest to see how to write unit tests for Tinkerer, it's pretty easy. You run them using nose (just do |
I have tried the def setup(app):
if utils.is_module(app):
return
app.connect("build-finished", build_finished) Is there a better way run? |
Let me take a look at this when I get some time. Setup shouldn't terminate your test. |
I want to control the extension for internal links.
For example, if you hide the extension using the MultiViews feature of Apache.
This is a patch for that.
Fixes summary
app.config.html_link_suffix
from hard code '.html'(Sphinx hashtml_link_suffix
)html_link_suffix
toMetaData
classhtml_link_suffix
tometadata.link