mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-23 15:02:55 +03:00
Canonical page for index should be '/', not '/index'
This commit is contained in:
parent
bc69a6d983
commit
6330212453
|
@ -146,6 +146,9 @@ 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
|
||||||
|
|
||||||
|
if relative_path == 'index.md':
|
||||||
|
canonical_url = base_url
|
||||||
|
else:
|
||||||
canonical_url = base_url + '/' + relative_path[:-3] + suffix
|
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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user