Change anchor reference syntax

This commit is contained in:
Zef Hemel
2023-11-03 12:01:33 +01:00
parent 28b0e9f9e9
commit e0b6fbed3e
20 changed files with 47 additions and 31 deletions
+3 -1
View File
@@ -1 +1,3 @@
Anchor represent named locations within a page and are defined using the $anchor syntax. They can then be referenced withing the page using [[@anchor]], or cross-page via [[Anchors@anchor]].
Anchor represent named locations within a page and are defined using the $anchor syntax. They can then be referenced withing the page using [[$anchor]], or cross-page via [[Anchors$anchor]].
The legacy syntax is to use `@` instead of `$` for referencing, which is still supported but deprecated.
+3 -1
View File
@@ -6,8 +6,10 @@ release.
* Many styling fixes and improvements to [[Live Queries]] and [[Live Templates]]
* Added a “source” button to [[Live Queries]] and [[Live Templates]] for better debugging (showing you the markdown code rendered by the template so you can more easily detect issues)
* [[Live Queries]]:
* Support for `render all` where the entire result set is passed to a single template allowing you to e.g. dynamically build up tables, see [[Live Queries@render]] for an example.
* Support for `render all` where the entire result set is passed to a single template allowing you to e.g. dynamically build up tables, see [[Live Queries$render]] for an example.
* The default generated [[SETTINGS]] page now contains a link to [[SETTINGS]] on silverbullet.md for documentation purposes.
* The syntax to reference [[Anchors]] has now changed to use `$`, instead of `@` (e.g. [[Live Queries$render]]), the old syntax still works but is deprecated. The reason for this change is consistency: you define an anchor using the `$myanchor` syntax, referencing it the same way makes more sense.
* [[Page Name Rules]] are now documented
---
## 0.5.3
+6
View File
@@ -0,0 +1,6 @@
A few rules regarding page names:
* Page names cannot be empty
* Page names cannot start with a `.`
* Page names cannot `@` or `$`, due to ambiguity with referencing specific positions or anchors inside a page
* Page names cannot end with a _file extension_ containing just letters. That is, a page name like `test.md` is not allowed, whereas `test.123` would be.
-1
View File
@@ -7,4 +7,3 @@ Here are the current list of “special pages” known to humankind:
* [[SETTINGS]] for setting various settings
* [[PLUGS]] as a source for the plug manager to decide what plugs to load and where from
* [[VIMRC]] for tweaking [[Vim]] mode
* [[STYLES]] to override SilverBullet CSS styles (experimental)