Skip to content

Commit 65e7f51

Browse files
committed
Add a link to report an issue
1 parent 71516bc commit 65e7f51

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React from 'react';
2+
import {useLocation} from '@docusaurus/router';
3+
import {useDocVersionSuggestions} from '@docusaurus/theme-common/internal';
4+
import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client';
5+
import styles from './styles.module.css';
6+
7+
export default function ReportIssue() {
8+
const {pathname} = useLocation();
9+
const {activeDoc} = useActiveDocContext();
10+
11+
const issueUrl = `https://github.com/RooVetGit/Roo-Code-Docs/issues/new?title=Documentation%20Issue:%20${encodeURIComponent(pathname)}`;
12+
13+
return (
14+
<div className={styles.reportContainer}>
15+
<hr className={styles.separator} />
16+
<div className={styles.reportLink}>
17+
<span>Is this documentation incorrect or incomplete? </span>
18+
<a href={issueUrl} target="_blank" rel="noopener noreferrer">
19+
Report an issue on GitHub
20+
</a>
21+
</div>
22+
</div>
23+
);
24+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.reportContainer {
2+
margin-top: 3rem;
3+
margin-bottom: 1rem;
4+
}
5+
6+
.separator {
7+
margin-top: 2rem;
8+
margin-bottom: 1rem;
9+
border: 0;
10+
border-top: 1px solid var(--ifm-color-emphasis-300);
11+
}
12+
13+
.reportLink {
14+
font-size: 0.875rem;
15+
color: var(--ifm-color-emphasis-700);
16+
}
17+
18+
.reportLink a {
19+
font-weight: 500;
20+
}

src/theme/DocItem/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react';
2+
import DocItem from '@theme-original/DocItem';
3+
import ReportIssue from '@site/src/components/ReportIssue';
4+
5+
export default function DocItemWrapper(props) {
6+
return (
7+
<>
8+
<DocItem {...props} />
9+
<ReportIssue />
10+
</>
11+
);
12+
}

0 commit comments

Comments
 (0)