Skip to content

Commit

Permalink
fix: images
Browse files Browse the repository at this point in the history
relative path failed, adding bundle name to path
  • Loading branch information
DamianFlynn committed Dec 5, 2022
1 parent 746ede2 commit 398c2b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import argparse
import os

__version__ = "0.3.1"
__version__ = "0.3.2"

parser = argparse.ArgumentParser()

Expand Down
5 changes: 3 additions & 2 deletions obsidian_parser/obsidianparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ def retrieve_bundle_assets(self, hugo_page: str) -> None:
link["link"] = "opps-missing-image.png"

# Update the link in the Hugo Page.
hugo_link = f'![{link["text"]}](./{link["link"]})' # HTML Link
hugo_link = f'![[./{link["link"]}|{link["text"]}]]' # Wiki Link
hugo_bundle_name = os.path.basename(hugo_bundle_dir)
hugo_link = f'![{link["text"]}]({hugo_bundle_name}/{link["link"]})' # HTML Link
hugo_link = f'![[{hugo_bundle_name}/{link["link"]}|{link["text"]}]]' # Wiki Link
wiki_link = link["source"]
note_content = note_content.replace(wiki_link, hugo_link)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# This call to setup() does all the work
setup(
name="obsidian-parser",
version="0.3.1",
version="0.3.2",
description="Demo library",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 398c2b4

Please sign in to comment.