File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 2
2
version : 2
3
3
4
4
build :
5
- os : ubuntu-22.04
5
+ os : ubuntu-lts-latest
6
6
tools :
7
7
# Keep version in sync with tox.ini/docs and ci.yml/docs
8
8
python : " 3.12"
9
+ jobs :
10
+ pre_build :
11
+ - cog -rP docs/index.md
9
12
10
13
python :
11
14
install :
Original file line number Diff line number Diff line change 3
3
# 2.0, and the MIT License. See the LICENSE file in the root of this
4
4
# repository for complete details.
5
5
6
+ import os
7
+
6
8
from importlib import metadata
7
9
8
10
11
+ # Set canonical URL from the Read the Docs Domain
12
+ html_baseurl = os .environ .get ("READTHEDOCS_CANONICAL_URL" , "" )
13
+
14
+ # Tell Jinja2 templates the build is running on Read the Docs
15
+ if os .environ .get ("READTHEDOCS" , "" ) == "True" :
16
+ html_context = {"READTHEDOCS" : True }
17
+
9
18
# We want an image in the README and include the README in the docs.
10
19
suppress_warnings = ["image.nonlocal_uri" ]
11
20
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ Release **{sub-ref}`release`** ([What's new?](https://github.com/hynek/structlo
12
12
```
13
13
14
14
<!-- [[[cog
15
+ # This is mainly called from RTD's pre_build job!
16
+
15
17
import pathlib, tomllib, importlib.metadata
16
18
17
19
if "dev" in (version := importlib.metadata.version("structlog")):
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ tests = [
48
48
# Otherwise mypy fails in tox.
49
49
typing = [" mypy>=1.4" , " rich" , " twisted" ]
50
50
docs = [
51
+ " cogapp" ,
51
52
" furo" ,
52
53
" myst-parser" ,
53
54
" sphinx" ,
You can’t perform that action at this time.
0 commit comments