Use case or problem
I want to be able to leverage the full power of the Bases plugin at a local level (standalone .base file or embedded in a note). This will allow me to use a data source that is only relevant to the Base itself and save us from littering the vault and its index with small notes that have no value on their own.
Proposed solution
MVP would be to allow a source to be defined in a Base. The source would effectively function as the front matter source for what would have been individual notes. The source can be inlined, or in a separate file. No self-referential internal linking in the source would be supported, but internal links to other notes in the vault would still be supported.
An explicit contract could be defined with users that a separate index would be maintained for the local source and will not be usable in any scope outside of the Base itself. This would be done for clarity and to avoid confusion as to why entries in a Base are not visible in Quick switcher, search results, graph view, etc.
The file property could be null, or the provide the same information as the standalone Base or the note the Base is embedded in. My suggestion would be to leave it as null since it would both be less confusing to use and serve as a reminder that this is not a normal Base.
Inline Source
The source key could be an array of front matter objects.
formulas:
Thing: link(subject, subject.asFile().properties.aliases[0])
properties:
note.rating:
displayName: Rating
views:
- type: table
name: All
order:
- rating
- formula.Thing
columnSize:
note.rating: 100
source:
- { rating: "āļøāļøāļøāļøā", subject: "[[A Restaurant]]", tags: ["food/bbq"] }
- { rating: "āļøāļøāļøāā", subject: "[[A Movie]]", tags: ["entertainment/horror"] }
- { rating: "āļøāļøāāā", subject: "[[A TV Show]]", tags: ["entertainment/scifi"] }
File Source
The source key could be a path in the vault to a JSON or YAML encoded file. The file contents would be an array of front matter objects.
Reviews.base
formulas:
Thing: link(subject, subject.asFile().properties.aliases[0])
properties:
note.rating:
displayName: Rating
views:
- type: table
name: All
order:
- rating
- formula.Thing
columnSize:
note.rating: 100
source: Reviews.json
Reviews.json
[
{ rating: "āļøāļøāļøāļøā", subject: "[[A Restaurant]]" },
{ rating: "āļøāļøāļøāā", subject: "[[A Movie]]" },
{ rating: "āļøāļøāāā", subject: "[[A TV Show]]" }
]
Reviews.yaml
- rating: "āļøāļøāļøāļøā"
subject: "[[A Restaurant]]"
tags:
- "food/bbq"
- { rating: "āļøāļøāļøāā", subject: "[[A Movie]]", tags: ["entertainment/horror"] }
- { rating: "āļøāļøāāā", subject: "[[A TV Show]]", tags: ["entertainment/scifi"] }
Current workaround (optional)
None, this functionality cannot be approximated.
Related feature requests (optional)
None.