Skip to content

Commit 3f98a22

Browse files
committed
feat(llms): add tip callout and markdown view support
1 parent 831cd28 commit 3f98a22

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

docs/1-intro.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,17 @@ Additional configuration and API resources are detailed on the [Network](/networ
127127

128128
## Build faster with ecosystem tools
129129

130+
:::tip[Building with AI]
131+
132+
To feed Developer Hub into your LLM, use these auto-generated [llms.txt](https://llmstxt.org/) files served from the site root:
133+
134+
- `/llms-full.txt` - The entire documentation as a single text file.
135+
- `/llms.txt` - A concise index of all pages with titles and descriptions.
136+
137+
For specific pages, use the **"View page as Markdown"** button at the bottom of any guide.
138+
139+
:::
140+
130141
<div className="row">
131142
<div className="col col--3 margin-bottom--lg">
132143
<DocCard

docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const config: Config = {
6262
remarkPlugins: [remarkMath],
6363
rehypePlugins: [rehypeKatex],
6464
editUrl:
65-
"https://github.com/flare-foundation/developer-hub/edit/main",
65+
"https://raw.githubusercontent.com/flare-foundation/developer-hub/main",
6666
onInlineTags: "throw",
6767
},
6868
blog: false,

src/theme/EditThisPage/index.tsx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import React, { type ReactNode } from "react";
2+
import Translate from "@docusaurus/Translate";
3+
import { ThemeClassNames } from "@docusaurus/theme-common";
4+
import Link from "@docusaurus/Link";
5+
import type { Props } from "@theme/EditThisPage";
6+
7+
function ExternalIcon({ className }: { className?: string }) {
8+
return (
9+
<svg
10+
aria-hidden="true"
11+
focusable="false"
12+
xmlns="http://www.w3.org/2000/svg"
13+
width={16}
14+
height={16}
15+
viewBox="0 0 24 24"
16+
fill="none"
17+
stroke="currentColor"
18+
strokeWidth={2}
19+
strokeLinecap="round"
20+
strokeLinejoin="round"
21+
className={className}
22+
>
23+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
24+
<path d="M17 7l-10 10" />
25+
<path d="M8 7l9 0l0 9" />
26+
</svg>
27+
);
28+
}
29+
30+
export default function EditThisPage({ editUrl }: Props): ReactNode {
31+
return (
32+
<Link to={editUrl} className={ThemeClassNames.common.editThisPage}>
33+
<Translate
34+
id="theme.common.editThisPage"
35+
description="The link label to view the raw source for the current page"
36+
>
37+
View page as Markdown
38+
</Translate>
39+
<ExternalIcon />
40+
</Link>
41+
);
42+
}

0 commit comments

Comments
 (0)