Commit 63302124 by Tom Christie

Canonical page for index should be '/', not '/index'

parent bc69a6d9
...@@ -146,7 +146,10 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir): ...@@ -146,7 +146,10 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir):
else: else:
main_title = 'Django REST framework - ' + main_title 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) prev_url = prev_url_map.get(relative_path)
next_url = next_url_map.get(relative_path) next_url = next_url_map.get(relative_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment