Skip to content

Commit 3de595d

Browse files
committed
Add a link to report an issue
1 parent 71516bc commit 3de595d

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react';
2+
import {useLocation} from '@docusaurus/router';
3+
import styles from './styles.module.css';
4+
5+
export default function ReportIssue() {
6+
const {pathname} = useLocation();
7+
8+
const issueUrl = `https://github.com/RooVetGit/Roo-Code-Docs/issues/new?title=Documentation%20Issue:%20${encodeURIComponent(pathname)}`;
9+
10+
return (
11+
<div className={styles.reportContainer}>
12+
<hr className={styles.separator} />
13+
<div className={styles.reportLink}>
14+
<span>Is this documentation incorrect or incomplete? </span>
15+
<a href={issueUrl} target="_blank" rel="noopener noreferrer">
16+
Report an issue on GitHub
17+
</a>
18+
</div>
19+
</div>
20+
);
21+
}
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)