Skip to content

Commit 10d2f4e

Browse files
authored
Use relative links and enforce it (#476)
* Use relative links * fix link tests
1 parent 8bf34f3 commit 10d2f4e

File tree

7 files changed

+68
-16
lines changed

7 files changed

+68
-16
lines changed

app/en/home/agentic-development/page.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ description: "Learn how to speed up your development with agents in your IDEs"
55

66
# Agentic Development
77

8-
Give your AI IDE access to Arcade.dev's documentation using our llms.txt files (short [llms.txt](https://docs.arcade.dev/llms.txt), [llms-full.txt](https://docs.arcade.dev/llms-full.txt)), or use [context7](https://context7.com/arcadeai/docs). This allows Claude Code, Cursor, and other AI IDEs to access the documentation and help you write code.
8+
Give your AI IDE access to Arcade.dev's documentation using our llms.txt files (short [llms.txt](/llms.txt), [llms-full.txt](/llms-full.txt)), or use [context7](https://context7.com/arcadeai/docs). This allows Claude Code, Cursor, and other AI IDEs to access the documentation and help you write code.
99

1010
## LLMs.txt
1111

1212
LLMs.txt is a file format that allows you to give your AI IDE access to Arcade.dev's documentation in a format that can be easily parsed by the LLM. All you need to do is paste in the conent of the file into your IDE's settings, or reference the docs, e.g. via [Cursor's `@docs` annotation](https://cursor.com/docs/context/symbols#docs).
1313

1414
Our LLMs.txt files are available in two versions:
1515

16-
- [`https://docs.arcade.dev/llms.txt`](https://docs.arcade.dev/llms.txt) - a short version of the documentation index
17-
- [`https://docs.arcade.dev/llms-full.txt`](https://docs.arcade.dev/llms-full.txt) - a full version of the documentation
16+
- [`/llms.txt`](/llms.txt) - a short version of the documentation index
17+
- [`/llms-full.txt`](/llms-full.txt) - a full version of the documentation
1818

1919
![LLMs.txt example](/images/agentic-development/cursor-llms-txt.png)
2020

app/en/home/auth/secure-auth-production/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The Arcade.dev user verifier helps keep your auth flows secure while you are bui
2929
<Callout type="info">
3030
Arcade's default OAuth apps can *only* be used with the Arcade user verifier.
3131
If you are building a multi-user production app, you must obtain your own OAuth app credentials and add them to Arcade.
32-
For example, see our docs on [configuring Google auth in the Arcade Dashboard](https://docs.arcade.dev/home/auth-providers/google#access-the-arcade-dashboard).
32+
For example, see our docs on [configuring Google auth in the Arcade Dashboard](/home/auth-providers/google#access-the-arcade-dashboard).
3333
</Callout>
3434

3535
## Build a custom user verifier

app/en/home/changelog/page.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ _Here's what's new at Arcade.dev!_
1414

1515
**Toolkits**
1616

17-
- `[feature - 🚀]` Box.com Starter MCP Server released ([docs](https://docs.arcade.dev/mcp-servers/productivity/box-api))
18-
- `[feature - 🚀]` Stripe Starter MCP Server released ([docs](https://docs.arcade.dev/en/mcp-servers/payments/stripe_api))
17+
- `[feature - 🚀]` Box.com Starter MCP Server released ([docs](/en/mcp-servers/productivity/box-api))
18+
- `[feature - 🚀]` Stripe Starter MCP Server released ([docs](/en/mcp-servers/payments/stripe_api))
1919

2020
**Misc**
2121

@@ -25,9 +25,9 @@ _Here's what's new at Arcade.dev!_
2525

2626
**Toolkits**
2727

28-
- `[feature - 🚀]` Introduce [Starter Tools](https://docs.arcade.dev/home/use-tools/types-of-tools), a new type of tool that mirrors the original HTTP API design of the upstream service.
28+
- `[feature - 🚀]` Introduce [Starter Tools](/home/use-tools/types-of-tools), a new type of tool that mirrors the original HTTP API design of the upstream service.
2929
- `[feature - 🚀]` Release Slack started MCP Server which contains support for most of the Slack API.
30-
- `[feature - 🚀]` Include advanced error handling in the following MCP Servers: Google, Microsoft, Slack, and Asana. Learn more about handling tool errors [here](https://docs.arcade.dev/home/build-tools/handle-tool-errorsk).
30+
- `[feature - 🚀]` Include advanced error handling in the following MCP Servers: Google, Microsoft, Slack, and Asana. Learn more about handling tool errors [here](/home/build-tools/handle-tool-errors).
3131
- `[bugfix - 🐛]` [MCP Servers/MS Teams] Fix get_chat_metadata by chat's users
3232
- `[feature - 🚀]` [MCP Servers/confluence] Adding WhoAmI tools for Confluence
3333

@@ -153,7 +153,7 @@ _Here's what's new at Arcade.dev!_
153153

154154
**Toolkits**
155155

156-
- `[feature - 🚀]` Sharepoint Toolkit added ([docs](https://docs.arcade.dev/mcp-servers/productivity/sharepoint))
156+
- `[feature - 🚀]` Sharepoint Toolkit added ([docs](/mcp-servers/productivity/sharepoint))
157157
- `[feature - 🚀]` Google Slides Toolkit added
158158
- `[feature - 🚀]` Commenting on Google Docs added
159159
- `[bugfix - 🐛]` Improvements in Microsoft Teams message search tool for better agentic experience. Fix bug when no messages match the search query.
@@ -320,23 +320,23 @@ Self-hosed Arcade developers cannot be grandfathered into the old (insecure) beh
320320

321321
**Frameworks**
322322

323-
- `[feature - 🚀]` Support for OpenAI Agent SDK in Typescript ([docs](https://docs.arcade.dev/home/oai-agents/overview) and [example](https://github.com/ArcadeAI/arcade-ai/tree/main/examples/openai-agents-ts))
323+
- `[feature - 🚀]` Support for OpenAI Agent SDK in Typescript ([docs](/home/oai-agents/overview) and [example](https://github.com/ArcadeAI/arcade-ai/tree/main/examples/openai-agents-ts))
324324

325325
**Toolkits**
326326

327-
- `[feature - 🚀]` Jira MCP Server released ([docs](https://docs.arcade.dev/mcp-servers/productivity/jira))
327+
- `[feature - 🚀]` Jira MCP Server released ([docs](/mcp-servers/productivity/jira))
328328

329329
**CLI and TDK**
330330

331-
- `[feature - 🚀]` V2.0 of Python Tool Development Kit (TDK) ([migration guide](https://docs.arcade.dev/home/migrate-to-v2))
331+
- `[feature - 🚀]` V2.0 of Python Tool Development Kit (TDK)
332332
- `[feature - 🚀]` Admin API client support
333333
- Requires v1.6.0 of `arcade-py`, or v1.8.0 of `arcade-js`, or v0.1.0-alpha.4 of `arcade-go`
334334

335335
**Platform and Engine**
336336

337337
- `[feature - 🚀]` Admin APIs released for managing users, secrets, and tools ([API References](https://reference.arcade.dev/api-reference#tag/admin))
338338
- `[bugfix - 🐛]` Unauthenticated MCP servers can be called anonymously
339-
- `[feature - 🚀]` End-user credentials and auth status can be fetched in batches ([docs](https://docs.arcade.dev/home/auth/tool-auth-status))
339+
- `[feature - 🚀]` End-user credentials and auth status can be fetched in batches ([docs](/home/auth/tool-auth-status))
340340

341341
**Misc**
342342

app/en/home/glossary/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ A 'MCP Server' is a collection of tools that can be used by an agent, grouped lo
2525

2626
A 'tool' is a function that can be called by an agent which performs some action - commonly via an API, filesystem, database, etc. Tools are written in Python and deployed by running a worker which contains the MCP Server's code. Tools are defined by the `@tool()` decorator and will be passed `ToolContext` as the first argument. If a tool has dependencies that are not met (a secret is not provided, for example), the tool will fail to execute.
2727

28-
Tools are commonly referred to by a qualified name that includes their MCP Server. For example, [Gmail.SendEmail](https://docs.arcade.dev/mcp-servers/productivity/gmail#gmailsendemail)
28+
Tools are commonly referred to by a qualified name that includes their MCP Server. For example, [Gmail.SendEmail](/mcp-servers/productivity/gmail#gmailsendemail)
2929

3030
_Learn more about [tools](/home/build-tools/create-a-mcp-server)._
3131

@@ -151,7 +151,7 @@ The Arcade Engine is also responsible for the OAuth flow for your agent's users.
151151

152152
### Worker
153153

154-
A 'worker' is a process that runs all the tools with a MCP Server. Workers are microservices that are called by the Arcade Engine to handle tool execution requests. Workers are either [deployed to Arcade's infrastructure](https://docs.arcade.dev/home/serve-tools/arcade-deploy) via `arcade deploy`, or run in your own infrastructure.
154+
A 'worker' is a process that runs all the tools with a MCP Server. Workers are microservices that are called by the Arcade Engine to handle tool execution requests. Workers are either [deployed to Arcade's infrastructure](/home/serve-tools/arcade-deploy) via `arcade deploy`, or run in your own infrastructure.
155155

156156
_Learn more about workers [here](/home/deployment/on-prem-mcp).
157157

app/en/home/vercelai/using-arcade-tools/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ yarn install ai @ai-sdk/openai @arcadeai/arcadejs
5858
You'll need two API keys:
5959

6060
- **OpenAI API key** from [OpenAI dashboard](https://platform.openai.com/api-keys)
61-
- **Arcade API key** from our [Getting your API key guide](https://docs.arcade.dev/home/api-keys)
61+
- **Arcade API key** from our [Getting your API key guide](/home/api-keys)
6262

6363
Add them to your environment:
6464

tests/broken-link-check.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ import { expect, test } from "vitest";
66

77
const TIMEOUT = 30_000;
88

9+
const staticFiles = [
10+
"/llms.txt",
11+
"/llms-full.txt",
12+
"/robots.txt",
13+
"/sitemap.xml",
14+
];
15+
916
// Function to validate anchor fragments by checking file content
1017
function validateAnchorFragment(filePath: string, fragment: string): boolean {
1118
try {
@@ -63,6 +70,10 @@ test(
6370
const [basePath, fragment] = url.split("#");
6471
const localeUrl = `/en${basePath}`;
6572

73+
if (staticFiles.includes(basePath)) {
74+
return true;
75+
}
76+
6677
// Check if the base path exists with locale prefix
6778
const baseExists = scanned.urls?.has(localeUrl);
6879

tests/internal-link-check.test.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { readFileSync } from "node:fs";
2+
import fg from "fast-glob";
3+
import { expect, test } from "vitest";
4+
5+
const TIMEOUT = 30_000;
6+
7+
test(
8+
"check for absolute links to docs.arcade.dev",
9+
async () => {
10+
const files = await fg("app/**/*.{md,mdx}");
11+
const absoluteLinkRegex = /https?:\/\/docs\.arcade\.dev\//gi;
12+
const errors: Array<{ file: string; line: number; match: string }> = [];
13+
14+
for (const file of files) {
15+
const content = readFileSync(file, "utf-8");
16+
const lines = content.split("\n");
17+
18+
for (let i = 0; i < lines.length; i++) {
19+
const matches = lines[i].match(absoluteLinkRegex);
20+
if (matches) {
21+
for (const match of matches) {
22+
errors.push({
23+
file,
24+
line: i + 1,
25+
match,
26+
});
27+
}
28+
}
29+
}
30+
}
31+
32+
for (const error of errors) {
33+
console.error(
34+
`Absolute link found in ${error.file}:${error.line} - "${error.match}" should be a relative link`
35+
);
36+
}
37+
38+
expect(errors.length).toBe(0);
39+
},
40+
TIMEOUT
41+
);

0 commit comments

Comments
 (0)