Skip to content

Commit 2a4107c

Browse files
committed
f
1 parent d20edff commit 2a4107c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sphinx_codeautolink/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Sphinx extension for linking code examples to reference documentation."""
22

3+
from pathlib import Path
4+
35
from sphinx.application import Sphinx
46

57
from .extension import SphinxCodeAutoLink, backref, directive
@@ -12,7 +14,8 @@ def setup(app: Sphinx):
1214
"""Set up extension, directives and events."""
1315
state = SphinxCodeAutoLink()
1416
app.setup_extension("sphinx.ext.autodoc")
15-
app.add_css_file("sphinx-codeautolink.css")
17+
css_file = Path(__file__).parent / "static" / "sphinx-codeautolink.css"
18+
app.add_css_file(str(css_file))
1619
app.add_config_value(
1720
"codeautolink_autodoc_inject", default=False, rebuild="html", types=[bool]
1821
)

0 commit comments

Comments
 (0)