Skip to content

Commit 985594a

Browse files
committed
append index.md to the end of the external links
1 parent 9c437ea commit 985594a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/CopyPageButton.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export default function CopyPageButton() {
6060

6161
const handleExternalAI = (url: string, vendor: string) => {
6262
const externalAIURL = url;
63-
const prompt = `Read this page from the Cloudflare docs: ${encodeURIComponent(window.location.href)} and answer questions about the content.`;
63+
const indexMdUrl = new URL("index.md", window.location.href).toString();
64+
const prompt = `Read this page from the Cloudflare docs: ${encodeURIComponent(indexMdUrl)} and answer questions about the content.`;
6465
track("clicked copy page button", {
6566
value: "docs ai",
6667
label: vendor,

0 commit comments

Comments
 (0)