Skip to content

Commit 4be8143

Browse files
committed
Use absolute path to kaleido.js
1 parent 656b5cc commit 4be8143

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/py/kaleido/_page_generator.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
DEFAULT_PLOTLY = "https://cdn.plot.ly/plotly-2.35.2.js"
88
DEFAULT_MATHJAX = "https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-svg.js"
99

10+
KJS_PATH = Path(__file__).resolve().parent / "vendor" / "kaleido_scopes.js"
11+
1012

1113
class PageGenerator:
1214
"""
@@ -27,10 +29,10 @@ class PageGenerator:
2729
"""
2830
"""The header is the HTML that always goes at the top. Rarely needs changing."""
2931

30-
footer = """
31-
<script src="../kaleido_scopes.js"></script>
32+
footer = f"""
33+
<script src="{KJS_PATH}"></script>
3234
</head>
33-
<body style="{margin: 0; padding: 0;}"><img id="kaleido-image"><img></body>
35+
<body style="{{margin: 0; padding: 0;}}"><img id="kaleido-image"><img></body>
3436
</html>
3537
"""
3638
"""The footer is the HTML that always goes on the bottom. Rarely needs changing."""

0 commit comments

Comments
 (0)