| Age | Commit message (Collapse) | Author |
|
This change implements DEP 16: to rename the django-admin command to django.
django-admin is kept as an alias.
Docs references to the "django-admin" command are updated to "django" or
“The django command”.
Renamed the `django-admin` Sphinx directive to `cmd`, and the
`django-admin-option` directive to `cli-option`.
Thanks Johannes Maron, Mike Edmunds, and Jacob Walls for reviews.
|
|
Improved accessibility for docs console tabs within constraints of the
current CSS-only, hidden radio button implementation.
* Switched to flex layout. (Previous `text-align: right` could cause
problems in rtl scripts.)
* Changed radio buttons from `display: none` to visually hidden. This
allows them to participate in keyboard navigation (with or without
a screen reader).
* Rendered a focus outline on the visible label when the hidden radio
button has focus.
* Increased border widths on the active tab to allow distinguishing it
with high contrast settings (forced-colors: active).
* Increased contrast on inactive tab label and active tab border.
* Created `--tab-*` CSS properties in `.console-block` to allow adapting
to other themes or contexts (e.g., on docs.djangoproject.com).
Screen readers will announce console tabs as radio buttons. (JavaScript
would be needed to properly implement the WAI-ARIA tab pattern with the
expected behavior for tab-group, tab, and tab-panel ARIA roles.)
Thanks to Natalia Bidart (nessita), Tom Carrick, and Akintola Rahmat for
their reviews and suggestions.
|
|
Removed a builder-specific optimization from ConsoleDirective. This
fixes a bug where building with shared doctrees (as docs/Makefile does)
could result in different output depending on the order of builds. The
optimization did not noticeably impact Sphinx build time.
This also resolves a RemovedInSphinx11Warning in ConsoleDirective.run()
that "'sphinx.environment.BuildEnvironment.app' is deprecated."
Thanks to @nessita for review (and for identifying this as a bug, not
just a Sphinx deprecation).
|
|
`simple_option_desc_re` was added in 4239bb0 for use by
parse_django_adminopt_node(). That function was removed in e519aab,
which reworked `django-admin-option` using Sphinx's standard Cmdoption.
|
|
* Removed unnecessary `table` and `parameterlist` customizations from
the djangodocs Sphinx extension's `DjangoHTMLTranslator`. These were
meant to avoid obsolete html from Docutils' html4 writer (`border=1`
in `<table>` tags and and `<big>` around parameter list parens).
Sphinx 2.0 switched to the html5 writer, which doesn't emit that html.
These overrides are no longer necessary, rely on Sphinx internals that
often break in new versions, and interfere with third-party themes.
* Moved the console-tabs.css stylesheet to docs/_static and removed
logic for conditionally including it only in pages with console tabs.
That depended on custom handling in the djangodocs theme layout.html
template, which isn't portable to other themes.
* Switched console tabs from Font Awesome brand icons to text and
removed the vendored fa-brands fonts (to avoid moving them from the
djangodocs theme to the docs/_static dir).
* Ensured both console tabs include a wrapper div around literal code
blocks: `<div class="highlight-{lexer} notranslate">` (where lexer is
`console` for Unix and `doscon` for Windows). This wrapper had been
missing for the Windows content, which could cause shifting layouts
when changing tabs with third-party Sphinx themes (and may have
interfered with browser translation tools).
Fixed by rendering the Windows tab with a temporary literal block,
matching how the Unix tab is rendered. Removed direct call to the
Pygments highlighter.
The Windows tab is no longer force-highlighted, so a doscon lexing
failure now reports a warning rather than being silently ignored.
* Removed custom `VersionDirective` and HTML writer overrides for
`visit_versionmodified()` and `depart_versionmodified()`. Sphinx's
standard changeset directives are now used. (Refs #20104.)
The original code was meant to substitute "development version" for
conf.py `django_next_version` and to refer to "Django N.M" rather than
the generic "version N.M" in changeset messages. But it missed the
`deprecated` directive and aliases like `version-modified` added in
Sphinx 9.0, didn't apply to non-HTML output formats, and generated
inconsistent HTML that wasn't compatible with standard Sphinx themes.
Related cleanup:
* Updated documentation on using versionadded and versionchanged
directives to accurately reflect Sphinx's rendered text, and removed
the policy bullet describing the old Django-specific phrasing.
* Enabled biome for all css and js files in docs (except in
docs/_build).
* Consistently excluded all non-docs source dirs and requirements.txt
from searches for *.txt source files in conf.py exclude_patterns,
make.bat, Makefile, and lint.py.
Refs #35874, #37138, #20104.
|
|
Co-authored-by: Tim Schilling <schillingt@better-simple.com>
|
|
The console directive renders its Unix/Windows tabs with browser-only
markup: hidden radio inputs toggled via CSS. The epub builder shares the
HTML format, so it copied that markup into the ebook, where the tabs
cannot work (e-readers do not support the driving CSS) and the raw HTML
is not well-formed XHTML, so strict readers fail to parse the page.
Skipped the tab markup for the epub builder and fell back to a plain
literal block, matching what the non-HTML builders already do.
|
|
extension.
|
|
Changed djangodocs extension to register DjangoHTMLTranslator for any
html-format builder (in the builder-inited hook), rather than a limited
list of builders at startup. That fixes missing content in dirhtml and
standard html builds (including ReadTheDocs PR previews):
- Missing console tabs
- Empty divs for versionadded and versionchanged directives
Removed JS code that depended on jQuery, which hasn't worked since
Sphinx 6.0 dropped jQuery in 2023:
- Unnecessary console tabs click handling. (Console tab behavior is
implemented purely in CSS.)
- Client-side hyperlinking of Django template tags and filters in code
examples. (This is also not supported on docs.djangoproject.com.)
Removed custom DjangoStandaloneHTMLBuilder and "djangohtml" builder
type. Its sole purpose was to generate the "templatebuiltins.js" file
used for the (non-functional) client-side template filter/tag linking.
Changed docs "make html" target from "djangohtml" to standard "html".
|
|
https://github.com/psf/black/releases/tag/26.1.0
|
|
|
|
The docs build process was failing on djangoproject.com since it uses Python 3.8 and the dict union operator was added in Python 3.9.
|
|
linkcode ext.
Co-authored-by: David Smith <smithdc@gmail.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
https://github.com/psf/black/releases/tag/24.1.0
|
|
|
|
Unnecessary since ebf25555bbed3e9112d4b726575d60b242daf48a.
|
|
|
|
|
|
See https://github.com/sphinx-doc/sphinx/commit/dd2ff3e911c751c06c81f494128fba56d8ecbafd.
|
|
|
|
This prevents raising errors for translated docs, see
https://github.com/django/djangoproject.com/issues/997
Follow up to 1cdfe8d91215eefaa18c398069dd9c6879a9511d.
|
|
|
|
|
|
|
|
|
|
1.8+.
|
|
Regression in d2afa5eb2308e672b6313876856e32e2561b90f3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixed a regression in bacdfbf3d1eb23ff8e8110681728a5b467443446.
|
|
|
|
|
|
|
|
|
|
Also documented missing short command line options to fix #24134. This bumps
the minimum sphinx version required to build the docs to 1.3.4.
Thanks Simon Charette for review.
|
|
|
|
|
|
|