Implementation of Remark Backlinks Plugin for Internal Markdown Links

litegal
![[Visuals/Screenshots/Screenshot 2025-02-22 at 9.03.38 PM_AugmentCode--Hero.png]]
![[Screenshot 2025-02-20 at 7.57.47 PM_GitHub-Copilot--Getting-Started.png]]
![[Screenshot 2025-02-18 at 10.12.46 AM_Railway--Hero.png]]
![[Visuals/Heroes/Screenshot 2025-02-20 at 1.44.14 AM_Dify--Hero.png]]
![[Visuals/Heroes/Screenshot 2025-02-20 at 11.33.53 PM_Jazz--Hero.png]]
litegal
![[Visuals/Screenshots/Screenshot 2025-01-22 at 1.55.42 PM_Ulysses.png]]
![[Visuals/Screenshots/Screenshot 2025-01-20 at 11.51.48 AM_VS-Code.png]]

Changes Implemented

  1. Removed Legacy Configuration
    • Deleted: src/utils/markdown/marked-config.ts
    • Reason: Transitioning from Marked to Remark for enhanced markdown processing
  2. Added Remark Backlinks Support Successfully implemented backlink processing for the following formats:
    • Basic wiki-style: [[content/tooling/filename]]
    • Custom display text: [[path/to/file|Display Text]]
    • Nested paths: [[content/lost-in-public/prompts/file]]
    • Case-insensitive matching: [[Content/Specs/file]]

Testing Results

Verified successful transformation of various link formats:
markdown
[[content/tooling/Some File Name]] -> Correct path resolution
[[content/tooling/Some Other File|Custom Display Text]] -> Display text preserved
[[content/lost-in-public/prompts/user-interface/Some Deep File]] -> Nested paths working
[[content/Specs/API Documentation/Auth Flow]] -> Case handling verified
  • Axolotl AI (Fixed closing delimiter placement)
  • Carbon (Fixed closing delimiter placement)
  • Midori AI (Fixed closing delimiter placement)
  • Noan (Fixed closing delimiter placement)
  • Uberduck (Fixed closing delimiter placement)
  • Gradio (Fixed closing delimiter placement)

Technical Details

  • Plugin: Remark Backlinks Plugin
  • Integration: Astro markdown configuration
  • Scope: All internal markdown content

Validation

Tested with various link formats including:
  • Standard wiki-style links
  • Links with custom display text
  • Deeply nested path references
  • Mixed case and space-containing paths
All link formats now render correctly in the Astro build.
Testing various link formats:
  1. Simple backlink: Some File Name
  2. Backlink with display text: Custom Display Text
  3. Nested path: Some Deep File
  4. Mixed case with spaces: Auth Flow
  5. Regular markdown link: External Link
Let's see how these are processed by our marked configuration!
  • Pagefind (Fixed closing delimiter placement)
  • PrismJS (Fixed closing delimiter placement)
  • Stow (Fixed closing delimiter placement)
  • Zustand (Fixed closing delimiter placement)
  • Floorp (Fixed closing delimiter placement)
  • Glarity (Fixed closing delimiter placement)