You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This results in the projects/level2/docs/index.md file in the git tree rendering at level1/level2/index.html in the site HTML tree, which is what I want. However, in this case, the edit_url for the the level2/docs/index.md file is rendered as:
If this isn't an improper use of the plugin (please just tell me if this is the case), I think the fix should be
diff --git a/mkdocs_monorepo_plugin/edit_uri.py b/mkdocs_monorepo_plugin/edit_uri.py
index 4b0bbe5..a6b84d7 100644
--- a/mkdocs_monorepo_plugin/edit_uri.py+++ b/mkdocs_monorepo_plugin/edit_uri.py@@ -43,7 +43,7 @@ class EditUrl:
return path.relpath(abs_page_config_file_dir, abs_root_config_file_dir)
def __get_page_src_path(self):
- alias = self.page.url.split('/')[0]+ alias = self.__get_page_dir_alias()
path = self.page.file.src_path
return path.replace('{}/'.format(alias), '')
but I don't really understand the implications of this change on other use cases. I'm attempting to manipulate the __tests__ to reproduce this configuration and hope to be able to post a merge request including the patch.
The text was updated successfully, but these errors were encountered:
duncanmmacleod
added a commit
to duncanmmacleod/mkdocs-monorepo-plugin
that referenced
this issue
May 21, 2024
This is a great plugin, thank you for providing and maintaining it!
I am using this plugin to embed third-party docs projects 'deep' (not at the top-level) in the hierarchy, like this:
where
projects/level2
is a git submodule linked to a separate project whosemkdocs.yml
looks like this:This results in the
projects/level2/docs/index.md
file in the git tree rendering atlevel1/level2/index.html
in the site HTML tree, which is what I want. However, in this case, the edit_url for the thelevel2/docs/index.md
file is rendered as:This is incorrect, it should be
All of this is available on github at https://github.com/duncanmmacleod/mkdocs-monorepo-plugin-edit_uri-example.
If this isn't an improper use of the plugin (please just tell me if this is the case), I think the fix should be
but I don't really understand the implications of this change on other use cases. I'm attempting to manipulate the
__tests__
to reproduce this configuration and hope to be able to post a merge request including the patch.The text was updated successfully, but these errors were encountered: