#36304: Classes functions (etc) should have a header in the documentation
-------------------------------------+-------------------------------------
Reporter: Sarah Boyce | Type:
| Cleanup/optimization
Status: new | Component:
| Documentation
Version: 5.2 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Currently, the docs are slightly inconsistent whether classes/functions
have their own header or not.
For example:
- https://docs.djangoproject.com/en/5.2/ref/utils/ lacks headers for many
functions e.g.
https://docs.djangoproject.com/en/5.2/ref/utils/#django.utils.cache.patch_cache_control
- https://docs.djangoproject.com/en/5.2/ref/models/fields/ has generous
headers
Following a conversation on the forum, being generous with headers is
preferable because:
- it improves the table of contents to make it easier to navigate the page
for all users
- the page is more accessible to screen reader users as they can navigate
via headers
- (minor) the djangoproject.com docs search checks the table of contents
when ranking search results (so adding headers improves the search
results)
The discussion is here: https://forum.djangoproject.com/t/set-toc-object-
entries-true-to-auto-add-functions-classes-to-the-pages-table-of-
contents/38902/7
I propose that we add that we should have a "duplicate" header above the
class/function definition to our writing documentation guide:
https://docs.djangoproject.com/en/5.2/internals/contributing/writing-
documentation/#guidelines-for-restructuredtext-files
--
Ticket URL: <https://code.djangoproject.com/ticket/36304>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019614750348-aec53071-ffe2-4dc6-9c06-7aef5f85dced-000000%40eu-central-1.amazonses.com.