summaryrefslogtreecommitdiff
path: root/docs/Makefile
AgeCommit message (Collapse)Author
2026-10-29Ensured docs checks cover same files as docs builds.Mike Edmunds
Updated docs `make black` and `make lint` checks to use Sphinx's own source file discovery to get the list of docs source files. This makes docs/conf.py the single source of truth for which files are/aren't docs sources. The exclusions were previously duplicated by hand in Makefile, make.bat, and lint.py, where they could drift from conf.py. Created a Python blacken-sources.py wrapper around blacken-docs, similar to the existing lint.py for sphinx-lint. This replaces shell and batch file commands that tried (only partially successfully) to replicate Sphinx's source discovery. Removed `--jobs 0` from the sphinx-lint arguments to allow parallel linting, since sphinx-lint treats `--jobs 0` as serial instead of defaulting to `auto`. Also added Sphinx to the tox environments running the docs checks, since neither `blacken-docs` nor `sphinx-lint` depends on Sphinx. Thanks to Natalia Bidart for review and improvements.
2026-10-27Refs #35874 -- Added EPUBCheck to the documentation build.Mike Edmunds
Created an "epubcheck" target in the docs makefiles and docs workflow. Because EPUBCheck requires a Java runtime, did not include it in the general "make check" target.
2026-10-01Fixed #37212 -- Improved djangodocs Sphinx extension portability.Mike Edmunds
* 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.
2026-06-09Fixed #37150 -- Made djangodocs Sphinx extension work with any html builder.Mike Edmunds
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".
2026-03-02Aligned docs checks between GitHub Actions and local development.Natalia
2025-08-25Fixed #36485 -- Added lint-docs check in Tox and GitHub Actions.David Smith
The `check` docs target now runs spelling, black, and lint, so all current documentation quality checks can be run with a single command. Also documented the lint-docs check's availability and usage.
2025-08-25Refs #36485 -- Added sphinx-lint support and make lint rule for docs.David Smith
This adds a `lint.py` script to run sphinx-lint on Django's docs files, a mathing `lint` target in the `docs/Makefile` and `docs/make.bat`, and updates `docs/requirements.txt` accordingly.
2025-08-05Refs #36485 -- Grouped docs checks under a unified make check target.David Smith
Added a new 'check' rule to the docs Makefile which runs both the black and spelling checks.
2025-02-01Fixed #36162 -- Fixed the `black` Makefile docs rule to work on macOS.Mike Edmunds
The `make black` target in the docs directory used Linux-specific syntax for its `find` command. Changed to syntax that also works on macOS and other BSD Unix variants.
2024-11-27Added parallelism support via --jobs to docs build Makefile rule.Paolo Melchiorre
2024-10-24Used webbroswer module in docs Makefile.Paolo Melchiorre
2023-03-01Refs #34140 -- Added configurations to run blacken-docs linter and adjusted ↵Mariusz Felisiak
docs. This adds: - GitHub actions, - tox configuration, - pre-commit hook, and - makefile rules to run blacken-docs linter. Co-authored-by: David Smith <smithdc@gmail.com>
2022-06-01Fixed #33753 -- Fixed docs build on Sphinx 5+.Mariusz Felisiak
Empty language is not supported anymore.
2017-05-24Fixed docs build with Sphinx 1.6.Dmitry Shachnev
2014-12-08Added an "htmlview" target to open docs after building them.Berker Peksag
This is helpful if you build and test documentation updates in your development env. Copied from CPython's Doc/Makefile.
2014-03-07Fixed #22141 -- Added a spelling checker for documentation.Szczepan Cieślik
2013-07-29Allowed overriding variables in docs/Makefile.minusf
2013-06-08Allow build of translated documentationClaude Paroz
2013-01-02Fixed #19516 - Fixed remaining broken links.Tim Graham
Added -n to sphinx builds to catch issues going forward.
2012-11-09Fixed #19266 -- Added Texinfo documentation targetClaude Paroz
Thanks orontee for the report and initial patch.
2012-04-07Added gettext target to sphinx makefiles.Claude Paroz
This have been copied from sphinx-quickstart result in latest sphinx versions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-24Fixed #13616 - Updated the documentation to be compatible with Sphinx 1.0.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-08Added hyperlinks for builtin template tags and filters to code samples in docs.Luke Plant
Implemented in javascript because doing it 'properly' is pretty much impossible with Sphinx and Pygments. Refs #12249 git-svn-id: http://code.djangoproject.com/svn/django/trunk@13135 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-08Fixed #13484 -- Added some newly available targets to the documentation ↵Russell Keith-Magee
makefile. Thanks to Alex for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13126 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23Massive reorganization of the docs. See the new docs online at ↵Jacob Kaplan-Moss
http://docs.djangoproject.com/. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-27Added the basics needed to build Django's docs using ↵Jacob Kaplan-Moss
[http://sphinx.pocoo.org/ Sphinx]. If you've got Sphinx installed (the latest version) along with [http://docutils.sf.net docutils], you should be able to easily build the docs locally using {{{sphinx-build}}} or the included {{{Makefile}}}. This use a basic (and pretty crappy) index for the documentation and the built-in Sphinx styles (which are actually quite nice). git-svn-id: http://code.djangoproject.com/svn/django/trunk@7370 bcc190cf-cafb-0310-a4f2-bffc1f526a37