From 7ea2a8de87274a14431708f3a9d7e5e82ffec1e3 Mon Sep 17 00:00:00 2001 From: Ben Donnelly Date: Wed, 6 Sep 2023 16:56:53 +0100 Subject: [PATCH] fix(links): fix docs links not using host name correctly --- .idea/misc.xml | 3 +-- mkdocs_gitlinks/plugin.py | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 639900d..90f2ca2 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,4 @@ - - + diff --git a/mkdocs_gitlinks/plugin.py b/mkdocs_gitlinks/plugin.py index 1ed3ab1..bc88800 100644 --- a/mkdocs_gitlinks/plugin.py +++ b/mkdocs_gitlinks/plugin.py @@ -25,6 +25,7 @@ class GitLinksPlugin(BasePlugin): ('show_docs', config_options.Type(bool, default=False)), ('target', config_options.Type(str, default="_blank")), ('github_host', config_options.Type(str, default="github.com")), + ('github_docs_host', config_options.Type(str, default="github.io")), ) def create_link(self, config: MkDocsConfig, repo_name): @@ -66,4 +67,4 @@ def docs_link(self, repo_name): split = repo_name.split("/") return """ %s""" % ( - self.config['target'], split[0], split[1], self.config['github_host'], svg_docs()) + self.config['target'], split[0], self.config['github_docs_host'], split[1], svg_docs())