Queries are placeholders for dynamic content in Markdown. The result of the query is calculated and displayed dynamically at runtime, whereby only the query syntax and not the result is stored in the Markdown file on disk.
Queries are particularly suitable for three problems:
- Content that changes continuously over time and where the references should be dynamically adapted across all pages. For example, "Which todos for the tag "myTag" are not yet completed?" or "which subpages does the page myTag have?".
- Content that is not stored in the Markdown file, but should be displayed in the Markdown file. For example, "Insert the content of the file myFile.asdf as a code block" or "Insert the content of the file myFile.mp4 as a video".
- Content that is not supported by the Markdown standard, but should be displayed in the Markdown file. For example, " Insert a video" or "Insert an audio file".
Currently,all queries must be inserted exactly as described. Parameters cannot yet be swapped or omitted.
Query Board
Quick example.
{query: board title:"My first Kanban" tag:"kanban" columnKey:"state" columnValues:"TODO,DOING,DONE" priorityKey:"priority" display:"link" }
The query generates a link that points to a suitably configured board.
For more information, see Boards.
Query Page Hierarchy
Quick examples:
Show a list of links
{query: page-hierarchy root:"myRootTag" display:"inplace-list" }
Show the count
{query: page-hierarchy root:"myRootTag" display:"count" }
Display types:
- inplace-list
- Creates a list of the selected pages in the markdown-block. Each item is prefixed with a icon, and the location as link. The list is not modifiable.
- Query without trailing slash

- Result

- Query with trailing slash

- Result

- count
- Creates a number of the selected pages in the markdown-block.
- Query

- Result

Query Todo Progress
Quick example
- Query
{query: todo-progress tag:"myTag" }
- Result

Query Todos
Quick examples:
Show a list of todos with a checkbox and a link to the source file. The list is appended to the end of the current block
{query: todos tag:"myTag" state:"todo" display:"referenced-list" }
Show a list of todos (not modifiable, but renders in place)
{query: todos tag:"myTag" state:"todo" display:"inplace-list"}
Show the count of todos
{query: todos tag:"myTag" state:"todo" display:"count" }
Show done todos
{query: todos tag:"myTag" state:"done" display:"referenced-list" }
Display-types:
-
referenced-list
-
Creates a list of the selected todos at the end of the current block. Each item contains a checkbox and a link to the source file. If the checkbox is clicked, the todo is marked as done. Query-results can be stacked.
-
Query

-
Result

-
-
inplace-list
-
Creates a list of the selected todos in the markdown-block. Each item is prefixed with a icon. The list is not modifiable.
-
Query

-
Result

-
Result (done)

-
-
count
-
Creates a number of the selected todos in the markdown-block.
-
Query

-
Result

-
Query Backlinks
Show a list of backlinks
{query: references-to tag:"myTag" display:"referenced-list" }
Show the count
{query: references-to tag:"myTag" display:"count" }
Query Render Assets ("insert-content-from-file")
Insert the content of a file as text block
{query: insert-file-content target-file:"myFile.asdf" display:"inline-text" }
Insert the content of a file as code block, and highlight the code
{query: insert-file-content target-file:"myFile.asdf" display:"code-block" }
Insert a video
{query: insert-file-content target-file:"myFile.mp4" display:"video" }
Insert an audio file
{query: insert-file-content target-file:"myFile.ogg" display:"audio" }
Query Blocks
-
Inserts a blocks, that contain a certain tag
-
card
-
Creates a card for every matching block int the markdown. The filename and block-index is rendered at the top of the card (and link), the content of the block is rendered in the body of the card.
-
Query:
{query: blocks tag:"Pizza Rating" display:"cards" }- Result:

- Result:
-
-
paragraphs
-
Creates a section for every matching block in the markdown. The filename and block-index is rendered as headline ( and link), the content of the block is rendered as paragraph. Paragraphs are separated by a horizontal line. Good for multi-line blocks
-
Query

-
Result

-
-
inplace-list
-
Creates a list of the selected blocks in the markdown-block. Each item is prefixed with a list-icon. Best suited for single-line blocks.
-
Query

-
Result

-
-
referenced-list
-
Creates a list of the selected blocks at the end of the current block. Each item contains a link to the source file. Different query-results can be stacked. Good for multi-line blocks
-
Query

-
Result

-
-
count
- Creates a number of the selected blocks in the markdown-block.