Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Commit308d041

Browse files
committed
Add code to change the docs link on the navbar
1 parent8be024d commit308d041

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

‎changeDocsLink.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
document.addEventListener("DOMContentLoaded",function(){
2+
constnavbarDocsLink=document.querySelector('.navbar__item[href="/"]');
3+
4+
if(navbarDocsLink&&window.location.hostname==="blog.coderabbit.ai"){
5+
navbarDocsLink.setAttribute("href","https://docs.coderabbit.ai");
6+
}
7+
});

‎docusaurus.config.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ const config: Config = {
101101
src:"https://cdnjs.cloudflare.com/ajax/libs/axios/1.2.1/axios.min.js",
102102
async:true,
103103
},
104+
"changeDocsLink.js",
104105
],
105106

106107
themeConfig:{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp