Skip to content

Commit

Permalink
Add debug printing
Browse files Browse the repository at this point in the history
  • Loading branch information
klane committed Oct 13, 2024
1 parent 05a727d commit bc2d427
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 8 additions & 0 deletions jekyllnb/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ def _jekyll_path(self, path: str) -> str:
site_dir = self.resources.get("site_dir")
relative_path = os.path.relpath(Path(path).resolve(), site_dir)
url = path2url(relative_path)
print("=" * 50)
print("exporter")
print(f"path: {path}")
print(f"site_dir: {site_dir}")
print(f"resolved path: {Path(path).resolve()}")
print(f"relative path: {relative_path}")
print(f"url: {url}")
print("=" * 50)
return f"{{{{ site.baseurl }}}}/{url}"

def default_filters(self) -> list[tuple[str, Callable]]:
Expand Down
7 changes: 6 additions & 1 deletion tests/test_nbconvert.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ class TestNbConvert(Config):

@pytest.fixture
def args(self, site_dir: Path, input_file: Path) -> list[str]:
return [
args = [
"--to",
"jekyll",
"--output-dir",
str(site_dir),
"--NbConvertApp.output_files_dir=" + os.path.join(IMAGE_DIR, FILE_NAME),
str(input_file),
]
print("=" * 50)
print("test")
print(args)
print("=" * 50)
return args

0 comments on commit bc2d427

Please sign in to comment.