Skip to content

Commit

Permalink
docs: fix link paths
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Dvorak <[email protected]>
  • Loading branch information
Tomas2D committed Oct 16, 2024
1 parent 3c71bf6 commit 75bead8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@
}

var fixLink = fixLinkFactory();
var basePath = window.location.pathname.replace(/index.html/gi, "").replace("/#/", "") || "/";

window.$docsify = {
"name": "Bee Agent Framework",
"basePath": (function () {
var path = window.location.pathname;
return path.replace(/index.html/gi, "").replace("/#/", "") || "/";
})(),
"basePath": basePath,
"repo": "i-am-bee/bee-agent-framework",
"loadSidebar": true,
"subMaxLevel": 2,
Expand All @@ -60,8 +58,8 @@
return this.origin.link.apply(this, [fixLink(link), renderer, text]);
},
html: function (html) {
var regex = /src\s*=\s*(['"])\/docs\/(.+?)(\1)/gi;
html = html.replace(regex, `src=$1/$2$3`);
var regex = /(src|href)\s*=\s*(['"])\/docs\/(.+?)\2/gi;
html = html.replace(regex, "$1=$2" + basePath + "$3$2");
return html;
},
},
Expand Down

0 comments on commit 75bead8

Please sign in to comment.