Skip to content

Commit 8f06d52

Browse files
author
Lasim
committed
feat(check-links): enhance URL ignoring logic for external link checks
1 parent 3c0cefd commit 8f06d52

2 files changed

Lines changed: 32 additions & 4 deletions

File tree

check-links.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,32 @@ import fetch from 'node-fetch';
66

77
const __dirname = path.dirname(fileURLToPath(import.meta.url));
88

9+
// URLs to ignore during external link checking
10+
const IGNORED_URLS = [
11+
'https://deploystack.io',
12+
'https://deploystack.io/*',
13+
'https://cloud.deploystack.io'
14+
];
15+
16+
// Check if a URL should be ignored
17+
const shouldIgnoreUrl = (url) => {
18+
for (const pattern of IGNORED_URLS) {
19+
if (pattern.endsWith('/*')) {
20+
// Handle wildcard patterns
21+
const baseUrl = pattern.slice(0, -2); // Remove /*
22+
if (url === baseUrl || url.startsWith(baseUrl + '/')) {
23+
return true;
24+
}
25+
} else {
26+
// Handle exact matches
27+
if (url === pattern) {
28+
return true;
29+
}
30+
}
31+
}
32+
return false;
33+
};
34+
935
// Read a markdown file and extract all markdown links
1036
const extractLinks = (content) => {
1137
const linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
@@ -82,6 +108,12 @@ const checkExternalUrl = async (url) => {
82108
return true;
83109
}
84110

111+
// Check if URL should be ignored
112+
if (shouldIgnoreUrl(url)) {
113+
console.log(` ➡️ ${url} (ignored)`);
114+
return true;
115+
}
116+
85117
try {
86118
const response = await fetch(url, {
87119
method: 'HEAD',

docs/self-hosted/quick-start.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,6 @@ If you need assistance:
316316
- **[Global Settings](/global-settings)**: Configure email, auth, and more
317317
- **[User Roles](/roles)**: Manage team permissions
318318

319-
### Deploy MCP Servers
320-
321-
- **[MCP Server Catalog](https://deploystack.io/mcp)**: Browse available servers
322-
323319
---
324320

325321
**🎉 Congratulations!** You now have DeployStack running. Start deploying MCP servers and streamline your AI agent infrastructure!

0 commit comments

Comments
 (0)