aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2013-11-19 10:27:04 +0000
committerTom Christie2013-11-19 10:27:04 +0000
commit6330212453bcddab9ecc8dcf0c368c3e8af8876d (patch)
tree3510c0da9cd516e98e1cdda172cf6fa5db047aa8
parentbc69a6d983072ecbcf0c7a79b0b954f0c92892a4 (diff)
downloaddjango-rest-framework-6330212453bcddab9ecc8dcf0c368c3e8af8876d.tar.bz2
Canonical page for index should be '/', not '/index'
-rwxr-xr-xmkdocs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mkdocs.py b/mkdocs.py
index 380a91e7..d1790168 100755
--- a/mkdocs.py
+++ b/mkdocs.py
@@ -146,7 +146,10 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir):
else:
main_title = 'Django REST framework - ' + main_title
- canonical_url = base_url + '/' + relative_path[:-3] + suffix
+ if relative_path == 'index.md':
+ canonical_url = base_url
+ else:
+ canonical_url = base_url + '/' + relative_path[:-3] + suffix
prev_url = prev_url_map.get(relative_path)
next_url = next_url_map.get(relative_path)