Skip to content

Commit bf98bdd

Browse files
committed
Fix sys.path for importing all_in_one_restructuredtext better
1 parent fb1d5a8 commit bf98bdd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/generate_sample_sites.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_error_page(theme: Theme, error: Exception) -> str:
2525

2626
def render_conf_template(theme: Theme, destination: Path):
2727
template = Template(TEMPLATES["configuration"].read_text())
28-
rendered = template.render(theme=theme)
28+
rendered = template.render(theme=theme, sources=str(BUILD["sources"]))
2929

3030
destination.write_text(rendered)
3131

src/templates/conf.template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
html_title = "{{ theme.display }}"
1515

16-
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "kitchen-sink"))
16+
sys.path.insert(0, os.path.join("{{ sources }}", "kitchen-sink"))
1717

1818
extensions = [
1919
"sphinx.ext.autodoc",

0 commit comments

Comments
 (0)