From 92a4a5d42346c9c89f38683cf2d6cbeb976ee9ab Mon Sep 17 00:00:00 2001 From: Ryan P Kilby Date: Thu, 20 Feb 2020 02:23:06 -0800 Subject: [PATCH] Fix docs 404 (#7197) * Use 'site_url' instead of hardcoding DRF homepage * Use 'url' template filter instead of 'base_url' This fixes static file loading for the 404 page. * Only insert funding
if toc is present * Link quickstart to valid API guide page * Fix 404 search modal link * Use 'base_url' instead of 'site_url' on 404 page --- docs/tutorial/quickstart.md | 6 +++--- docs_theme/404.html | 2 +- docs_theme/main.html | 20 ++++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/tutorial/quickstart.md b/docs/tutorial/quickstart.md index 505f7f91d..546144670 100644 --- a/docs/tutorial/quickstart.md +++ b/docs/tutorial/quickstart.md @@ -137,12 +137,12 @@ Finally, we're including default login and logout views for use with the browsab ## Pagination Pagination allows you to control how many objects per page are returned. To enable it add the following lines to `tutorial/settings.py` - + REST_FRAMEWORK = { 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'PAGE_SIZE': 10 } - + ## Settings Add `'rest_framework'` to `INSTALLED_APPS`. The settings module will be in `tutorial/settings.py` @@ -224,5 +224,5 @@ If you want to get a more in depth understanding of how REST framework fits toge [image]: ../img/quickstart.png [tutorial]: 1-serialization.md -[guide]: ../#api-guide +[guide]: ../api-guide/requests.md [httpie]: https://github.com/jakubroztocil/httpie#installation diff --git a/docs_theme/404.html b/docs_theme/404.html index a89c0a418..bbb6b70ff 100644 --- a/docs_theme/404.html +++ b/docs_theme/404.html @@ -4,6 +4,6 @@

404

Page not found

-

Try the homepage, or search the documentation.

+

Try the homepage, or search the documentation.

{% endblock %} diff --git a/docs_theme/main.html b/docs_theme/main.html index 21e9171a2..c2a29e1ae 100644 --- a/docs_theme/main.html +++ b/docs_theme/main.html @@ -5,17 +5,17 @@ {% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name }} - + - - - - + + + + - - - - + + + + {% for path in config.extra_javascript %}