From 94cd41b6a4afb705aed7494ea3a8bebace1ab036 Mon Sep 17 00:00:00 2001 From: rishikanthc Date: Thu, 15 Aug 2024 19:59:12 -0400 Subject: [PATCH] release 0.3.3 fixing a stupid mistake i made while fixing a bug --- Dockerfile | 2 +- markopolis/md.py | 13 ++++++++++++- pyproject.toml | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9799f43..34bfaef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.12-alpine -RUN pip install --no-cache-dir markopolis==0.3.2 +RUN pip install --no-cache-dir markopolis==0.3.3 WORKDIR /app diff --git a/markopolis/md.py b/markopolis/md.py index af1ad89..e014636 100644 --- a/markopolis/md.py +++ b/markopolis/md.py @@ -114,6 +114,16 @@ def get_meta(note_path: str) -> Tuple[Optional[Dict[str, Any]], str]: def get_note_content(note_path: str) -> Tuple[Optional[Tuple[str, str]], Optional[str]]: + md_configs = { + "mdx_wikilink_plus": { + "base_url": f"{settings.domain}", + # "end_url": ".html", + # "url_case": "lowercase", + # "html_class": "a-custom-class", + #'build_url': build_url, # A callable + # all of the above config params are optional + }, + } if not note_path or not isinstance(note_path, str): return None, "Invalid note path" full_note_path = os.path.join(MDROOT, note_path + ".md") @@ -144,7 +154,8 @@ def get_note_content(note_path: str) -> Tuple[Optional[Tuple[str, str]], Optiona MermaidExtension(), CalloutExtension(), # "mdx_math", - ] + ], + extension_configs=md_configs, ) # Convert Markdown to HTML html_content = md.convert(markdown_content) diff --git a/pyproject.toml b/pyproject.toml index c3ff5b3..847213d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "markopolis" -version = "0.3.2" +version = "0.3.3" description = "Self-hostable Obsidian Publish" authors = ["Rishikanth Chandrasekaran "] readme = "README.md"