@larkiny/astro-github-loader 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -214,8 +214,10 @@ function transformLink(linkText, linkUrl, context) {
214
214
  }
215
215
  }
216
216
  }
217
- // No transformation needed - return processed URL
218
- return `[${linkText}](${processedNormalizedPath + anchor})`;
217
+ // No transformation matched - strip .md extension from unresolved internal links
218
+ // This handles links to files that weren't imported but should still use Starlight routing
219
+ const cleanPath = processedNormalizedPath.replace(/\.md$/i, '');
220
+ return `[${linkText}](${cleanPath + anchor})`;
219
221
  }
220
222
  /**
221
223
  * Global link transformation function
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@larkiny/astro-github-loader",
3
3
  "type": "module",
4
- "version": "0.11.0",
4
+ "version": "0.11.1",
5
5
  "description": "Load content from GitHub repositories into Astro content collections with asset management and content transformations",
6
6
  "keywords": [
7
7
  "astro",
@@ -316,8 +316,10 @@ function transformLink(linkText: string, linkUrl: string, context: LinkContext):
316
316
  }
317
317
  }
318
318
 
319
- // No transformation needed - return processed URL
320
- return `[${linkText}](${processedNormalizedPath + anchor})`;
319
+ // No transformation matched - strip .md extension from unresolved internal links
320
+ // This handles links to files that weren't imported but should still use Starlight routing
321
+ const cleanPath = processedNormalizedPath.replace(/\.md$/i, '');
322
+ return `[${linkText}](${cleanPath + anchor})`;
321
323
  }
322
324
 
323
325
  /**