PEP 1 and 12: Document Topic header (#2995)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
This commit is contained in:
parent
7e1d4a5ae5
commit
e92c4d6afa
5
Makefile
5
Makefile
|
@ -11,6 +11,11 @@ RENDER_COMMAND=$(VENVDIR)/bin/python3 build.py -j $(JOBS) -o $(OUTPUT_DIR)
|
|||
html: venv
|
||||
$(RENDER_COMMAND)
|
||||
|
||||
## htmlview to open the index page built by the html target in your browser
|
||||
.PHONY: htmlview
|
||||
htmlview: html
|
||||
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/index.html'))"
|
||||
|
||||
## dirhtml to render PEPs to "index.html" files within "pep-NNNN" directories
|
||||
.PHONY: dirhtml
|
||||
dirhtml: venv rss
|
||||
|
|
|
@ -39,6 +39,17 @@ resource "fastly_service_vcl" "peps" {
|
|||
EOT
|
||||
}
|
||||
|
||||
snippet {
|
||||
name = "topics"
|
||||
type = "recv"
|
||||
content = <<-EOT
|
||||
if (req.url ~ "^/topics($|/)") {
|
||||
set req.http.Location = regsub(req.http.Location, "^/topics/?", "/topic/");
|
||||
error 618;
|
||||
}
|
||||
EOT
|
||||
}
|
||||
|
||||
snippet {
|
||||
name = "redirect"
|
||||
type = "error"
|
||||
|
|
|
@ -605,6 +605,7 @@ optional and are described below. All other headers are required.
|
|||
Status: <Draft | Active | Accepted | Provisional | Deferred | Rejected |
|
||||
Withdrawn | Final | Superseded>
|
||||
Type: <Standards Track | Informational | Process>
|
||||
* Topic: <Governance | Packaging | Release | Typing>
|
||||
* Content-Type: text/x-rst
|
||||
* Requires: <pep numbers>
|
||||
Created: <date created on, in dd-mmm-yyyy format>
|
||||
|
@ -659,6 +660,10 @@ archives, rather than just a mailto: or hyperlink to the list itself.
|
|||
The Type header specifies the type of PEP: Standards Track,
|
||||
Informational, or Process.
|
||||
|
||||
The optional Topic header lists the special topic, if any,
|
||||
the PEP belongs under.
|
||||
See the :ref:`topic-index` for the existing topics.
|
||||
|
||||
The format of a PEP is specified with a Content-Type header.
|
||||
All PEPs must use reStructuredText (see :pep:`12`),
|
||||
and have a value of ``text/x-rst``, the default.
|
||||
|
|
|
@ -121,6 +121,9 @@ directions below.
|
|||
|
||||
Python-Version: 2.2
|
||||
|
||||
- Add a Topic header if the PEP belongs under one shown at the :ref:`topic-index`.
|
||||
Most PEPs don't.
|
||||
|
||||
- Leave Post-History alone for now; you'll add dates and corresponding links
|
||||
to this header each time you post your PEP to the designated discussion forum
|
||||
(and update the Discussions-To header with said link, as above).
|
||||
|
@ -174,6 +177,7 @@ your PEP):
|
|||
Discussions-To: [URL]
|
||||
Status: Draft
|
||||
Type: [Standards Track | Informational | Process]
|
||||
Topic: *[Governance | Packaging | Release | Typing]
|
||||
Content-Type: text/x-rst
|
||||
Requires: *[NNN]
|
||||
Created: [DD-MMM-YYYY]
|
||||
|
|
|
@ -6,6 +6,7 @@ PEP-Delegate: <PEP delegate's real name>
|
|||
Discussions-To: <REQUIRED: URL of current canonical discussion thread>
|
||||
Status: <REQUIRED: Draft | Active | Accepted | Provisional | Deferred | Rejected | Withdrawn | Final | Superseded>
|
||||
Type: <REQUIRED: Standards Track | Informational | Process>
|
||||
Topic: <Governance | Packaging | Release | Typing>
|
||||
Content-Type: text/x-rst
|
||||
Requires: <pep numbers>
|
||||
Created: <date created on, in dd-mmm-yyyy format>
|
||||
|
|
|
@ -57,6 +57,8 @@ the PEP index.
|
|||
|
||||
def generate_topic_contents(docnames: list[str], env: BuildEnvironment):
|
||||
update_sphinx("topic/index", """\
|
||||
.. _topic-index:
|
||||
|
||||
Topic Index
|
||||
***********
|
||||
|
||||
|
|
Loading…
Reference in New Issue