Skip to content

Commit b88dc97

Browse files
authored
Merge branch 'fix/alternate-absolute' into fix/api-full-urls
2 parents 126f8af + 7349b82 commit b88dc97

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docusaurus.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ module.exports = {
283283
'@signalwire/docusaurus-plugin-llms-txt',
284284
/** @type {import('@signalwire/docusaurus-plugin-llms-txt').PluginOptions} */
285285
({
286+
siteDescription: 'The entire content of Apify documentation is available in a single Markdown file at https://docs.apify.com/llms-full.txt',
286287
content: {
287288
includeVersionedDocs: false,
288289
enableLlmsFullTxt: true,
@@ -296,7 +297,7 @@ module.exports = {
296297
if (node.title?.startsWith('Direct link to')) return '';
297298

298299
const parsedUrl = parse(node.url);
299-
const isUrlInternal = isInternal(parsedUrl);
300+
const isUrlInternal = isInternal(parsedUrl, config.absoluteUrl);
300301
const url = isUrlInternal ? `${config.absoluteUrl}${parsedUrl.pathname}.md` : node.url;
301302

302303
if (isUrlInternal && !parsedUrl.pathname) return '';

tools/utils/externalLink.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const internalUrl = 'docs.apify.com';
77
/**
88
* @param {import('url').UrlWithStringQuery} href
99
*/
10-
exports.isInternal = (href) => {
11-
return href.host === internalUrl || (!href.protocol && !href.host && (href.pathname || href.hash));
10+
exports.isInternal = (href, hostName) => {
11+
return href.host === hostName || (!href.protocol && !href.host && (href.pathname || href.hash));
1212
};
1313

1414
/**
@@ -24,7 +24,7 @@ exports.externalLinkProcessor = () => {
2424
) {
2525
const href = parse(node.properties.href);
2626

27-
if (!exports.isInternal(href)) {
27+
if (!exports.isInternal(href, internalUrl)) {
2828
node.properties.target = '_blank';
2929
node.properties.rel = 'noopener';
3030
} else {

0 commit comments

Comments
 (0)