Skip to content

Commit 58d37bd

Browse files
committed
📝 Read project name from metadata @ Sphinx
1 parent d1fc69e commit 58d37bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import sys
66
from importlib.metadata import version as _retrieve_metadata_version_for
77
from pathlib import Path
8+
from tomllib import loads as _parse_toml
89

910

1011
# -- Path setup --------------------------------------------------------------
@@ -33,7 +34,9 @@
3334
sys.path.insert(0, str(DOCS_ROOT_DIR / '_ext'))
3435

3536

36-
project = 'awx_plugins.interfaces'
37+
project = _parse_toml(
38+
(PROJECT_ROOT_DIR / 'pyproject.toml').read_text(),
39+
)['project']['name']
3740
author = 'Ansible maintainers and contributors'
3841
copyright = author # pylint: disable=redefined-builtin
3942

0 commit comments

Comments
 (0)