Skip to content

atlas -- magic links#9

Open
joshribakoff wants to merge 14 commits intomainfrom
atlas-magic-links
Open

atlas -- magic links#9
joshribakoff wants to merge 14 commits intomainfrom
atlas-magic-links

Conversation

@joshribakoff
Copy link
Owner

Summary

  • Accept collections array directly instead of requiring urlBuilder
  • Default URL pattern: /${slug}/ (global ID like Wikipedia)
  • Optional urlPattern callback for custom URL generation
  • Add prior art table and design philosophy to README

Prior Art Research

Added comparison table showing how other tools handle internal links:

Tool Model
Wikipedia Global titles
Obsidian Global filenames
Org-mode Multiple ID types with priority
Docusaurus Relative paths only
Hugo Shortcodes
Starlight Standard markdown

Design Philosophy

Full Astro routing compatibility is a non-goal. Atlas assumes globally unique IDs.

Test plan

  • 10 new tests for collections API
  • All 39 tests passing

🤖 Generated with Claude Code

joshribakoff and others added 14 commits December 14, 2025 21:49
Wikipedia-style magic links with build-time resolution for markdown.

Features:
- Link resolver with priority: exact ID → aliases → slug → unresolved
- Remark plugin supporting [:id] and [[id]] syntax
- Fallback IDs: [:id1|:id2] tries each until one resolves
- Custom display text: [[id|Display Text]]
- Graceful degradation: unresolved links become plain text
- Placeholder support with custom CSS class
- Link checker for detecting broken links in content

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove complex target registry, link resolver, and link checker.
The plugin now just transforms [[id]] syntax using a urlBuilder callback.

- Delete link-resolver.ts, link-checker.ts, types.ts
- Simplify remark-magic-links.ts to ~100 lines
- Update tests with synthetic data
- Update README

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Verify AST-based parsing handles arbitrary nesting levels (1-5) with
alternating list/blockquote containers around code blocks and inline code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace simple /concepts/ example with a fun pet store catalog
showing how urlBuilder enables routing to different paths per
content type. Add error handling example and link to tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document that wiki-link syntax works natively in Neovim,
Obsidian, and VS Code - content is navigable without building.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the lineage: MediaWiki, Org mode, Roam/Obsidian.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove definitive language like "origin of" - just list examples.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Accept `collections` array directly instead of requiring `urlBuilder`
- Default URL pattern: `/${slug}/` (global ID like Wikipedia)
- Optional `urlPattern` callback for custom URL generation
- Add prior art table and design philosophy to README
- Add 10 new tests for collections API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add createSlugResolver in node.ts for filesystem-based slug resolution
- Add onBrokenLink config: 'throw' (default), 'warn', 'ignore'
- Add standalone checkLinks() for fast feedback during authoring
- Update package description to "Wikipedia-style magic links with broken link detection"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@joshribakoff joshribakoff changed the title Add collections API for automatic URL resolution atlas -- magic links Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant