Feat v0.4.3 backlinks wikilinks (#25)
All checks were successful
All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #25.
This commit is contained in:
41
CHANGELOG.md
41
CHANGELOG.md
@@ -2,6 +2,47 @@
|
||||
|
||||
All notable changes to Switchboard Core are documented here.
|
||||
|
||||
## v0.4.3 — Backlinks + Wikilinks
|
||||
|
||||
### Added
|
||||
|
||||
- **Links table** (`ext_notes_links`): source_id, target_id, link_text columns
|
||||
with indexes on source_id and target_id for bidirectional lookup.
|
||||
- **Wikilink extraction**: `_extract_wikilinks()` parses `[[...]]` patterns
|
||||
using `split("[[")` + `find("]]")` (Starlark has no regex or while loops).
|
||||
Returns deduplicated list of link text strings.
|
||||
- **Link sync on save**: `_sync_links()` called from `_create_note` and
|
||||
`_update_note` when body changes. Follows the tags delete-all + reinsert
|
||||
pattern. Resolves link text to note IDs via case-insensitive title matching.
|
||||
Unresolved links stored with empty `target_id`.
|
||||
- **Cascade delete**: Hard-deleting a note removes both outgoing links
|
||||
(source_id matches) and incoming backlinks (target_id matches).
|
||||
- **Link API endpoints**: `GET /links/:note_id` returns outgoing links.
|
||||
`GET /backlinks/:note_id` returns incoming links enriched with source note
|
||||
titles to avoid extra frontend round-trips.
|
||||
- **Wikilink preview rendering**: `[[Note Title]]` syntax renders as clickable
|
||||
accent-colored links in the markdown preview. Unresolved wikilinks styled
|
||||
in danger/red with dashed underline.
|
||||
- **Wikilink click navigation**: Clicking a resolved wikilink navigates to the
|
||||
target note. Clicking an unresolved wikilink creates the note and navigates
|
||||
to it, then re-saves the source note so the link resolves to blue.
|
||||
- **Backlinks panel**: Collapsible panel below the editor showing all notes
|
||||
that link to the current note. Each backlink displays source title and link
|
||||
text. Click to navigate. Hidden when no backlinks exist.
|
||||
- **Updated stats**: `/stats` response now includes `links` count.
|
||||
|
||||
### Data model
|
||||
|
||||
| Table | Columns |
|
||||
|-------|---------|
|
||||
| `ext_notes_links` | source_id, target_id, link_text |
|
||||
|
||||
### Notes package version
|
||||
|
||||
0.3.0 → 0.4.0
|
||||
|
||||
---
|
||||
|
||||
## v0.4.2 — Tags + Search
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user