Verified Commit 7d1ec2f4 authored by Antoine Beaupré's avatar Antoine Beaupré
Browse files

ikiwikitoot: fix relative path calls

parent fc0268be
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -213,8 +213,9 @@ def post_and_write(
    required_tags: list[str],
    required_prefix: list[str],
):
    post_path = os.path.abspath(post_path)
    logging.info("inspecting post path %s...", post_path)
    git_repo_path = find_git_repo(os.path.abspath(post_path))
    git_repo_path = find_git_repo(post_path)
    # remove .md(wn)? suffix
    source_basename, _ = post_path.removeprefix(git_repo_path).rsplit(".", maxsplit=1)
    post_url = base_url.rstrip("/") + "/" + source_basename.strip("/")