Skip to content

Commit 12634f0

Browse files
authored
Merge pull request #1665 from minrk/template-vars
enable myst substitutions
2 parents 2191873 + 03e9242 commit 12634f0

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ on:
55
branches-ignore:
66
- "dependabot/**"
77
- "pre-commit-ci-update-config"
8+
paths-ignore:
9+
- "docs/**"
810
pull_request:
11+
paths-ignore:
12+
- "docs/**"
913

1014
env:
1115
FORCE_COLOR: "1"

docs/source/conf.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222

2323
target_libzmq = '%i.%i.%i' % bundled_version
2424

25-
rst_epilog = f"""
26-
.. |target_libzmq| replace:: {target_libzmq}
27-
"""
28-
2925
# -- General configuration -----------------------------------------------------
3026

3127
# Add any Sphinx extension module names here, as strings. They can be extensions
@@ -43,7 +39,9 @@
4339
"colon_fence",
4440
"linkify",
4541
"smartquotes",
42+
"substitution",
4643
]
44+
4745
# Add any paths that contain templates here, relative to this directory.
4846
templates_path = ['_templates']
4947

@@ -73,10 +71,16 @@
7371
import zmq
7472

7573
# The short X.Y version.
76-
version = zmq.__version__.split('-')[0]
74+
version = '.'.join(zmq.__version__.split('.')[:2])
7775
# The full version, including alpha/beta/rc tags.
7876
release = zmq.__version__
7977

78+
myst_substitutions = {
79+
"version": version,
80+
"release": release,
81+
"target_libzmq": target_libzmq,
82+
}
83+
8084
# The language for content autogenerated by Sphinx. Refer to documentation
8185
# for a list of supported languages.
8286
# language = None

0 commit comments

Comments
 (0)