mirror of
https://github.com/kepano/obsidian-skills.git
synced 2026-12-05 10:05:18 -08:00
Skills: Fix alias links, YAML wikilinks, tag rules, sort values and canvas writes
A bare [[Alias]] doesn't resolve, an unquoted [[Note]] in YAML is a nested list, a space ends a tag, and a sort direction other than ASC or DESC is dropped. Canvas files written through obsidian create content= get raw newlines inside JSON strings. Also documents colored highlights from 1.14.1, the blank line a table needs after a paragraph, and replaces the nonexistent Links property type with Tags.
This commit is contained in:
@@ -94,6 +94,8 @@ Nodes are objects placed on the canvas. Array order determines z-index: first no
|
||||
|
||||
**Quote escaping pitfall**: Double quotes inside `text` content must be escaped as `\"`. For example, the text `公司的"外交官"` must be stored as `"text": "公司的\"外交官\""`. Unescaped quotes break the JSON parse and the canvas will fail to render. When generating canvas JSON programmatically, always use a JSON serializer rather than manual string concatenation.
|
||||
|
||||
Write `.canvas` files directly. Don't create them with `obsidian create content=`, which turns every `\n` into a raw newline and breaks the JSON.
|
||||
|
||||
### File Nodes
|
||||
|
||||
| Attribute | Required | Type | Description |
|
||||
|
||||
@@ -273,7 +273,7 @@ views:
|
||||
|
||||
## Sorting
|
||||
|
||||
Sort results by one or more properties. Each sort entry specifies a `property` and `direction` (`ASC` or `DESC`). Multiple sort entries are applied in order — the first entry is the primary sort key, subsequent entries break ties.
|
||||
Sort results by one or more properties. Each sort entry specifies a `property` and `direction`, which must be uppercase `ASC` or `DESC`; an entry with any other value, or a sort written as a string, is silently ignored. Multiple sort entries are applied in order — the first entry is the primary sort key, subsequent entries break ties.
|
||||
|
||||
```yaml
|
||||
views:
|
||||
|
||||
@@ -27,7 +27,9 @@ Create and edit valid Obsidian Flavored Markdown. Obsidian extends CommonMark an
|
||||
[[Note Name#^block-id]] Link to block
|
||||
[[#Heading in same note]] Same-note heading link
|
||||
```
|
||||
Inside Markdown tables, escape wikilink alias pipes as `[[Note\|Alias]]` so the alias separator is not parsed as a table cell delimiter.
|
||||
Inside Markdown tables, escape wikilink alias pipes as `[[Note\|Alias]]` so the alias separator is not parsed as a table cell delimiter. When a table follows a paragraph, leave a blank line above it, or it renders as plain text.
|
||||
|
||||
Links resolve by file name, not by the `aliases` property. A bare `[[Alias]]` stays unresolved; write `[[Note|Alias]]` to show an alias.
|
||||
|
||||
Define a block ID by appending `^block-id` to any paragraph:
|
||||
|
||||
@@ -90,7 +92,7 @@ cssclasses:
|
||||
---
|
||||
```
|
||||
|
||||
Default properties: `tags` (searchable labels), `aliases` (alternative note names for link suggestions), `cssclasses` (CSS classes for styling).
|
||||
Default properties: `tags` (searchable labels), `aliases` (alternative names offered in link suggestions; links still use the file name), `cssclasses` (CSS classes for styling).
|
||||
|
||||
See [PROPERTIES.md](references/PROPERTIES.md) for all property types, tag syntax rules, and advanced usage.
|
||||
|
||||
@@ -101,7 +103,7 @@ See [PROPERTIES.md](references/PROPERTIES.md) for all property types, tag syntax
|
||||
#nested/tag Nested tag with hierarchy
|
||||
```
|
||||
|
||||
Tags can contain letters, numbers, underscores, hyphens, and forward slashes, but must include at least one non-numerical character (`#1984` is invalid, `#1984book` is valid). Tags can also be defined in frontmatter under the `tags` property.
|
||||
Tags can contain letters, numbers, underscores, hyphens, and forward slashes, but must include at least one non-numerical character (`#1984` is invalid, `#1984book` is valid). A space ends a tag, so `#my tag` is the tag `#my`. Tags can also be defined in frontmatter under the `tags` property.
|
||||
|
||||
## Comments
|
||||
|
||||
@@ -117,8 +119,11 @@ This entire block is hidden in reading view.
|
||||
|
||||
```markdown
|
||||
==Highlighted text== Highlight syntax
|
||||
==🔴Highlighted text== Colored highlight (Obsidian 1.14.1 and later)
|
||||
```
|
||||
|
||||
A colored highlight starts with 🔴, 🟠, 🟡, 🟢, 🔵 or 🟣 (or the matching square) right after `==`. Other emoji stay as text.
|
||||
|
||||
## Math (LaTeX)
|
||||
|
||||
```markdown
|
||||
|
||||
@@ -31,12 +31,14 @@ due: 2024-02-01T14:30:00
|
||||
| Date | `date: 2024-01-15` |
|
||||
| Date & Time | `due: 2024-01-15T14:30:00` |
|
||||
| List | `tags: [one, two]` or YAML list |
|
||||
| Links | `related: "[[Other Note]]"` |
|
||||
| Tags | Only for the `tags` property |
|
||||
|
||||
Links go in Text or List properties: `related: "[[Other Note]]"`. Always quote wikilinks in YAML, because an unquoted `[[Other Note]]` is read as a nested list, not a link.
|
||||
|
||||
## Default Properties
|
||||
|
||||
- `tags` - Note tags (searchable, shown in graph view)
|
||||
- `aliases` - Alternative names for the note (used in link suggestions)
|
||||
- `aliases` - Alternative names for the note, offered in link suggestions. A bare `[[Alias]]` doesn't resolve; write `[[Note|Alias]]`
|
||||
- `cssclasses` - CSS classes applied to the note in reading/editing view
|
||||
|
||||
## Tags
|
||||
@@ -48,7 +50,7 @@ due: 2024-02-01T14:30:00
|
||||
#tag_with_underscores
|
||||
```
|
||||
|
||||
Tags can contain: letters (any language), numbers (not first character), underscores `_`, hyphens `-`, forward slashes `/` (for nesting).
|
||||
Tags can contain: letters (any language), numbers, underscores `_`, hyphens `-`, forward slashes `/` (for nesting). A tag needs at least one non-numerical character (`#1984book`, not `#1984`), and a space ends it.
|
||||
|
||||
In frontmatter:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user