const page = await logseq.Editor.getCurrentPage();
const currentPageName = await page?.name;
// 查询当前页面的标签
const tags: [string, string, BlockEntity][] = await logseq.DB.datascriptQuery(`
[:find ?content ?tag (pull ?b [*])
:where
[?b :block/refs ?page-ref]
[?b :block/content ?content]
[?page-ref :block/name ?tag]
[?page-ref :block/page ${currentPageName}]
]
`);