docs: adding documentation for inline blocks

This commit is contained in:
Kacper Kula 2025-01-10 11:15:07 +00:00
parent 3c833abbff
commit 470fcb42fc
3 changed files with 20 additions and 1 deletions

View file

@ -20,6 +20,7 @@ export default defineConfig({
{ text: 'Changing Render Methods', link: '/changing-render-method'},
{ text: 'Using properties', link: '/using-properties' },
{ text: 'Query Vault Content', link: '/query-vault-content' },
{ text: 'Inline codeblocks', link: '/inline-codeblocks' },
{ text: 'Links and Images', link: '/links-and-images' },
{ text: 'CSV Viewer', link: '/csv-viewer'},
{ text: 'Troubleshooting', link: '/troubleshooting' },

BIN
docs/inline-block.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -1,2 +1,20 @@
# Inline Codeblocks
SQLSeal supports inline codeblocks. This allows you to put data inline in your note as if it's part of the sentence.
SQLSeal supports inline codeblocks. This allows you to put data inline with your text so you can use results of your queries as part of the sentence.
![Example of inline block](./inline-block.png)
## Creating inline block
Inline block should start with `S>` to indicate you want to create SQLSeal query. Then it should contain SQL query returning single value.
## Example queries
Here are example queries operating on files in your vault:
### Number of files in your vault
`S> SELECT COUNT(*) FROM files`
### Number of tags in your vault
`S> SELECT COUNT(DISTINCT tag) FROM tags`
### Completed tasks accross your vault
`S> SELECT COUNT(*) FROM tasks WHERE completed=1`