You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/050-command-reference.md
+49-48
Original file line number
Diff line number
Diff line change
@@ -149,18 +149,42 @@ Serendipity commands are commands that help resolve to a random block from your
149
149
150
150
-`<%RANDOMBLOCKMENTION:Evergreen Notes%>`
151
151
152
-
## RANDOMCHILDOF
152
+
## RANDOMCHILDOFMENTION
153
+
154
+
_Previously called `RANDOMCHILDOF`_
153
155
154
156
**Purpose**: Returns a random child block of a block that's referencing the input page
155
157
156
-
**Parameters**: One parameter that could be either:
158
+
**Parameters**:
159
+
160
+
1. One parameter that could be either:
161
+
- Option 1: **Page name** or **tag name** (brackets `[[]]` or hashtag `#` are optional)
162
+
- Option 2: Parent block UID
163
+
2. Levels within the page to include. Specifying 0 includes all blocks
164
+
3. Format to output the block in. See our [Formatting](050-command-reference.md#formatting) section for more info.
165
+
4. Optional filter parameter. See our [Filtering](050-command-reference.md#filtering) section for more info.
166
+
167
+
**Examples**:
168
+
169
+
-`<%RANDOMCHILDOFMENTION:Evergreen Notes%>`
170
+
-`<%RANDOMCHILDOFMENTION:[[ONE BLOG POST A DAY/Candidates]],1,{{embed-path:(({uid}))}},-[[DONE]]%>`
157
171
158
-
- Option 1: **Page name** or **tag name** (brackets `[[]]` or hashtag `#` are optional)
159
-
- Option 2: Parent block UID
172
+
## FIRSTCHILDOFMENTION
160
173
161
-
**Example**:
174
+
**Purpose**: Returns the first child block of a block that's referencing the input page
162
175
163
-
-`<%RANDOMCHILDOF:Evergreen Notes%>`
176
+
**Parameters**:
177
+
178
+
1. One parameter that could be either:
179
+
- Option 1: **Page name** or **tag name** (brackets `[[]]` or hashtag `#` are optional)
180
+
- Option 2: Parent block UID
181
+
2. Format to output the block in. See our [Formatting](050-command-reference.md#formatting) section for more info.
182
+
3. Optional filter parameter. See our [Filtering](050-command-reference.md#filtering) section for more info.
183
+
184
+
**Examples**:
185
+
186
+
-`<%FIRSTCHILDOFMENTION:Evergreen Notes%>`
187
+
-`<%FIRSTCHILDOFMENTION:[[ONE BLOG POST A DAY/Candidates]],{{embed-path:(({uid}))}},-[[DONE]]%>`
164
188
165
189
## RANDOMNUMBER
166
190
@@ -197,13 +221,7 @@ TODO commands are multi-block commands that query multiple TODOs from your graph
197
221
198
222
1. Maximum amount of block references to return. Default value is `20`
199
223
2. Format to output the block in. See our [Formatting](050-command-reference.md#formatting) section for more info.
200
-
3. optional filter parameter based on a comma separated list (case-sensitive). Can use - in front of a word to exclude it. Examples:
201
-
- toRead,Pinnacle
202
-
- returns blocks with toRead AND Pinnacle in the text
203
-
- toRead|Pinaccle
204
-
- returns blocks with toRead OR Pinnacle in the text
205
-
- toRead,-Pinnacle
206
-
- returns blocks with toRead but not if they have pinnacle
224
+
3. Optional filter parameter. See our [Filtering](050-command-reference.md#filtering) section for more info.
207
225
208
226
**Example**: `<%TODOTODAY:20,(({uid}))%>`
209
227
@@ -215,13 +233,9 @@ TODO commands are multi-block commands that query multiple TODOs from your graph
215
233
216
234
1. Maximum amount of block references to return. Default value is `20`
217
235
2. Format to output the block in. See our [Formatting](050-command-reference.md#formatting) section for more info.
218
-
3. optional filter parameter based on a comma separated list (case-sensitive). Can use - in front of a word to exclude it. Examples:
219
-
- toRead,Pinnacle
220
-
- returns blocks with toRead AND Pinnacle in the text
221
-
- toRead|Pinaccle
222
-
- returns blocks with toRead OR Pinnacle in the text
223
-
- toRead,-Pinnacle - returns blocks with toRead but not if they have pinnacle
224
-
**Examples**: `<%TODOOVERDUE:20,(({uid}))%>`
236
+
3. Optional filter parameter. See our [Filtering](050-command-reference.md#filtering) section for more info.
237
+
238
+
**Examples**: `<%TODOOVERDUE:20,(({uid}))%>`
225
239
226
240
## TODOOVERDUEDNP
227
241
@@ -231,13 +245,7 @@ TODO commands are multi-block commands that query multiple TODOs from your graph
231
245
232
246
1. Maximum amount of block references to return. Default value is `20`
233
247
2. Format to output the block in. See our [Formatting](050-command-reference.md#formatting) section for more info.
234
-
3. optional filter parameter based on a comma separated list (case-sensitive). Can use - in front of a word to exclude it. Examples:
235
-
- toRead,Pinnacle
236
-
- returns blocks with toRead AND Pinnacle in the text
237
-
- toRead|Pinaccle
238
-
- returns blocks with toRead OR Pinnacle in the text
239
-
- toRead,-Pinnacle
240
-
- returns blocks with toRead but not if they have pinnacle
248
+
3. Optional filter parameter. See our [Filtering](050-command-reference.md#filtering) section for more info.
241
249
242
250
**Examples**: `<%TODOOVERDUEDNP:20,(({uid}))%>`
243
251
@@ -249,13 +257,7 @@ TODO commands are multi-block commands that query multiple TODOs from your graph
249
257
250
258
1. Maximum amount of block references to return. Default value is `20`
251
259
2. Format to output the block in. See our [Formatting](050-command-reference.md#formatting) section for more info.
252
-
3. optional filter parameter based on a comma separated list (case-sensitive). Can use - in front of a word to exclude it. Examples:
253
-
- toRead,Pinnacle
254
-
- returns blocks with toRead AND Pinnacle in the text
255
-
- toRead|Pinaccle
256
-
- returns blocks with toRead OR Pinnacle in the text
257
-
- toRead,-Pinnacle
258
-
- returns blocks with toRead but not if they have pinnacle
260
+
3. Optional filter parameter. See our [Filtering](050-command-reference.md#filtering) section for more info.
259
261
260
262
**Examples**:`<%TODOFUTURE:20,(({uid}))%>`
261
263
@@ -267,13 +269,7 @@ TODO commands are multi-block commands that query multiple TODOs from your graph
267
269
268
270
1. Maximum amount of block references to return. Default value is `20`
269
271
2. Format to output the block in. See our [Formatting](050-command-reference.md#formatting) section for more info.
270
-
3. optional filter parameter based on a comma separated list (case-sensitive). Can use - in front of a word to exclude it. Examples:
271
-
- toRead,Pinnacle
272
-
- returns blocks with toRead AND Pinnacle in the text
273
-
- toRead|Pinaccle
274
-
- returns blocks with toRead OR Pinnacle in the text
275
-
- toRead,-Pinnacle
276
-
- returns blocks with toRead but not if they have pinnacle
272
+
3. Optional filter parameter. See our [Filtering](050-command-reference.md#filtering) section for more info.
277
273
278
274
**Examples**: `<%TODOFUTUREDNP:20,(({uid}))%>`
279
275
@@ -285,13 +281,7 @@ TODO commands are multi-block commands that query multiple TODOs from your graph
285
281
286
282
1. Maximum amount of block references to return. Default value is `20`
287
283
2. Format to output the block in. See our [Formatting](050-command-reference.md#formatting) section for more info.
288
-
3. optional filter parameter based on a comma separated list (case-sensitive). Can use - in front of a word to exclude it. Examples:
289
-
- toRead,Pinnacle
290
-
- returns blocks with toRead AND Pinnacle in the text
291
-
- toRead|Pinaccle
292
-
- returns blocks with toRead OR Pinnacle in the text
293
-
- toRead,-Pinnacle
294
-
- returns blocks with toRead but not if they have pinnacle
284
+
3. Optional filter parameter. See our [Filtering](050-command-reference.md#filtering) section for more info.
295
285
296
286
**Examples**: `<%TODOUNDATED:20,(({uid}))%>`
297
287
@@ -1383,3 +1373,14 @@ Several commands support a "Format" argument that allow you to specify exactly h
1383
1373
-`{path}` - resolves to the uids of blocks that are parents of the current block, delimited by `>`
1384
1374
-`{attr:name:format}` - resolves the attribute value of the attribute found on the page with the block. Replace `name` with the name of the attribute. The `format` is optional and could be used to specify additional text that only appears if the attribute is on the page.
1385
1375
-`{text}` - resolves to the raw text of the block
1376
+
1377
+
## Filtering
1378
+
1379
+
Several commands support an optional filter parameter based on a comma separated list (case-sensitive). Can use `-` in front of a word to exclude it. Examples:
1380
+
1381
+
- toRead,Pinnacle
1382
+
- returns blocks with toRead AND Pinnacle in the text
1383
+
- toRead|Pinaccle
1384
+
- returns blocks with toRead OR Pinnacle in the text
1385
+
- toRead,-Pinnacle
1386
+
- returns blocks with toRead but not if they have pinnacle
0 commit comments