Skip to content

Conversation

@justbry
Copy link
Owner

@justbry justbry commented Oct 2, 2025

Summary

  • Fixes graph loading issue when SPACESHIP_BASE is set to "/"
  • The previous implementation created invalid URLs with triple slashes (///_spaceship/...) when the base path was root
  • Now properly normalizes the base path before constructing URLs

Changes

  • Modified GraphView.astro to normalize the base path before URL construction
  • When base="/" is provided, it's now properly handled to avoid creating malformed URLs

Related Issue

Fixes aitorllj93/astro-theme-spaceship#24

rmac added 2 commits October 2, 2025 14:24
## Features
- Add rehype-slug and rehype-autolink-headings to astro-spaceship
- Configure anchor links with link icon (instead of # symbol)
- Style anchor links to appear on hover with smooth fade transition
- Links use currentColor for proper theme integration

## Bug Fixes
- Add missing hast-util-from-html and hast-util-to-html dependencies to astro-loader-obsidian
  - These were already imported in obsidianEmbeds.ts but not declared in package.json
  - Required for Obsidian embed feature (![[note]] syntax)
- Add docs folder to pnpm workspace for proper local package linking

## Implementation
- Anchor links append a link icon SVG to headings (h1-h6)
- Icon inherits heading color and is hidden by default
- Visible on heading hover for better UX
- Creates shareable section URLs with hash anchors
Fixes graph loading issue when SPACESHIP_BASE is set to "/". The previous implementation created invalid URLs with triple slashes (///_spaceship/...) when the base path was root. Now properly normalizes the base path before constructing URLs.

Fixes aitorllj93#24
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.

[Bug]: Graph fails to load when `SPACESHIP_BASE="/"

2 participants