Commit Graph

20 Commits

Author SHA1 Message Date
Adam Turner a2f2d6cc5a
Add support for topic indices (#2579)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-18 20:04:46 +02:00
Adam Turner f7c9e62c9f
Infra: Use Docutils' `list-table` syntax for PEP 0 (#2616) 2022-06-08 10:11:14 -07:00
Hugo van Kemenade 0b0dd6ddd5
Add tests for `pep_sphinx_extensions` (#2545)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-04-26 20:07:20 +01:00
CAM Gerlach e0d4ae5855
Style: Retitle inline 'Contents' to 'Table of Contents' for clarity (#2541) 2022-04-20 04:54:38 -05:00
CAM Gerlach efeae28e9e
Infra: Improve email and link processing and rendering in headers (#2467)
* Infra: Include mailing list link type in text for clarity, & refactor

* Infra: Support mailing list info pages as well as archives

* Infra: Pretty-format Discourse categories/threads in headers as well

* Infra: Show friendly-name of target in Post-History link hover text

* Infra: Automatically link list addresses to list pages in Discussions-To

* Infra: Use simpler check for title in Discourse URL header processing

* Infra: Automatically trim trailing commas & whitespace in header values
2022-04-19 09:27:27 +03:00
CAM Gerlach 4a5751f0d3
Style: Reduce space consumed by headers and improve alignment (#2533) 2022-04-19 09:24:27 +03:00
CAM Gerlach 75235028b7
PEP 0: Make PEP titles in table clickable links (#2429) 2022-03-24 15:08:07 -05:00
Adam Turner 13aa4b16fb
Make the table of contents collapsed by default (#2364) 2022-03-14 01:49:03 +00:00
Adam Turner b76fe4351e
Use PEP titles and sections as title text for `:pep:` references (#2366) 2022-02-27 22:58:15 +00:00
Adam Turner 42f88f1ce2
Display list names in Resolution and Discussions-To headers (#2361) 2022-02-27 14:46:36 -08:00
Adam Turner 94225885de
PEP 676: Use `docutils.nodes.Node.findall` (#2363) 2022-02-25 18:38:24 +00:00
Adam Turner 7efe7fb433
PEP 676: Display mailing list names for thread links in Discussions-To (#2351) 2022-02-21 21:04:55 +00:00
CAM Gerlach 8e33abd30f
PEP 12: Recommend reST hyperlinks over footnotes (#2302) 2022-02-17 17:26:37 +00:00
Adam Turner 50e5de2d28
PEP 676: 'dark mode', documentation, spec update, implementation update (#2239)
Co-authored-by: C.A.M. Gerlach <cam.gerlach@gerlach.cam>
2022-01-16 14:33:05 -08:00
CAM Gerlach 57c9a36dca
Fix refs section removal breaking external links on Sphinx build too (#2229) 2022-01-11 18:37:31 -08:00
Adam Turner 3d60b84e35
PEP 676: Implementation updates (#2208) 2022-01-09 10:07:03 -08:00
CAM Gerlach f82973df46
Don't auto-add inline links to ref section & rm if empty, per #2130 (#2155)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2021-12-18 15:23:14 -08:00
Adam Turner 0d93abf9bf
Sphinx support: theming (#1933)
See #2, #1385 for context. Superseeds #1568.

This is the Sphinx-theming part, building on PR #1930.

### Stylesheets:
- `style.css` - styles
- `mq.css` - media queries

### Jinja2 Templates:
- `page.html` - overarching template

### Javascript:
- `doctools.js` - fixes footnote brackets

### Theme miscellany
- `theme.conf` - sets pygments styles, theme internals
2021-06-30 20:19:44 +01:00
Adam Turner 749c2d9a37
Sphinx support: add PEP 0 generation extension (1932)
* Add PEP 0 parser

* Add PEP 0 writer

* Add PEP 0 generator and authors override

* Add/update build and run

* Simplify `create_index_file`

* Special status handling

* Add constants for PEP related magic strings

* Prefer checking on class

* Add PEP.hide_status, use constants

* Remove comment from 2008 (current method works fine)

* Clarify intent of for-else loop

* Hook in to Sphinx (oops, missed when splitting out this PR)

* Rename AUTHORS.csv for clarity

* Sort and strip spaces

* Prefer `authors_overrides` name

* Add pep_0_errors.py

* Move author_sort_by to writer

* PEP init misc

* Split out Author

* Drop pep_0 prefix

* Pass title length as an argument

* Add constants.py to hold global type / status values

* Capitalise constants

* Capitalise constants

* Update PEP classification algorithm

* Extract static methods to module level

* Add emit_text, emit_pep_row

* Use constants in writer.py

* Sort imports

* Sort constants

* Fix sorting in historical and dead PEPs

* Extract static methods to module level

* Extract static methods to module level (parser.py

* Make Author a NamedTuple

* Fix author duplication bug with NamedTuples

* Revert to old PEP classification algorithm

* Define PEP equality
2021-06-12 18:51:14 +01:00
Adam Turner 0f3bbd9ad9
Sphinx support: add docutils support files (#1931)
See #2, #1385 for context. Superseeds #1566.

This is the docutils parsing, transforms and writing part, building on PR #1930. It contains a pseudo-package, `sphinx_pep_extensions`, which itself contains:

### Docutils parsing:
- `PEPParser` - collates transforms and interfaces with Sphinx core
- `PEPRole` - deals with :PEP:`blah` in RST source

### Docutils transforms:
- `PEPContents` (Creates table of contents without page title)
- `PEPFooter` (Dels with footnotes, link to source, last modified commit)
- `PEPHeaders` (Parses RFC2822 headers)
- `PEPTitle` - Creates document title from PEP headers
- `PEPZero` - Masks email addresses and creates links to PEP numbers from tables in `pep-0000.rst`

### Docutils HTML output:
- `PEPTranslator` - Overrides to the default HTML translator to enable better matching of the current PEP styles
2021-06-09 01:37:55 +01:00