Skip to content

Commit bc85843

Browse files
ferdnycptmcg
authored andcommitted
Add CONTRIBUTING doc to documentation
- Enable the `myst_parser` Python package as a Sphinx extension, which enables it to include MarkDown files in the documentation. - Add `myst_parser` to `docs/requirements.txt` so that it's installed by ReadTheDocs and anyone else looking to build documentation. - Symlink `CONTRIBUTING.md` into the `docs/` dir (this needs to be tested against ReadTheDocs; it may or may not work) - Add `CONTRIBUTING` to the `index.rst` toctree. - Update the title from "CONTRIBUTING" to "Contributing to Pyparsing".
1 parent 6afe750 commit bc85843

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CONTRIBUTING
1+
# Contributing to Pyparsing
22

33
Thank you for your interest in working on pyparsing! Pyparsing has become a popular module for creating simple
44
text parsing and data scraping applications. It has been incorporated in several widely-used packages, and is

docs/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CONTRIBUTING.md

docs/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@
4141
# ones.
4242
extensions = [
4343
"sphinx.ext.autodoc",
44+
"myst_parser",
4445
]
4546

4647
# Add any paths that contain templates here, relative to this directory.
4748
templates_path = ["_templates"]
4849

4950
# The suffix(es) of source filenames.
5051
# You can specify multiple suffixes:
51-
source_suffix = {'.rst': 'restructuredtext'}
52+
source_suffix = {
53+
'.rst': 'restructuredtext',
54+
'.md': 'markdown',
55+
}
5256

5357
# The master toctree document.
5458
master_doc = "index"
@@ -200,3 +204,5 @@
200204
autodoc_default_options = {
201205
'class-doc-from': 'both',
202206
}
207+
208+
myst_heading_anchors = 3

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Release v\ |version|
1717
whats_new_in_3_1
1818
whats_new_in_3_0_0
1919
pyparsing
20+
CONTRIBUTING
2021
CODE_OF_CONDUCT
2122

2223

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
sphinx < 8.2
2+
myst-parser
3+

0 commit comments

Comments
 (0)