Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions loconotion/notionparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import mimetypes
import urllib.parse
import hashlib
from pathlib import Path
from pathlib import Path, PurePath

log = logging.getLogger(f"loconotion.{__name__}")

Expand Down Expand Up @@ -563,12 +563,14 @@ def injects_custom_tags(section):
injects_custom_tags("body")

# inject loconotion's custom stylesheet and script
loconotion_custom_css = self.cache_file(Path("bundles/loconotion.css"))
current_dir = Path(__file__).parent

loconotion_custom_css = self.cache_file((current_dir / '../bundles/loconotion.css').resolve())
custom_css = soup.new_tag(
"link", rel="stylesheet", href=str(loconotion_custom_css)
)
soup.head.insert(-1, custom_css)
loconotion_custom_js = self.cache_file(Path("bundles/loconotion.js"))
loconotion_custom_js = self.cache_file((current_dir / '../bundles/loconotion.js').resolve())
custom_script = soup.new_tag(
"script", type="text/javascript", src=str(loconotion_custom_js)
)
Expand Down