Mirror repo layout in cloud storage for symlink correctness#29
Merged
Conversation
**Breaking change** for existing instances β see migration note below.
Previously, cloud storage used a flat layout with `library-` prefixed names:
$LIBRARY_BASE/library-findings/
$LIBRARY_BASE/NAME/ (PDFs)
$LIBRARY_BASE/library-indexed/NAME/ (indexed output)
Now it mirrors the repo structure exactly:
$LIBRARY_BASE/findings/
$LIBRARY_BASE/collections/NAME/pdfs/
$LIBRARY_BASE/collections/NAME/indexed/
This makes relative links in findings/*.md (e.g. ../collections/NAME/indexed/SLUG/pages/page-N.png)
resolve correctly when apps (Typora, terminal Markdown viewers) resolve symlinks to their real
filesystem path rather than following the symlink path.
Files changed:
- init-symlinks.sh: update build_links() and header comments
- bootstrap.sh: update Phase 1 mkdir paths
- README.md: update cloud layout diagram and LINKS override example
- .env.template: update LIBRARY_BASE description
Migration for existing instances:
1. In cloud storage, rename/move:
library-findings/ β findings/
NAME/ β collections/NAME/pdfs/
library-indexed/NAME/ β collections/NAME/indexed/
2. Remove existing repo symlinks
3. Run ./init-symlinks.sh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
findings/*.mdnot resolving in Typora and other apps that resolve symlinks to their real pathinit-symlinks.sh,bootstrap.sh,README.md, and.env.templateWhat changed
Before β flat layout with
library-prefixed names:After β mirrors repo layout:
Why
Relative links in
findings/*.mduse paths like../collections/NAME/indexed/SLUG/pages/page-N.png.When apps resolve the
findings/symlink to its real path before computing relative links,../collections/resolves to a path that doesn't exist under the old flat layout. The new layout makes the real paths
siblings, so relative links work everywhere.
Breaking change β migration for existing instances
Moves within the same cloud storage account are instant (server-side rename) β no re-upload needed.