Embed Content Block

Embed Content Block

Overview

The embed content block is mainly used to summarize the required content blocks, use {{ and }} to wrap SQL scripts on a single line: {{ SELECT * FROM blocks WHERE content LIKE'%Keyword%' }}, database table please refer to here. #Content Block/Embed#

Example

  • Query list items that contain content block:

    {{ SELECT * FROM blocks WHERE content LIKE '%content block%' AND type = 'i' }}
    
  • The query content contains both content block and reference paragraph blocks:

    {{ SELECT * FROM blocks WHERE content LIKE '%content block%' AND content LIKE '%reference%' AND type = 'p') }}
    
  • The query content contains heading blocks of both content block and embed, and the first 2 items are selected in descending order of update time:

    {{ SELECT * FROM blocks WHERE content LIKE '%content block%' AND content LIKE '%embed%' AND type ='h' ORDER BY updated DESC LIMIT 2 }}
    

Case 1

The query contains paragraph blocks of both In SiYuan and core concept text, and excludes the current document (otherwise the paragraph block will also be included in the result set, because the current paragraph also contains these two texts. The following case is similar):

In SiYuan, the only important core concept is Content block. The content block can be formed through the formatting format, so that we can organize our thoughts and knowledge at the block-level granularity, and it is also convenient for reading and outputting long content.

Case 2

Query for paragraph blocks containing the tag #Content Block/Embed#​ or #Content Block/Reference#​:

After entering ((, the content block reference search will be triggered. Continue to input as the search keyword. In the search results, use the up and down keys to select and press Enter to complete the content block reference. After the content block reference is established, hover the mouse. After the anchor text is placed, the preview layer will pop up, showing the referenced content block (definition block). #Content Block/Reference#

Case 3

Sometimes we may need to randomly roam and display content blocks to facilitate review.

Use .action{ .attribute }​ to access view properties

To exit the application, please use Exit the application​ in the right panel to exit normally. Swiping away directly will force the application to end, resulting in data synchronization not being executed

Environment variable SIYUAN_SYNC_INDEX_TIMING​, for example SIYUAN_SYNC_INDEX_TIMING=30000​, the unit is milliseconds

Case 4

To query the unfinished task list items, you need to use the markdown field instead of the content field:

posted @ 2026-01-07 16:15  就好这口  阅读(2)  评论(0)    收藏  举报