feat: Add aliases support to Story Bible for flexible linking
- Add aliases field to StoryBibleItem struct - Add items_by_alias HashMap to StoryBibleIndex for quick alias lookup - Add find_by_alias() method and update find_by_partial_name() to search aliases - Parse aliases from YAML frontmatter (list and comma-separated formats) - Update find_references() to match aliases in addition to IDs and names - Fix @mention pattern matching to properly stop at spaces - Add comprehensive tests for aliases functionality - Update README.md with aliases documentation and usage examples This allows Story Bible entries to have alternative names that can be referenced in draft text using wiki-style [[...]] or mention-style @ syntax. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -383,13 +383,27 @@ location, lore, and other reference directories. It supports:
|
||||
* **Purple background highlighting** of Story Bible references in the editor
|
||||
* Click items in the Story Bible window to see all references to them in the current file
|
||||
* Click reference buttons to jump directly to that location in the editor
|
||||
* Metadata extraction from YAML frontmatter (id, title, type fields) or from filenames
|
||||
* Metadata extraction from YAML frontmatter (id, title, type, **aliases** fields) or from filenames
|
||||
* Case-insensitive search and lookup
|
||||
* **Aliases support**: References match item IDs, names, **and aliases** for flexible linking
|
||||
|
||||
Character sheets in the `Characters` folder are automatically indexed, and any
|
||||
markdown file with YAML frontmatter containing `id:` and `title:` fields will be
|
||||
included in the index. References in your draft text that match Story Bible items
|
||||
are highlighted and clickable.
|
||||
included in the index. You can also add an `aliases:` field with alternative names
|
||||
for a character or item:
|
||||
|
||||
```yaml
|
||||
---
|
||||
id: john_smith
|
||||
title: "John Smith"
|
||||
type: character
|
||||
aliases: ["Johnny", "JS"]
|
||||
---
|
||||
```
|
||||
|
||||
With aliases defined, references like `[[Johnny]]` or `@JS` will match the "John Smith"
|
||||
character entry. References in your draft text that match Story Bible items
|
||||
by ID, name, or alias are highlighted and clickable.
|
||||
|
||||
### Story Bible Editor (Edit ▸ Story Bible…)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user