Commit Graph

571 Commits

Author SHA1 Message Date
Adam Turner
be73e64a9f
Add `sphinx.util._files` (#12766) 2024-08-11 19:51:59 +01:00
nikkie
c6163ff442
Fix a typo in `extdev/testing.rst` (#12765) 2024-08-11 17:57:46 +01:00
Adam Turner
d39ba32604
Add `sphinx.util._importer` (#12762) 2024-08-11 17:24:26 +01:00
Adam Turner
fc808e0e90 Expand the `sphinx.testing` overview 2024-07-24 15:21:14 +01:00
Adam Turner
3b14b56939 Move the `sphinx.testing` overview to the API section 2024-07-24 15:21:14 +01:00
Adam Turner
772cdfa19d
Remove `sphinx.directives.other.VersionChange` (#12662) 2024-07-23 14:56:49 +01:00
Adam Turner
e174df2762
Rename `normalize_intersphinx_mapping to validate_intersphinx_mapping` (#12643) 2024-07-22 13:32:44 +01:00
Adam Turner
aeebfabe09
Add `include-read to the events overview; sort core_events` (#12576) 2024-07-15 05:06:26 +01:00
Chris Sewell
d8fa98e46a
Add a `write-started` event (#12567)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-15 04:59:06 +01:00
Adam Turner
1252c7b549 Use "rst" consistently for code and highlighting directives 2024-07-15 02:15:52 +01:00
Adam Turner
f2640a4286 Standardise on "reStructuredText" over "reST" in documentation 2024-07-15 02:15:52 +01:00
Adam Turner
82edc3d385
Rewrite `usage/configuration.rst` (#12537)
- Remove now-removed configuration values
- Use obvious 'unset' defaults for ``project`` and ``author``
- Prefer 'e.g.' to 'ex.'
- Allow non-list sequence types in various configuration values
- Add types and defaults to every confval directive
2024-07-10 21:43:14 +01:00
Adam Turner
b5b383fd47
Rewrite the "Docutils markup API" page (#12505) 2024-07-03 02:09:15 +01:00
Chris Sewell
d130c2e710
[docs] Improve tutorials (#12473)
This commit make it clearer, from the filenames and titles,
what the extension tutorials are intended to teach.
2024-06-27 22:30:03 +02:00
Chris Sewell
8f97fd276a
[docs] Improve landing page (#12453)
This commit is intended to improve new user's first-interaction with the Sphinx site:

- Make page header icon/text smaller and not capitalized
- Give min-width to left sidebar (it was getting too small at certain window sizes)
- Replace features list on landing page with admonition boxes, with adaptive layout
- Add landing page "used by" section
- Slightly restructure the Extension section, into Tutorials and How-tos
- Add code to `conf.py` to write HTML write redirect pages for moved documents
- Improve support page, by adding link to Stackoverflow, GH discussion and ReadtheDocs,
  and remove defunct link to libera chat and matplotlib tutorial
2024-06-21 20:12:57 +02:00
Chris Sewell
11abfb90ba
[docs] Update changelog (#12454)
Some additions to the changelog,
that were not added in the relevant PRs.
2024-06-21 15:48:59 +02:00
Chris Sewell
0e3f5b4ab2
[DOCS] Improve events (#12446)
Split the events callback API into a separate document, add a flow graph of the events within the build process, add parameters to the events,
and link the `EnvironmentCollector` docs to the relevant events.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-20 10:40:22 +02:00
Chris Sewell
37ff33dff7
[builder] type Builder core methods with @final and improve docs (#12436)
This commit:

- annotates the `Builder`'s "core" methods, with [`final`](https://docs.python.org/3/library/typing.html#typing.final)
- adds a UML graph to the Builder API docs
- Adds more methods to the Builder API docs

to make it clearer for extension developers, what is expected from a new builder subclass.
2024-06-19 14:51:20 +02:00
Rafael Fontenelle
20ec3bd69d
[docs] fix a typo in `markupapi.rst` (#12413) 2024-06-06 12:52:31 +02:00
Bénédikt Tran
f24eef7b6b
[cleanup] deprecate `sphinx.testing.util.strip_escseq in favor of sphinx.util.console.strip_colors` (#12186) 2024-03-24 00:43:54 +01:00
Chris Sewell
d59b158371
👌 Make ExtensionMetadata type public and use it in internal extensions (#12153)
This type alias has now been fully documented for public consumption.

This will be beneficial to the sphinx ecosystem,
to aide/encourage extension developers to provide the correct metadata.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-21 16:19:26 +01:00
Bénédikt Tran
b2069fb64f
[lint] update Makefile and lint doc (#12117) 2024-03-17 14:45:56 +01:00
Adam Turner
259118d182 Narrow the type for configuration option 'valid_types' values 2024-01-03 21:51:39 +00:00
Adam Turner
9d1dcae373
Deprecate old-style Makefiles in sphinx-quickstart (#11693) 2023-09-21 10:25:00 +01:00
Adam Turner
ff18318613
Add an `'include-read'` event (#11657) 2023-08-30 22:21:16 +01:00
Bénédikt Tran
76658c49a9
Fix `sphinx.ext.autodoc.preserve_defaults` (#11550)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-17 01:19:25 +00:00
Bénédikt Tran
19018f01b6
Improve SigElementFallbackTransform fallback logic. (#11311)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-15 14:25:25 +01:00
Adam Turner
58b628263f
Deprecate `css_files and script_files` (#11582) 2023-08-12 00:46:44 +00:00
Adam Turner
1cfb68d8be
Consistently name the object description options (#11533)
*  The directive option ``:noindex:`` was renamed to ``:no-index:``.
*  The directive option ``:noindexentry:`` was renamed to ``:no-index-entry:``.
*  The directive option ``:nocontentsentry:`` was renamed to ``:no-contents-entry:``.

The previous names are retained as aliases, but will be deprecated
and removed in a future version of Sphinx (9.0 or later).
2023-07-28 22:30:26 +01:00
Adam Turner
c9f0e67cca
Add `sphinx.util.index_entries` (#11528) 2023-07-28 07:41:10 +01:00
Adam Turner
49d8304670
Start using `pathlib.Path and deprecate sphinx.testing.path` (#11526) 2023-07-28 00:39:12 +01:00
Adam Turner
5cf3dce36e
Deprecate `md5 and sha1 wrappers in sphinx.util` (#11512) 2023-07-25 02:29:28 +01:00
Adam Turner
2a9e805206
Remove the deprecated Setuptools integration (#11363) 2023-04-27 01:22:04 +01:00
Adam Turner
bffb54734f Note correct deprecation version for `sphinx.util.osutil.cd` 2023-04-23 20:45:25 +01:00
Adam Turner
7ecf037280 Enable 'nit-picky mode' for Sphinx's documentation
Fix several reference errors throughout the documentation and set
``nitpick_ignore`` in ``doc/conf.py``.
2023-04-06 23:11:39 +01:00
Adam Turner
f5c957597d Normalise spelling of Sphinx versions 2023-03-24 00:44:33 +00:00
Adam Turner
f435fc05e6 Prefer `contextlib.chdir to sphinx.util.osutil.cd` 2023-03-05 18:49:17 +00:00
Adam Turner
670bcb743b
Documentation reshuffle (#11112) 2023-01-08 13:52:36 +00:00
Adam Turner
a2176d47b5 Fix deprecation warnings 2023-01-05 12:17:54 +00:00
Adam Turner
5eb79c126a Move exception formatting utilities to `sphinx.util.exceptions` 2023-01-03 22:09:30 +00:00
Adam Turner
3b3ce9cf7b Move HTTP-date formatting utils to utils.http_date 2023-01-03 19:02:38 +00:00
Adam Turner
8c5e7013ea Move console output utilities to `sphinx.util.display`
- Merge `old_status_iterator` into ``status_iterator``.
  ``old_status_iterator`` was deprecated in version 1.6.
2023-01-03 18:37:20 +00:00
Adam Turner
77a02cf696
Use PEP 604 display for `typing.Optional and typing.Union` (#11072) 2023-01-02 17:49:18 +00:00
Viktor Haag
5715abf1d4
Update removal note for logo and favicon variables (#11063)
These were removed in Sphinx 6.0.0
2022-12-31 17:38:06 +00:00
Jean-François B
e7c0881992
LaTeX: support for booktabs-style and zebra-striped tables (#10759)
This is a combination of 2 + 28 + 7 + and some more commits...

* Cherry-pick: Add support for booktabs-style tables to LaTeX builder

* Cherry-pick: Add support for zebra-striped tables to LaTeX builder

Co-authored-by: Stefan Wiehler <stefan.wiehler@missinglinkelectronics.com>

Above work originally initiated by @sephalon (thanks!)

Development refactored and continued by @jfbu

* latex_table_style configuration, support booktabs, colorrows, borderless

Some details:

- Simplify a bit a conditional in the longtable template

  This also puts the target for a longtable with a label but no caption
  above the toprule for better hyperlinking (testing shows hyperlink
  target can not end up alone at bottom of previous page).

- Extend allowed syntax for colour assignments via 'sphinxsetup'

- latex_table_style new configuration value and coloured rows

  For the user interface I tried to look for inspiration in
  https://docutils.sourceforge.io/docs/user/config.html#table-style
  which mentions booktabs and borderless.  They also mention
  captionbelow which we can implement later, now that architecture
  is here.  They don't mention coloured rows.

- Test on our own document... looks fine!

- Work-around an incompatibility of \cline with row colours

- Reverse priority of classes to allow overruling booktabs by standard
  after parsing source but before letting LaTeX writer act

- Closes #8220

  Commit
  bb859c6696
  already improved a bit, this finishes it (as :rst:dir:`rst-class` was
  actually not linking to anywhere).

- Let booktabs style defaults to *not* using \cmidrule.  They actually
  don't make much sense there, as all \hline's are removed.

- Add \sphinxnorowcolor which allows construct such as this one in
  a tabularcolumns directive:

    >{\columncolor{blue}\sphinxnorowcolor}

  else LaTeX always overrides column colour by row colour

- Add TableMergeColorHeader, TableMergeColorOdd, TableMergeColorEven
  so single-row merged cells can be styled especially

- Extend row colours to all header rows not only the first one
  (all header rows will share same colour settings)

- Auto-adjust to a no '|'-colspec for optimal handling of merged cell

- Add \sphinxcolorblend

- Workaround LaTeX's \cline features and other grid tables matters

- Add \sphinxbuildwarning for important warnings

- Fix some white gaps in merged cells of tables with vlines and
  colorrows

- Work around LaTeX's \cline serious deficiencies for complex grid
  tables

  This commit corrects \cline badly impacting vertical spacing and
  making tables look even more cramped as they usually are in LaTeX
  (although one sees it clearly only with \arrarrulewidth a bit more
  than the LaTeX default of 0.4pt).

  Most importantly this commit solves the problem that \cline's got
  masked by colour panels from the row below.

- Update CHANGES for PR #10759

- Improve documentation of new latex_table_style regarding colours
2022-10-12 17:15:40 +02:00
Adam Turner
58a4449707
Deprecate HTML 4 support (#10843) 2022-09-23 18:12:54 +01:00
Adam Turner
f57177de89
Add contents entries for domain objects (#10807)
- Add entries in the table of contents for domain objects (e.g. 
  `py:function`, `rst:role`, etc). Supported domains are Javascript,
  Python, and reStructuredText.
- Support content in `py:module` and `js:module` directives.
- Add the `noindexentry` and `noindex` flags to more domains.
- Add `toc_object_entries_show_parents` configuration setting
- Update documentation and tests
2022-09-13 20:20:02 +01:00
Adam Turner
ee005caf22 Do not apply epigraph style to all block quotes
Correct indentation where appropriate for stanzas that should not be
rendered as `<blockquote>` HTML elements.

Closes GH-10686
2022-09-12 19:54:36 +01:00
Adam Turner
490a8a9162
Add include_patterns as the opposite of exclude_patterns (#10518) 2022-07-17 21:44:33 +01:00
Antony Lee
03c1e1b15c
Replace napoleon.iterators by simpler stack implementation (#9856) 2022-06-26 12:40:42 +01:00