Skip to content

Commit

Permalink
pyodide on index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
davy39 committed Feb 28, 2024
1 parent 488d822 commit 9a3e8f4
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1129,33 +1129,21 @@ def get_image_path() -> str:

# TODO : this issue concerning the urls must be closed ASAP
def get_filepath() -> str:
print("docs_dirs", env.conf["docs_dir"])
print(
"P1",
env.variables.page.abs_url,
"/".join(
filter(
lambda folder: folder != "",
convert_url_to_utf8(env.variables.page.url).split("/")[:-2],
if env.variables.page.is_index:
path = "/".join(
filter(
lambda folder: folder != "",
convert_url_to_utf8(env.variables.page.abs_url).split("/")[:-1],
)
)
),
)
print(
"P2",
env.variables.page.abs_url,
"/".join(
else:
path = "/".join(
filter(
lambda folder: folder != "",
convert_url_to_utf8(env.variables.page.abs_url).split("/")[2:-2],
convert_url_to_utf8(env.variables.page.abs_url).split("/")[:-2],
)
),
)
return "/".join(
filter(
lambda folder: folder != "",
convert_url_to_utf8(env.variables.page.abs_url).split("/")[:-2],
)
)
return path

# TODO : handle the case where the same files are loaded on the same page.
def generate_id_ide(content: str) -> str:
Expand Down

0 comments on commit 9a3e8f4

Please sign in to comment.