Skip to content
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
580b338
fix: Absolute URL md links
HonzaTuron Oct 1, 2025
1a49179
Merge branch 'master' into fix/alternate-absolute
HonzaTuron Oct 1, 2025
78a5488
fix: Absolute URL md links
HonzaTuron Oct 1, 2025
3069e64
Merge remote-tracking branch 'origin/fix/alternate-absolute' into fix…
HonzaTuron Oct 1, 2025
15bfbbf
parse node url
HonzaTuron Oct 1, 2025
fd5936a
node startswith
HonzaTuron Oct 3, 2025
0eb7db2
Merge branch 'master' into fix/alternate-absolute
HonzaTuron Oct 3, 2025
e34bd78
return ''
HonzaTuron Oct 3, 2025
0752695
Merge remote-tracking branch 'origin/fix/alternate-absolute' into fix…
HonzaTuron Oct 3, 2025
c667bcb
correct pathname
HonzaTuron Oct 3, 2025
8328056
clean no pathname
HonzaTuron Oct 6, 2025
ae0ae18
Merge branch 'master' into fix/alternate-absolute
HonzaTuron Oct 6, 2025
1a069e0
no log
HonzaTuron Oct 6, 2025
760331e
Merge remote-tracking branch 'origin/fix/alternate-absolute' into fix…
HonzaTuron Oct 6, 2025
126f8af
feat: Add absolute url to API example
HonzaTuron Oct 6, 2025
f9e2026
feat: Add absolute url
HonzaTuron Oct 6, 2025
7349b82
Add llms desc
HonzaTuron Oct 6, 2025
b88dc97
Merge branch 'fix/alternate-absolute' into fix/api-full-urls
HonzaTuron Oct 9, 2025
4cd95b9
full api path
HonzaTuron Oct 9, 2025
0457c12
fix prefix for API markdowns
HonzaTuron Oct 9, 2025
4240ef9
add isInternal prefix
HonzaTuron Oct 9, 2025
9f298b2
boundary check
HonzaTuron Oct 9, 2025
08dffd3
simplify logic
HonzaTuron Oct 9, 2025
87dd10b
Merge branch 'master' into fix/api-full-urls
HonzaTuron Oct 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,29 @@ module.exports = {
if (node.title) return `[${node.title}](${url})`;
return url;
},
code: (node) => {
const apiMethods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'];
const splitValueLines = node.value.trim().split('\n');

splitValueLines.forEach((item, i) => {
if (apiMethods.some((method) => item.trim() === method)) {
// try to parse as URL, if successful, prefix with absolute URL
try {
const parsedUrl = parse(splitValueLines[i + 1]);
if (isInternal(parsedUrl, config.absoluteUrl) && parsedUrl.pathname) {
if (splitValueLines[i + 1]) splitValueLines[i + 1] = `https://api.apify.com${parsedUrl.pathname}`;
}
} catch {
// do nothing, leave the line as is
}
}
});

if (apiMethods.some((method) => node.value.trim().startsWith(method))) {
node.lang = node.lang?.toLowerCase();
}
return `\n\`\`\`${node.lang || ''}\n${splitValueLines.join('\n')}\n\`\`\`\n`;
},
},
},
excludeRoutes: [
Expand Down