<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>思源笔记用户指南</title>
        <link>https://siyuannote.com/</link>
        <description>思源笔记用户指南</description>
        <lastBuildDate>Thu, 06 Aug 2026 02:03:45 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2026, NULL</copyright>
        <item>
            <title><![CDATA[AI 智能体]]></title>
            <link>https://siyuannote.com/article/1724604650</link>
            <guid>https://siyuannote.com/article/1724604650</guid>
            <pubDate>Thu, 31 Oct 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[本文介绍了思源笔记的AI功能，包括安装、配置、编写动作和调用操作，以及一些AI相关的插件。思源笔记可以与openAI接口交互，生成翻译、对话等结果，但不支持对话式的AI操作。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-141f201d59b94554b9489ae9fb447c33"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1eeb972d88a14d1aa6898dc71b2330e3" data-id="1eeb972d88a14d1aa6898dc71b2330e3"><span><div id="1eeb972d88a14d1aa6898dc71b2330e3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1eeb972d88a14d1aa6898dc71b2330e3" title="使用方式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用方式</span></span></h2><figure class="notion-asset-wrapper notion-asset-wrapper-video notion-block-3af1f4284fb48041b469fe68b91ae860"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:708px;max-width:100%;flex-direction:column;height:320px"><video playsinline="" controls="" preload="metadata" src="https://file.notion.so/f/f/40540135-047b-4ab2-97fa-10bd328545fd/428fa930-54d6-4905-83f6-151bdd35c105/PixPin_2026-08-01_19-23-22.mp4?table=block&amp;id=3af1f428-4fb4-8041-b469-fe68b91ae860&amp;spaceId=40540135-047b-4ab2-97fa-10bd328545fd&amp;expirationTimestamp=1786010400000&amp;signature=j6RweU859mKiKY3QUuxM72COsZyNHRuIvlmtnVDQFvs" title="video"></video></div></figure><div class="notion-blank notion-block-81df1849a448486c9dda4a141692cc1b"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-12f1f4284fb48019b3bbe6bb074bcaaf" data-id="12f1f4284fb48019b3bbe6bb074bcaaf"><span><div id="12f1f4284fb48019b3bbe6bb074bcaaf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12f1f4284fb48019b3bbe6bb074bcaaf" title="AI模型服务商（AIHUB）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">AI模型服务商（AIHUB）</span></span></h2><div class="notion-text notion-block-3af1f4284fb4800f8680eee4fa13b529">1️⃣  便宜且相对稳定的 Token，Codex 低至 0.03x
2️⃣ 监控多渠道随时切换，十几家几乎源头的渠道
3️⃣ 供应商大厅透明
4️⃣ C 端服务专注做好

链接：<a class="notion-link" href="https://aihub.top/register?aff=YPJ9WK6QW5PY" target="_blank" rel="noopener noreferrer">https://aihub.top/register?aff=YPJ9WK6QW5PY</a></div><div class="notion-blank notion-block-3af1f4284fb48038aa2eef2ae229e3d3"> </div><div class="notion-text notion-block-3af1f4284fb4801f8459fdf02dda288b">1 注册AI服务商并创建API，（<a class="notion-link" href="https://aihub.top/register?aff=YPJ9WK6QW5PY" target="_blank" rel="noopener noreferrer">直达</a>）</div><figure class="notion-asset-wrapper notion-asset-wrapper-video notion-block-3af1f4284fb4808298adcf313f8deaec"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:708px;max-width:100%;flex-direction:column;height:320px"><video playsinline="" controls="" preload="metadata" src="https://file.notion.so/f/f/40540135-047b-4ab2-97fa-10bd328545fd/6310eea9-9a25-4cf4-8259-e0ff7fff71c3/%E6%B3%A8%E5%86%8C.mp4?table=block&amp;id=3af1f428-4fb4-8082-98ad-cf313f8deaec&amp;spaceId=40540135-047b-4ab2-97fa-10bd328545fd&amp;expirationTimestamp=1786010400000&amp;signature=YEKCaDz9IXPliDESwR2HsuAxbLWUU79-491VRL-QZYI" title="video"></video></div></figure><div class="notion-text notion-block-3af1f4284fb4804b8699eb2ce5622271">2 思源笔记配置API服务商</div><figure class="notion-asset-wrapper notion-asset-wrapper-video notion-block-3af1f4284fb4808b9951c609c59e2c24"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:708px;max-width:100%;flex-direction:column;height:320px"><video playsinline="" controls="" preload="metadata" src="https://file.notion.so/f/f/40540135-047b-4ab2-97fa-10bd328545fd/f0c7e1e1-0300-4090-9a13-1225aa0fa189/%E6%80%9D%E6%BA%90%E8%AE%BE%E7%BD%AE.mp4?table=block&amp;id=3af1f428-4fb4-808b-9951-c609c59e2c24&amp;spaceId=40540135-047b-4ab2-97fa-10bd328545fd&amp;expirationTimestamp=1786010400000&amp;signature=Gte4z1zxABfynqIBdO8mGhh8HadyzecpSVeBidvyECM" title="video"></video></div></figure><div class="notion-text notion-block-3af1f4284fb4803cab7df09ecd263715">3 填写相关设置</div><table class="notion-simple-table notion-block-3af1f4284fb480c5906bf39c54472d98"><tbody><tr class="notion-simple-table-row notion-block-3af1f4284fb480a0ad3ddd2fc078cb7d"><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">API 基础地址</div></td><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell"><a class="notion-link" href="https://aihub.top/v1" target="_blank" rel="noopener noreferrer">https://aihub.top/v1</a></div></td><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">ㅤ</div></td></tr><tr class="notion-simple-table-row notion-block-3af1f4284fb48087bc55f203d1eba05c"><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">自定义显示名称</div></td><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">aihub</div></td><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">ㅤ</div></td></tr><tr class="notion-simple-table-row notion-block-3af1f4284fb4804c9340cfb68cb85202"><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">API Key</div></td><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">填写在API服务商复制的<b>API 密钥</b></div></td><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">ㅤ</div></td></tr><tr class="notion-simple-table-row notion-block-3af1f4284fb480c796f5fdb119bc86ad"><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">超时时间</div></td><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">120</div></td><td class="" style="width:239.66666666666666px"><div class="notion-simple-table-cell">默认值即可</div></td></tr></tbody></table><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3af1f4284fb4809e9361fa726e37f1c3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A3a5cdc32-a153-44d5-b144-9b07692866e4%3APixPin_2026-08-01_19-01-30.png?table=block&amp;id=3af1f428-4fb4-809e-9361-fa726e37f1c3&amp;t=3af1f428-4fb4-809e-9361-fa726e37f1c3" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-3af1f4284fb48094a18cf0af72fd6257">4 配置模型</div><figure class="notion-asset-wrapper notion-asset-wrapper-video notion-block-3af1f4284fb48037ade5caf5e1fad759"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:708px;max-width:100%;flex-direction:column;height:320px"><video playsinline="" controls="" preload="metadata" src="https://file.notion.so/f/f/40540135-047b-4ab2-97fa-10bd328545fd/bb09e7f3-b08f-427f-9bcb-c2f0cfa9c541/%E6%80%9D%E6%BA%90%E9%85%8D%E7%BD%AE%E6%A8%A1%E5%9E%8B.mp4?table=block&amp;id=3af1f428-4fb4-8037-ade5-caf5e1fad759&amp;spaceId=40540135-047b-4ab2-97fa-10bd328545fd&amp;expirationTimestamp=1786010400000&amp;signature=XRl3qyclMmY8Vv3i4bqC-suihm5Xa_2T4oiY5ozAfkQ" title="video"></video></div></figure><div class="notion-blank notion-block-3af1f4284fb480aca759d2de6764837d"> </div><div class="notion-blank notion-block-3af1f4284fb48027b86fe235a2885014"> </div><div class="notion-blank notion-block-3af1f4284fb4802289d9fdb15bae138f"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-aec6ebff61ea4a248e77de4de16ea0f4" data-id="aec6ebff61ea4a248e77de4de16ea0f4"><span><div id="aec6ebff61ea4a248e77de4de16ea0f4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#aec6ebff61ea4a248e77de4de16ea0f4" title="第三方免费大模型（siliconflow）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第三方免费大模型（siliconflow）</b></span></span></h2><div class="notion-text notion-block-12f1f4284fb4801fb157f41c5da29a01">🌟 <b>硅基流动：良心 AI</b> 🌟</div><div class="notion-text notion-block-12f1f4284fb4802c9a3ae74b714d44b4">1️⃣ <b>免费模型</b>: 支持免费模型
2️⃣ <b>Token 消耗</b>: 使用免费模型不消耗送的 2000 万 tokens
3️⃣ <b>付费模型推荐</b>: 建议使用 <code class="notion-inline-code">deepseek-ai/DeepSeek-V3.1</code>
</div><div class="notion-text notion-block-12f1f4284fb480ee8563eadcf428246d">链接: <span class="notion-red"><a class="notion-link" href="https://cloud.siliconflow.cn/i/uZoWopX7" target="_blank" rel="noopener noreferrer">我的邀请链接</a></span> （您与好友均可获赠2000万Tokens）</div><div class="notion-blank notion-block-1361f4284fb4800d9b4fddf01c2d9cd3"> </div><div class="notion-text notion-block-12f1f4284fb48039b069fe0b6d6f8d03">1、注册硅基流动账号 （<a class="notion-link" href="https://cloud.siliconflow.cn/i/uZoWopX7" target="_blank" rel="noopener noreferrer">直达</a>）</div><div class="notion-text notion-block-12f1f4284fb48090b70dd220b083962f">2、点击 <code class="notion-inline-code">API密钥</code> ，新建 API 密钥 （<a class="notion-link" href="https://cloud.siliconflow.cn/account/ak" target="_blank" rel="noopener noreferrer">直达</a>），点击密钥复制后填入下步的2️⃣中</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-17d1f4284fb480658f9cf7303e27de36"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2Fcbd4a133-a124-4cd4-9f4e-76a34e006126%2Fimage.png?table=block&amp;id=17d1f428-4fb4-8065-8f9c-f7303e27de36&amp;t=17d1f428-4fb4-8065-8f9c-f7303e27de36&amp;width=708.1428833007812&amp;cache=v2" alt="获取API" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption">获取API</figcaption></div></figure><div class="notion-blank notion-block-17d1f4284fb4800fb635d30cd88231a5"> </div><div class="notion-text notion-block-12f1f4284fb4800b883ad944e980e8e2">3、思源笔记 → 设置 → AI，按照下图填写配置</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-17d1f4284fb480a1b3b7ced88ef9f694"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2F4bdb019e-e320-4689-99f5-c16d8d0e5ad9%2Fimage.png?table=block&amp;id=17d1f428-4fb4-80a1-b3b7-ced88ef9f694&amp;t=17d1f428-4fb4-80a1-b3b7-ced88ef9f694&amp;width=708.1428833007812&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-17d1f4284fb48032aaafcee3890adc4e"><div class="notion-text-children"><div class="notion-text notion-block-12f1f4284fb480cc812eea9c2cc968f4">1️⃣ 在硅基流动的模型广场中挑选模型，填写模型名称（<a class="notion-link" href="https://cloud.siliconflow.cn/models" target="_blank" rel="noopener noreferrer">直达</a>）推荐模型：<code class="notion-inline-code">zai-org/GLM-4.6</code></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1361f4284fb480cd9900c9ee792010eb"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2F65d0242c-bcec-4114-8122-dcefedb966b3%2F%25E6%2588%25AA%25E5%259B%25BE%25E5%258A%25A0%25E6%25A1%2586.jpg?table=block&amp;id=1361f428-4fb4-80cd-9900-c9ee792010eb&amp;t=1361f428-4fb4-80cd-9900-c9ee792010eb&amp;width=680.1339721679688&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-12f1f4284fb480388003e6f15acfe66a">2️⃣ 填写新建的 API 密钥</div><div class="notion-text notion-block-12f1f4284fb48005afa3c32b8c515ed3">3️⃣ 填写 <span class="notion-red">https://api.siliconflow.cn/v1</span></div><div class="notion-blank notion-block-15f1f4284fb480eb9c27ed08816bb814"> </div></div></div><div class="notion-sync-block notion-block-1731f4284fb480e29129fc21cebe6be2"><div class="notion-callout notion-gray_background_co notion-block-15f1f4284fb48013822ed2ae82ce8caa"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-321ed8439925494eb3f463e571b835f6"><b>其他配置项说明</b><span class="notion-gray">（如果不清楚，使用默认值即可）</span>：</div><ol start="1" class="notion-list notion-list-numbered notion-block-15f1f4284fb4805e9b35e590a1c155e4" style="list-style-type:decimal"><li><b>超时时间</b>：控制请求等待时间，避免长时间无响应。根据自己网络和请求复杂度设置合理的超时时间，如果报错了可以适当调大时间。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-15f1f4284fb480b69d32dd91ef887634" style="list-style-type:decimal"><li><b>最大 Token 数</b>：限制请求和响应的长度，避免过长内容。根据需求和资源限制设置合适的Token数量。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-15f1f4284fb4809db3c7c660a573519d" style="list-style-type:decimal"><li><b>温度请求</b>：调整生成内容的多样性，高温度增加创造性，低温度增加一致性。根据应用场景选择合适的温度。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-15f1f4284fb480c3a93dedc03b168010" style="list-style-type:decimal"><li><b>最大上下文</b>：限制模型考虑的历史对话长度，影响回复的相关性。建议根据对话复杂度和资源情况设置合适的上下文长度。</li></ol></div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1731f4284fb480e78d22ca0cce95708c" data-id="1731f4284fb480e78d22ca0cce95708c"><span><div id="1731f4284fb480e78d22ca0cce95708c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1731f4284fb480e78d22ca0cce95708c" title="DeepSeek 深度求索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">DeepSeek 深度求索</span></span></h2><div class="notion-text notion-block-1731f4284fb480b9997ef1cef68d83d2">1、注册 <a class="notion-link" href="https://platform.deepseek.com/sign_in" target="_blank" rel="noopener noreferrer">DeepSeek 开放平台</a> ，注册获体验金（限中国大陆手机号）</div><div class="notion-text notion-block-1731f4284fb48077b1aad2c0290d4b92">2、点击菜单 <code class="notion-inline-code">API keys</code>，然后点击 <code class="notion-inline-code">创建API key</code> </div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1731f4284fb4802e8a59da5c9d70a3e0"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2Fff49a998-953c-4414-bf10-60776fa7b185%2Fimage.png?table=block&amp;id=1731f428-4fb4-802e-8a59-da5c9d70a3e0&amp;t=1731f428-4fb4-802e-8a59-da5c9d70a3e0&amp;width=708.1250610351562&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1731f4284fb480998b20f91e2c88677b">3、在创建API key的弹窗中随意输入名称后点击创建</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1731f4284fb48088bd12f10dae20062d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2F971059e3-3046-44d6-a0f1-7e621e9f2c78%2Fimage.png?table=block&amp;id=1731f428-4fb4-8088-bd12-f10dae20062d&amp;t=1731f428-4fb4-8088-bd12-f10dae20062d&amp;width=708.1250610351562&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1731f4284fb4800698d8f3bd16fe3588">4、点击复制</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1731f4284fb480b180decfecd45a28f1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2F84093c1d-60d6-43cd-b3b1-1991d432b8a0%2Fimage.png?table=block&amp;id=1731f428-4fb4-80b1-80de-cfecd45a28f1&amp;t=1731f428-4fb4-80b1-80de-cfecd45a28f1&amp;width=708.1339721679688&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1731f4284fb480c98a09d05ec468d0b1">5、将生成的 <code class="notion-inline-code">API Key</code> 粘贴在思源笔记的 AI 设置中<code class="notion-inline-code">图标2</code>。（<a class="notion-link" href="https://api-docs.deepseek.com/zh-cn/" target="_blank" rel="noopener noreferrer">DeepDeek文档说明</a>）</div><table class="notion-simple-table notion-block-1731f4284fb48089a4c2c96484cdb4c4"><tbody><tr class="notion-simple-table-row notion-block-4628cc0d168b44c892d7e45ce0606e00"><td class="" style="width:59.00001525878906px"><div class="notion-simple-table-cell">图标</div></td><td class="" style="width:225.0000203450521px"><div class="notion-simple-table-cell">名称</div></td><td class="" style="width:225.0000203450521px"><div class="notion-simple-table-cell">填写内容</div></td></tr><tr class="notion-simple-table-row notion-block-b9a8f388b0574081bdcb15414eaae89d"><td class="" style="width:59.00001525878906px"><div class="notion-simple-table-cell">1</div></td><td class="" style="width:225.0000203450521px"><div class="notion-simple-table-cell">模型</div></td><td class="" style="width:225.0000203450521px"><div class="notion-simple-table-cell">deepseek-chat</div></td></tr><tr class="notion-simple-table-row notion-block-7057b3ec68ff4e31b2084ad294b056e4"><td class="" style="width:59.00001525878906px"><div class="notion-simple-table-cell">2</div></td><td class="" style="width:225.0000203450521px"><div class="notion-simple-table-cell">API Key</div></td><td class="" style="width:225.0000203450521px"><div class="notion-simple-table-cell">（上面复制的API Key）</div></td></tr><tr class="notion-simple-table-row notion-block-1731f4284fb4803ba6c0c35b209b8738"><td class="" style="width:59.00001525878906px"><div class="notion-simple-table-cell">3</div></td><td class="" style="width:225.0000203450521px"><div class="notion-simple-table-cell">API 基础地址</div></td><td class="" style="width:225.0000203450521px"><div class="notion-simple-table-cell">https://api.deepseek.com/v1</div></td></tr></tbody></table><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1731f4284fb48052b2dafde0a520ef22"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2Ffe2f2727-b569-4b35-b2ea-a29f1eca93ff%2Fimage.png?table=block&amp;id=1731f428-4fb4-8052-b2da-fde0a520ef22&amp;t=1731f428-4fb4-8052-b2da-fde0a520ef22&amp;width=708.1339721679688&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-sync-block notion-block-1731f4284fb480e29129fc21cebe6be2"><div class="notion-callout notion-gray_background_co notion-block-15f1f4284fb48013822ed2ae82ce8caa"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-321ed8439925494eb3f463e571b835f6"><b>其他配置项说明</b><span class="notion-gray">（如果不清楚，使用默认值即可）</span>：</div><ol start="1" class="notion-list notion-list-numbered notion-block-15f1f4284fb4805e9b35e590a1c155e4" style="list-style-type:decimal"><li><b>超时时间</b>：控制请求等待时间，避免长时间无响应。根据自己网络和请求复杂度设置合理的超时时间，如果报错了可以适当调大时间。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-15f1f4284fb480b69d32dd91ef887634" style="list-style-type:decimal"><li><b>最大 Token 数</b>：限制请求和响应的长度，避免过长内容。根据需求和资源限制设置合适的Token数量。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-15f1f4284fb4809db3c7c660a573519d" style="list-style-type:decimal"><li><b>温度请求</b>：调整生成内容的多样性，高温度增加创造性，低温度增加一致性。根据应用场景选择合适的温度。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-15f1f4284fb480c3a93dedc03b168010" style="list-style-type:decimal"><li><b>最大上下文</b>：限制模型考虑的历史对话长度，影响回复的相关性。建议根据对话复杂度和资源情况设置合适的上下文长度。</li></ol></div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1361f4284fb480acb6b4cc0fcc5786c4" data-id="1361f4284fb480acb6b4cc0fcc5786c4"><span><div id="1361f4284fb480acb6b4cc0fcc5786c4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1361f4284fb480acb6b4cc0fcc5786c4" title="常见问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">常见问题</span></span></h2><div class="notion-blank notion-block-20c1f4284fb4801db148dcfb7a5c9dde"> </div><div class="notion-blank notion-block-20c1f4284fb480649ae3cbff29e74364"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-16f1f4284fb480ad94a3caa8a7110d33" data-id="16f1f4284fb480ad94a3caa8a7110d33"><span><div id="16f1f4284fb480ad94a3caa8a7110d33" class="notion-header-anchor"></div><a class="notion-hash-link" href="#16f1f4284fb480ad94a3caa8a7110d33" title="文章"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">文章</span></span></h2><div class="notion-row"><a class="notion-bookmark notion-block-20c1f4284fb4806b806eea7b2f281575" href="https://ld246.com/article/1747212372726" target="_blank" rel="noopener noreferrer"><div><div class="notion-bookmark-title">在思源文档内进行 AI 对话 - 链滴</div><div class="notion-bookmark-description">对 Fmisc 的对话进行了一波扩展 （v5.7.0），增加了一个「文档内对话」的功能——字面意义就是直接在文档中与 AI 进行对话，不用切换到单独的聊天界面。 触发方式 直接在编辑器中输入 /chat 或 /chatmini 命令： [图片] 分别对应了两种对话模式： 超级块模式（Mini 版）： 通过 /chatm</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fld246.com%2Fimages%2Ffavicon.png?table=block&amp;id=20c1f428-4fb4-806b-806e-ea7b2f281575&amp;t=20c1f428-4fb4-806b-806e-ea7b2f281575" alt="在思源文档内进行 AI 对话 - 链滴" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://ld246.com/article/1747212372726</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fb3logfile.com%2Favatar%2F1646569891270_1686748880296.jpeg%3FimageView2%2F1%2Fw%2F256%2Fh%2F256%2Finterlace%2F0%2Fq%2F100?table=block&amp;id=20c1f428-4fb4-806b-806e-ea7b2f281575&amp;t=20c1f428-4fb4-806b-806e-ea7b2f281575" alt="在思源文档内进行 AI 对话 - 链滴" loading="lazy" decoding="async"/></div></a></div><div class="notion-row"><a class="notion-bookmark notion-block-20c1f4284fb4803690aee951bdfead93" href="https://ld246.com/article/1749304311185" target="_blank" rel="noopener noreferrer"><div><div class="notion-bookmark-title">fmisc v6.00 更新, 支持 AI 工具调用 - 链滴</div><div class="notion-bookmark-description">6.0 版本的主要更新就是增加了工具调用功能（或者用烂俗一点的话叫 Agent）。 以工具组为单元支持四种工具： 网络检索工具 Bing 检索免费可用；Tavily 和 Bocha 需要提供 API Key 文件系统工具 脚本工具（无编程经验者不建议开启） 思源笔记相关工具 [图片] 案例 [图片] [图片] [图片]</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fld246.com%2Fimages%2Ffavicon.png?table=block&amp;id=20c1f428-4fb4-8036-90ae-e951bdfead93&amp;t=20c1f428-4fb4-8036-90ae-e951bdfead93" alt="fmisc v6.00 更新, 支持 AI 工具调用 - 链滴" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://ld246.com/article/1749304311185</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fb3logfile.com%2Favatar%2F1646569891270_1686748880296.jpeg%3FimageView2%2F1%2Fw%2F256%2Fh%2F256%2Finterlace%2F0%2Fq%2F100?table=block&amp;id=20c1f428-4fb4-8036-90ae-e951bdfead93&amp;t=20c1f428-4fb4-8036-90ae-e951bdfead93" alt="fmisc v6.00 更新, 支持 AI 工具调用 - 链滴" loading="lazy" decoding="async"/></div></a></div><div class="notion-blank notion-block-21e1f4284fb480adb10cf88f737b8f0d"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[嵌入内容块]]></title>
            <link>https://siyuannote.com/article/1724455152</link>
            <guid>https://siyuannote.com/article/1724455152</guid>
            <pubDate>Fri, 31 Dec 2021 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-03d405f7141f42479b141d6860155ed4"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-508b7aa1a2b0427bb48bdc74ec3e4b8b" data-id="508b7aa1a2b0427bb48bdc74ec3e4b8b"><span><div id="508b7aa1a2b0427bb48bdc74ec3e4b8b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#508b7aa1a2b0427bb48bdc74ec3e4b8b" title="概述"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">概述</span></span></h2><div class="notion-text notion-block-ede82bd170ed43dba90cef4590a8b565">嵌入内容块主要用于汇总所需内容块，通过 <code class="notion-inline-code">{{</code> 和 <code class="notion-inline-code">}}</code> 将 SQL 脚本包裹起来并独占一行：<code class="notion-inline-code">{{ SELECT * FROM blocks WHERE content LIKE &#x27;%关键字%&#x27; }}</code>，数据库表请参考这里。#内容块/嵌入#</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3af557be8dc844c5b39b4ac346688111" data-id="3af557be8dc844c5b39b4ac346688111"><span><div id="3af557be8dc844c5b39b4ac346688111" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3af557be8dc844c5b39b4ac346688111" title="示例"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">示例</span></span></h2><div class="notion-text notion-block-591211f49af84b90a9886a8d60cf757d">查询内容中包含 <code class="notion-inline-code">内容块</code> 的列表项：</div><div class="notion-blank notion-block-3ac1f4284fb48014b0a2eb6e0bce7fe2"> </div><div class="notion-text notion-block-e741d3c330d9437ba4df10ef7b07f531">查询内容中同时包含 <code class="notion-inline-code">内容块</code> 和 <code class="notion-inline-code">引用</code> 段落块：</div><div class="notion-blank notion-block-3ac1f4284fb480b489decea8b1b10d5e"> </div><div class="notion-text notion-block-347da9c3a06546f4b00fc753ab7beaa9">查询内容中同时包含 <code class="notion-inline-code">内容块</code> 和 <code class="notion-inline-code">嵌入</code> 的标题块并按更新时间降序结果取前 2 条：</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-afa673cb111c44f5b6f4a26538fe5c57" data-id="afa673cb111c44f5b6f4a26538fe5c57"><span><div id="afa673cb111c44f5b6f4a26538fe5c57" class="notion-header-anchor"></div><a class="notion-hash-link" href="#afa673cb111c44f5b6f4a26538fe5c57" title="案例一"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">案例一</span></span></h3><div class="notion-text notion-block-bcb5d0f44f884dc99b68cbdf91571c99">查询同时包含 <code class="notion-inline-code">在思源中</code> 和 <code class="notion-inline-code">核心概念</code> 文本的段落块，并排除当前文档（否则当段落块也会包含到结果集中，因为当前段落同样包含了这两个文本，下面的案例类似）：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-fcb7e438422e473490d132c00e8e1966"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://file.notion.so/f/f/40540135-047b-4ab2-97fa-10bd328545fd/1d67e5d1-5efb-4510-a945-135dcc4dd1ec/recording.gif?table=block&amp;id=fcb7e438-422e-4734-90d1-32c00e8e1966&amp;spaceId=40540135-047b-4ab2-97fa-10bd328545fd&amp;expirationTimestamp=1786010400000&amp;signature=XoII4DPAsxPDweMKzRzF-O_G7rNfDPoVopwW-B63z5E&amp;t=fcb7e438-422e-4734-90d1-32c00e8e1966" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-d341f8438efb44f0b4f5a8ec0cf57d7c" data-id="d341f8438efb44f0b4f5a8ec0cf57d7c"><span><div id="d341f8438efb44f0b4f5a8ec0cf57d7c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d341f8438efb44f0b4f5a8ec0cf57d7c" title="案例二"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">案例二</span></span></h3><div class="notion-text notion-block-d94c5d678b7b4e839a9c60957b783e1e">查询同时包含标签 <code class="notion-inline-code">#内容块/嵌入#</code> 和 <code class="notion-inline-code">#内容块/引用#</code> 的段落块：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-ac5d26c5946a4cbc8d97c0e77342c5c9"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://file.notion.so/f/f/40540135-047b-4ab2-97fa-10bd328545fd/09d3442a-869a-4c02-a660-f281c8bfbc7c/recording.gif?table=block&amp;id=ac5d26c5-946a-4cbc-8d97-c0e77342c5c9&amp;spaceId=40540135-047b-4ab2-97fa-10bd328545fd&amp;expirationTimestamp=1786010400000&amp;signature=TXHOlxJTwCPU1XCJpfqDb8K4mdMyd2mVcqNywd4iWUE&amp;t=ac5d26c5-946a-4cbc-8d97-c0e77342c5c9" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-0b6d91a4bc604e2e8b63b6a29a62adb7" data-id="0b6d91a4bc604e2e8b63b6a29a62adb7"><span><div id="0b6d91a4bc604e2e8b63b6a29a62adb7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0b6d91a4bc604e2e8b63b6a29a62adb7" title="案例三"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">案例三</span></span></h3><div class="notion-text notion-block-02404a88129d48829a3a66f390fa7d98">有时候我们可能需要随机漫游显示内容块，以方便回顾。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-4c088615d2dc483cbcb6b67d50f30ed0"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://file.notion.so/f/f/40540135-047b-4ab2-97fa-10bd328545fd/948d516f-ac94-49fb-aaf5-66590d3d71fd/recording.gif?table=block&amp;id=4c088615-d2dc-483c-bcb6-b67d50f30ed0&amp;spaceId=40540135-047b-4ab2-97fa-10bd328545fd&amp;expirationTimestamp=1786010400000&amp;signature=R1d5I_B02Ii7VuuY9KHWht5SD-TlsAR2DI1KuT7efRY&amp;t=4c088615-d2dc-483c-bcb6-b67d50f30ed0" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-afebcf48b5584b01b2838620aa1cc12d" data-id="afebcf48b5584b01b2838620aa1cc12d"><span><div id="afebcf48b5584b01b2838620aa1cc12d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#afebcf48b5584b01b2838620aa1cc12d" title="案例四"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">案例四</span></span></h3><div class="notion-text notion-block-39b2bbddd37843deb40ae59d7ebdd472">查询未完成的任务列表项，这里需要使用 <code class="notion-inline-code">markdown</code> 字段而不是 <code class="notion-inline-code">content</code> 字段：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d3d070741fad403d975f4a73b40bf307"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://file.notion.so/f/f/40540135-047b-4ab2-97fa-10bd328545fd/22555ff8-54e4-42be-8d1c-2def94858360/recording.gif?table=block&amp;id=d3d07074-1fad-403d-975f-4a73b40bf307&amp;spaceId=40540135-047b-4ab2-97fa-10bd328545fd&amp;expirationTimestamp=1786010400000&amp;signature=O-AvlrS3pI-e10cIBtK976cmmuLKrnfKcCyRRZNS7EA&amp;t=d3d07074-1fad-403d-975f-4a73b40bf307" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-380a13cf5d7f49da9476695b1ba4250d"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[日记]]></title>
            <link>https://siyuannote.com/article/1725202836</link>
            <guid>https://siyuannote.com/article/1725202836</guid>
            <pubDate>Fri, 31 Dec 2021 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-44fb91609ba045c7acec2c91fe89bf46"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-5adcddb0c43c422c9df5f6d7a25ab6e0">我们可以通过日记来快速创建文档，日记功能入口在顶部主菜单中。</div><div class="notion-text notion-block-1ba5a13ac5dc462ebaf76d6d6233e212">但在使用日记前，需要在笔记本右键菜单中打开 <code class="notion-inline-code">设置</code>，在新建日记设置中配置：</div><div class="notion-text notion-block-f1de5260b28b476a9122c22280d106df">1️⃣ <b>存放路径：</b>笔记本下的路径，支持模板变量</div><div class="notion-text notion-block-0fd8b33d66c747fd915d2179cd652269">2️⃣ <b>模板路径（可选）：</b>创建日记时使用该模板作为初始内容</div><div class="notion-callout notion-gray_background_co notion-block-1381f4284fb4801d9fb8e8849cf080e6"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-6903b066b8dc46d3aadfadc578d2d33e"><b>小提示</b>
在指定的模板使用嵌入内容块，可以汇总待办事项或者需要每日查看的内容块。</div></div></div><div class="notion-blank notion-block-00b8307a60414d5080906c2792929de1"> </div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-80d30b7004d34dab996662d11a4dce1b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2Ffa38e6ff-7776-4edb-8700-2a9cd3248306%2F%25E6%259C%25AA%25E6%25A0%2587%25E9%25A2%2598-2.jpg?table=block&amp;id=80d30b70-04d3-4dab-9966-62d11a4dce1b&amp;t=80d30b70-04d3-4dab-9966-62d11a4dce1b&amp;width=707.9910888671875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-1381f4284fb480f29df3d7debee5a802"> </div><div class="notion-text notion-block-7b0af81032ab4355bea8056d479061a2">在图中的红框区域配置设置项</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1381f4284fb480488da7caff2b6ab37c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2Fae90a72f-7124-4b25-8210-92141009735a%2Fimage.png?table=block&amp;id=1381f428-4fb4-8048-8da7-caff2b6ab37c&amp;t=1381f428-4fb4-8048-8da7-caff2b6ab37c&amp;width=708.0000610351562&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-968b7b4d65ea415fbdfc5c8db81eeb1d" data-id="968b7b4d65ea415fbdfc5c8db81eeb1d"><span><div id="968b7b4d65ea415fbdfc5c8db81eeb1d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#968b7b4d65ea415fbdfc5c8db81eeb1d" title="1️⃣ 存放路径"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1️⃣ 存放路径</span></span></h2><div class="notion-text notion-block-3c3b699a587e44d2ace43d124f8af6bc">默认的存放路径是 <code class="notion-inline-code">/daily note/{{now | date &quot;2006/01&quot;}}/{{now | date &quot;2006-01-02&quot;}}</code></div><div class="notion-text notion-block-1381f4284fb4805fa452ddd8b2d1b29c">此模板变量在新建日记时自动生成符合设定格式的位置和名称。</div><div class="notion-blank notion-block-1381f4284fb48062adb6ee324cd66557"> </div><div class="notion-text notion-block-13e27843387d409396ff2b3cabd80c37">例如: 今天是2024年11月08日, 当我新建一个日记时（<code class="notion-inline-code">alt+5</code>）日记会根据模板变量自动新建在设定的位置，并生成日期标题。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-ac695e0039634bd98d7a7046c56c3a07"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2F65936e76-d35f-4c2d-982a-4a4304c8e002%2F%25E6%259C%25AA%25E6%25A0%2587%25E9%25A2%2598-2_1.jpg?table=block&amp;id=ac695e00-3963-4bd9-8d7a-7046c56c3a07&amp;t=ac695e00-3963-4bd9-8d7a-7046c56c3a07&amp;width=707.9910888671875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-c2fefc9c4793406c87aac05d243d5560"> </div><div class="notion-callout notion-gray_background_co notion-block-664484dfe35b40c9891547383fe13632"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-1381f4284fb48084aa13e63e5a29e57a">简单解释存放路径，例如：/daily note/{{now | date &quot;2006/01&quot;}}/{{now | date &quot;2006-01-02&quot;}}</div><div class="notion-text notion-block-1381f4284fb480a987e0ca49d651db93">模板使用的是 Go 编程语言的文本模板进行实现</div><div class="notion-blank notion-block-1381f4284fb4807491e8e2aa1852d49d"> </div><div class="notion-text notion-block-1381f4284fb4806895b2e6dd470da2ec"><code class="notion-inline-code">.action{now | date &quot;2006-01-02 15:04:05&quot;}</code> 渲染 <code class="notion-inline-code">yyyy-MM-dd HH:mm:ss</code> 例如 2024-08-01 09:50:31</div><div class="notion-text notion-block-1381f4284fb480a1ac33de01064ea395"><code class="notion-inline-code">.action{now | date &quot;2006-01-02&quot;}</code> 渲染 <code class="notion-inline-code">yyyy-MM-dd</code> 例如 2024-08-01</div><div class="notion-text notion-block-1381f4284fb4804e9b95e3db0c17253a"><code class="notion-inline-code">.action{now | date &quot;2006-01&quot;}</code> 渲染 <code class="notion-inline-code">yyyy-MM</code> 例如 2024-08</div><div class="notion-text notion-block-1381f4284fb480e48dfcdb647f3a5f15"><code class="notion-inline-code">.action{now | date &quot;2006&quot;}</code> 渲染 <code class="notion-inline-code">yyyy</code> 例如 2024</div><div class="notion-blank notion-block-1381f4284fb48017adcff2908b70759b"> </div><div class="notion-text notion-block-6fb6b9b1d800438ca2f5a494bc238a95">更多的组合请学习 <a class="notion-link" href="https://siyuannote.com/article/1725202861" target="_blank" rel="noopener noreferrer">模板片段</a> 语法</div></div></div><div class="notion-blank notion-block-1381f4284fb48012ad21c23017c6c875"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-22c602cc7bc7478eb4fd0c6ca6d05296" data-id="22c602cc7bc7478eb4fd0c6ca6d05296"><span><div id="22c602cc7bc7478eb4fd0c6ca6d05296" class="notion-header-anchor"></div><a class="notion-hash-link" href="#22c602cc7bc7478eb4fd0c6ca6d05296" title="常见存放路径示例"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">常见存放路径示例</span></span></h3><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1381f4284fb48021ad4aec11e2d295a2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2Fb031c9d2-24b4-4bb6-b769-8da9f65b28dc%2F%25E6%259C%25AA%25E6%25A0%2587%25E9%25A2%2598-2_3.jpg?table=block&amp;id=1381f428-4fb4-8021-ad4a-ec11e2d295a2&amp;t=1381f428-4fb4-8021-ad4a-ec11e2d295a2&amp;width=708.1250610351562&amp;cache=v2" alt="效果展示" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption">效果展示</figcaption></div></figure><div class="notion-blank notion-block-f0e22408181f41e29271ceac962a912e"> </div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1381f4284fb48046bf9bf35f1a6a0013"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2Ffc0ca4af-53bb-4c82-8e5d-1c837ca86afd%2F%25E6%259C%25AA%25E6%25A0%2587%25E9%25A2%2598-2_4.jpg?table=block&amp;id=1381f428-4fb4-8046-bf9b-f35f1a6a0013&amp;t=1381f428-4fb4-8046-bf9b-f35f1a6a0013&amp;width=707.982177734375&amp;cache=v2" alt="效果展示" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption">效果展示</figcaption></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-b5a36ccc02e543afa44b2a157bdff592" data-id="b5a36ccc02e543afa44b2a157bdff592"><span><div id="b5a36ccc02e543afa44b2a157bdff592" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b5a36ccc02e543afa44b2a157bdff592" title="2️⃣ 模板路径"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2️⃣ 模板路径</span></span></h2><div class="notion-text notion-block-60b4e3788f7243d082c9dd28eb6398ae">模板路径是创建日记时使用该模板作为初始内容。自动生成自定义的日记框架。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1381f4284fb480348972f2cf3f2fa901"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2F771ef890-9800-4357-ad1a-7e31495e91ef%2F%25E6%259C%25AA%25E6%25A0%2587%25E9%25A2%2598-2_6.jpg?table=block&amp;id=1381f428-4fb4-8034-8972-f2cf3f2fa901&amp;t=1381f428-4fb4-8034-8972-f2cf3f2fa901&amp;width=707.9910888671875&amp;cache=v2" alt="效果展示" loading="lazy" decoding="async"/><figcaption class="notion-asset-caption">效果展示</figcaption></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1381f4284fb4806b9fd0d1c2a092797a" data-id="1381f4284fb4806b9fd0d1c2a092797a"><span><div id="1381f4284fb4806b9fd0d1c2a092797a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1381f4284fb4806b9fd0d1c2a092797a" title="集市模板"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">集市模板</span></span></h4><div class="notion-text notion-block-1381f4284fb48006b0fed718c03890a5">打开思源笔记设置 → <code class="notion-inline-code">集市</code> → <code class="notion-inline-code">模板</code> → 选择一个点击</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1381f4284fb480f9a5a1fffeb6a240ed"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2F8c9131a5-d6bc-4402-a11a-0ce870947082%2F%25E6%259C%25AA%25E6%25A0%2587%25E9%25A2%2598-2_5.jpg?table=block&amp;id=1381f428-4fb4-80f9-a5a1-fffeb6a240ed&amp;t=1381f428-4fb4-80f9-a5a1-fffeb6a240ed&amp;width=707.9910888671875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1381f4284fb480248f23ce9603e28a8a">在模板详情页面点击 <code class="notion-inline-code">下载</code> </div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1381f4284fb480e7bde3c0117889b47a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2F2477c6bc-4f50-459e-b053-95f208463137%2F%25E6%259C%25AA%25E6%25A0%2587%25E9%25A2%2598-2_7.jpg?table=block&amp;id=1381f428-4fb4-80e7-bde3-c0117889b47a&amp;t=1381f428-4fb4-80e7-bde3-c0117889b47a&amp;width=707.9910888671875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1381f4284fb48059a773e2949d66fd90">回到笔记页面，在笔记编辑区键入 <code class="notion-inline-code">/mu</code> ，选择一个你需要的模板，例如日计划。（点击模板即可在当前笔记中加载预览）</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1381f4284fb4809782eaf711a7572d2f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2F2acbe401-20f3-44c3-bc8a-48c1e148cefb%2F%25E6%259C%25AA%25E6%25A0%2587%25E9%25A2%2598-2_9.jpg?table=block&amp;id=1381f428-4fb4-8097-82ea-f711a7572d2f&amp;t=1381f428-4fb4-8097-82ea-f711a7572d2f&amp;width=708.1339721679688&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-1381f4284fb4802088d8d23fce987582">将选中的模板名称填写在模板路径处。（Normal/templates/一周/日计划）</div><div class="notion-text notion-block-1381f4284fb4805a96cee68ab3c140e1">再新建日记时（alt+5）就会自动加载模板。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1381f4284fb480afbeb4cc16000dc26f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F40540135-047b-4ab2-97fa-10bd328545fd%2F66e2212c-1571-4240-be51-87a9093fb370%2F%25E6%259C%25AA%25E6%25A0%2587%25E9%25A2%2598-2_10.jpg?table=block&amp;id=1381f428-4fb4-80af-beb4-cc16000dc26f&amp;t=1381f428-4fb4-80af-beb4-cc16000dc26f&amp;width=707.9910888671875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-1381f4284fb480c89b82c1f94561ff93"> </div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-1381f4284fb480429c27e38028dcdac7" data-id="1381f4284fb480429c27e38028dcdac7"><span><div id="1381f4284fb480429c27e38028dcdac7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1381f4284fb480429c27e38028dcdac7" title="自己编写日记模板"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">自己编写日记模板</span></span></h3><div class="notion-text notion-block-1381f4284fb480dabdc6cfe39dbb33e7">将编写好的模板文件（<code class="notion-inline-code">.md</code> 格式）放置于工作空间/data/templates/ 下。</div><div class="notion-text notion-block-1381f4284fb480728516c215232acec1">然后在模板路径处填写文件名称即可</div><div class="notion-text notion-block-1381f4284fb48080afa5fdb5cede6ed0"><a class="notion-link" href="https://siyuannote.com/article/1725202861" target="_blank" rel="noopener noreferrer">📝 模板教程</a></div><div class="notion-blank notion-block-20d1f4284fb480ae9dfcd35c0612d2fc"> </div><div class="notion-blank notion-block-20d1f4284fb480b39815f19fb9285a5e"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1381f4284fb48074a320c7ea92026e8e" data-id="1381f4284fb48074a320c7ea92026e8e"><span><div id="1381f4284fb48074a320c7ea92026e8e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1381f4284fb48074a320c7ea92026e8e" title="文章"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">文章</span></span></h2><div class="notion-row"><a class="notion-bookmark notion-block-20d1f4284fb480daab0eecebefff5576" href="https://ld246.com/article/1749032171152" target="_blank" rel="noopener noreferrer"><div><div class="notion-bookmark-title">思源笔记新建存放日记 年 / 月 / 周 / 日的路径设置分享 - 链滴</div><div class="notion-bookmark-description">一、需求背景：从流水账到结构化复盘的归档逻辑 作为习惯用笔记软件记录生活的人，我希望实现这样的归档规则： 每日随手记录流水账（按日期命名） 每周汇总到对应周目录（按「年 / 月 + 周数」分级） 每月生成月度总结（按月份聚合每周内容） 核心需求是新建日记时自动生成「年 / 月 / 周 / 日」层级路径。其中关键逻辑在于</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fld246.com%2Fimages%2Ffavicon.png?table=block&amp;id=20d1f428-4fb4-80da-ab0e-ecebefff5576&amp;t=20d1f428-4fb4-80da-ab0e-ecebefff5576" alt="思源笔记新建存放日记 年 / 月 / 周 / 日的路径设置分享 - 链滴" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://ld246.com/article/1749032171152</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fb3logfile.com%2Favatar%2F1663485837653.png%3FimageView2%2F1%2Fw%2F256%2Fh%2F256%2Finterlace%2F0%2Fq%2F100?table=block&amp;id=20d1f428-4fb4-80da-ab0e-ecebefff5576&amp;t=20d1f428-4fb4-80da-ab0e-ecebefff5576" alt="思源笔记新建存放日记 年 / 月 / 周 / 日的路径设置分享 - 链滴" loading="lazy" decoding="async"/></div></a></div><div class="notion-row"><a class="notion-bookmark notion-block-2271f4284fb480efb07af5c45c884111" href="https://ld246.com/article/1734407382742" target="_blank" rel="noopener noreferrer"><div><div class="notion-bookmark-title">日、周、月记录模板分享 - 链滴</div><div class="notion-bookmark-description">第一次使用思源笔记，感觉社区中相关的模板还是比较少，然后在大佬给出的模板基础上，进行了一些修改，于是有了本文。（由于参考了直接导出，相关 id 没有删除，可以自行处理，但是不删也不影响） 还有一个问题：在周和月导出的时候会出现几个不知名“}}}”，但是在笔记页面的显示是正常的，目前还不知原因。 使用方法：将代码保存到</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://www.notion.so/image/https%3A%2F%2Fld246.com%2Fimages%2Ffavicon.png?table=block&amp;id=2271f428-4fb4-80ef-b07a-f5c45c884111&amp;t=2271f428-4fb4-80ef-b07a-f5c45c884111" alt="日、周、月记录模板分享 - 链滴" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://ld246.com/article/1734407382742</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fb3logfile.com%2Favatar%2F1734014647600_1734014752888.jpeg%3FimageView2%2F1%2Fw%2F256%2Fh%2F256%2Finterlace%2F0%2Fq%2F100?table=block&amp;id=2271f428-4fb4-80ef-b07a-f5c45c884111&amp;t=2271f428-4fb4-80ef-b07a-f5c45c884111" alt="日、周、月记录模板分享 - 链滴" loading="lazy" decoding="async"/></div></a></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[笔记搜索]]></title>
            <link>https://siyuannote.com/article/1735150477</link>
            <guid>https://siyuannote.com/article/1735150477</guid>
            <pubDate>Tue, 24 Dec 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[介绍思源笔记的全局搜索、当前文档搜索、关键字、查询语法、正则、SQL、资源文件搜索、API 调用、索引重建和常见排查方法。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-7ea3c953c1064301b67f29b2bcd93aab"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-1cc1f4284fb480c7a9affd97c211f509">思源笔记提供多层次的搜索能力：日常可以用全局搜索快速定位笔记，遇到复杂条件时可以切换到查询语法、正则表达式或 SQL；需要脚本和插件集成时，也可以调用搜索 API。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1a3aefbbe8924269a5931fd92529161e" data-id="1a3aefbbe8924269a5931fd92529161e"><span><div id="1a3aefbbe8924269a5931fd92529161e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a3aefbbe8924269a5931fd92529161e" title="先选哪种搜索方式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">先选哪种搜索方式</span></span></h3><table class="notion-simple-table notion-block-63b616ef732047a6ba577b216e543dfd"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-c4cc5e69f3c24bad8a2891387233c805"><td class="" style="width:120px"><div class="notion-simple-table-cell">搜索方式</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">适合场景</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">示例</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">注意事项</div></td></tr><tr class="notion-simple-table-row notion-block-cf781b32532c4124b1ba0081e07b4484"><td class="" style="width:120px"><div class="notion-simple-table-cell">关键字</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">快速查找标题、正文和常用块属性</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">同步</code>、<code class="notion-inline-code">Docker</code>、<code class="notion-inline-code">反向链接</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">结果过多时，增加关键词、限制路径或筛选块类型。</div></td></tr><tr class="notion-simple-table-row notion-block-9e29512f6a5b4929885b891748862653"><td class="" style="width:120px"><div class="notion-simple-table-cell">查询语法</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">多个关键词的包含、排除、组合查询</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">foo OR bar</code>、<code class="notion-inline-code">foo NOT bar</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">需要在搜索方式中切换到“查询语法”。空格默认表示 <code class="notion-inline-code">AND</code>。</div></td></tr><tr class="notion-simple-table-row notion-block-e4e7e7cdc1b8412b8ee43c6e1751e250"><td class="" style="width:120px"><div class="notion-simple-table-cell">正则表达式</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">匹配固定格式、编号、日期、链接、代码片段</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">\d{4}-\d{2}-\d{2}</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">正则过宽会影响速度，建议配合路径和类型过滤。</div></td></tr><tr class="notion-simple-table-row notion-block-c183b3d42aa44b18b2fb90d841052bf2"><td class="" style="width:120px"><div class="notion-simple-table-cell">SQL</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">按块表字段、时间、类型、任务状态做结构化检索</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">SELECT * FROM blocks ... LIMIT 20</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">适合高级用户；SQL 搜索方式不支持替换操作。</div></td></tr><tr class="notion-simple-table-row notion-block-91763f9f4441439bbdb1abcd958e9d5a"><td class="" style="width:120px"><div class="notion-simple-table-cell">API</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">插件、脚本、外部工具调用思源搜索</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">POST /api/search/fullTextSearchBlock</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">SQL 模式需要管理员权限；普通场景优先使用界面搜索。</div></td></tr></tbody></table><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2321f4284fb480aeac05c59c5478cd0f" data-id="2321f4284fb480aeac05c59c5478cd0f"><span><div id="2321f4284fb480aeac05c59c5478cd0f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2321f4284fb480aeac05c59c5478cd0f" title="打开搜索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">打开搜索</span></span></h3><ul class="notion-list notion-list-disc notion-block-38ec31815d0b4e228e429a14356c659f"><li>全局搜索：使用默认快捷键 <code class="notion-inline-code">Ctrl/⌘ + P</code>，或点击界面中的搜索入口。适合在整个工作空间里查找笔记块。</li></ul><ul class="notion-list notion-list-disc notion-block-be041710c94f4af78c9828f912beaca7"><li>当前文档搜索：使用 <code class="notion-inline-code">Ctrl/⌘ + F</code>，只在当前打开的文档中查找文本。</li></ul><ul class="notion-list notion-list-disc notion-block-1ed07be0e6724fc1b89eac9c51cc3e64"><li>固定搜索：使用默认快捷键 <code class="notion-inline-code">Shift + Ctrl/⌘ + F</code>，适合把搜索面板固定在工作区中持续筛选。</li></ul><ul class="notion-list notion-list-disc notion-block-ee3b689683444e43b1573075d8e97a08"><li>搜索结果中可以用方向键浏览，用回车打开；也可以在预览区快速判断命中位置。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-5e25fdd61a2e456097ab1f817434e1ec" data-id="5e25fdd61a2e456097ab1f817434e1ec"><span><div id="5e25fdd61a2e456097ab1f817434e1ec" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5e25fdd61a2e456097ab1f817434e1ec" title="搜索面板里的常用过滤"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">搜索面板里的常用过滤</span></span></h3><ul class="notion-list notion-list-disc notion-block-79a63a9cb023404db64b62d1f66d2346"><li>指定路径：点击搜索面板顶部的路径按钮，把范围限制到某个笔记本、文档或目录。</li></ul><ul class="notion-list notion-list-disc notion-block-d6924cede0e14a26bb5ba01d9989fa4a"><li>包含子文档：在指定路径后，按需要启用子文档范围，避免只搜到当前层级。</li></ul><ul class="notion-list notion-list-disc notion-block-7eb4015941fa4d01b120603fb1556a06"><li>块级类型：只搜索文档块、标题、段落、列表、代码块等特定类型。全局搜索里的过滤会覆盖“设置”里的默认块级类型。</li></ul><ul class="notion-list notion-list-disc notion-block-e72a4b67ad0b4de9bab63f38dc577fd2"><li>块级属性：可以在“设置 → 搜索”中配置是否搜索命名、别名、备注等块级属性。</li></ul><ul class="notion-list notion-list-disc notion-block-0ea5dce4b4794c0185ddccb82bd31690"><li>区分大小写：在“设置 → 搜索 → 区分大小写”中开启后，相关搜索功能会区分英文大小写。</li></ul><ul class="notion-list notion-list-disc notion-block-e31914cbec884146ae9c744ad483c276"><li>搜索结果显示数：结果数量过大时会拖慢搜索；数据量较大时不要把该值设得太高。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-5bd6a851ed1b4b8c8e6a2d37e13d4953" data-id="5bd6a851ed1b4b8c8e6a2d37e13d4953"><span><div id="5bd6a851ed1b4b8c8e6a2d37e13d4953" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5bd6a851ed1b4b8c8e6a2d37e13d4953" title="关键字搜索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">关键字搜索</span></span></h3><div class="notion-text notion-block-1d3bb83afe1546f5aef64922fc512fab">关键字是最常用的搜索方式，适合记得某个词、标题片段或短句时快速定位内容。</div><div class="notion-text notion-block-9c4948e988804f61ba80509186163f88">建议用法：</div><ul class="notion-list notion-list-disc notion-block-d24901b9221f40e897fa421e9b906701"><li>先输入最有辨识度的词，而不是太泛的词。例如搜 <code class="notion-inline-code">双链</code> 通常比搜 <code class="notion-inline-code">笔记</code> 更快收敛。</li></ul><ul class="notion-list notion-list-disc notion-block-628771c2f568477aaebd0ef50c421925"><li>结果太多时，不要继续翻很久，优先增加第二个关键词或限制路径。</li></ul><ul class="notion-list notion-list-disc notion-block-becef0b4c1ca42d092169bf421a1db1a"><li>如果想表达“包含 A 但不包含 B”“A 或 B 任意一个”，切换到“查询语法”会更准确。</li></ul><ul class="notion-list notion-list-disc notion-block-6455a033f3ab40e18d24b4121b247c24"><li>如果发现重复结果，检查是否把容器块纳入了搜索范围；启用容器块后可能带来重复命中。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-11eaf8f34ab144cf9af94afcd5c21ca3" data-id="11eaf8f34ab144cf9af94afcd5c21ca3"><span><div id="11eaf8f34ab144cf9af94afcd5c21ca3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#11eaf8f34ab144cf9af94afcd5c21ca3" title="查询语法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">查询语法</span></span></h3><div class="notion-text notion-block-936920b1f2a84d4b8d8f9a312b380978">查询语法适合表达明确的逻辑条件。切换搜索方式为“查询语法”后，可以使用 <code class="notion-inline-code">AND</code>、<code class="notion-inline-code">OR</code>、<code class="notion-inline-code">NOT</code> 和括号组合。</div><table class="notion-simple-table notion-block-8a8ccd82373943ccbcac70154e3d6273"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-aa31d926c4034f83b238d386c6a564e6"><td class="" style="width:120px"><div class="notion-simple-table-cell">写法</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">含义</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">适合场景</div></td></tr><tr class="notion-simple-table-row notion-block-5dda4d0956b64ee8b42e53fa6c0c1218"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">foo bar</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">同时包含 <code class="notion-inline-code">foo</code> 和 <code class="notion-inline-code">bar</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">多个关键词同时出现。</div></td></tr><tr class="notion-simple-table-row notion-block-56bc279983794d51a6ad11703481c7e3"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">foo AND bar</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">同时包含 <code class="notion-inline-code">foo</code> 和 <code class="notion-inline-code">bar</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">显式写出逻辑，便于阅读和保存。</div></td></tr><tr class="notion-simple-table-row notion-block-8762f08bd7d24015ad91bbfdd951239b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">foo OR bar</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">包含 <code class="notion-inline-code">foo</code> 或 <code class="notion-inline-code">bar</code> 任意一个</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">同义词、旧称和新称一起查。</div></td></tr><tr class="notion-simple-table-row notion-block-f344d1d1282948989fc4686309b0c84c"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">foo NOT bar</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">包含 <code class="notion-inline-code">foo</code>，但不包含 <code class="notion-inline-code">bar</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">排除噪声结果。</div></td></tr><tr class="notion-simple-table-row notion-block-15d157081ce44c7b8fd4fbddc24ee4b5"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">(foo OR bar) AND baz</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">先组合 <code class="notion-inline-code">foo</code>/<code class="notion-inline-code">bar</code>，再要求包含 <code class="notion-inline-code">baz</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">复杂主题检索。</div></td></tr><tr class="notion-simple-table-row notion-block-6d45e5d56bad4ba5b8084d1a3f8db46b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">&quot;foo/bar&quot;</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">把特殊字符包在英文双引号中</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">关键词中包含符号、斜杠、运算符等字符。</div></td></tr></tbody></table><div class="notion-text notion-block-00bb100c15a64e04bb146c77c009df01">常见误区：</div><ul class="notion-list notion-list-disc notion-block-78af6010772f4f038bf9e5de643f3b91"><li>在“关键字”方式下输入 <code class="notion-inline-code">OR</code>、<code class="notion-inline-code">NOT</code>，它们可能只是普通词；需要切换到“查询语法”。</li></ul><ul class="notion-list notion-list-disc notion-block-5e0a49ef31d54282b2bdd97302a4259c"><li>操作符建议使用英文大写，括号使用英文括号。</li></ul><ul class="notion-list notion-list-disc notion-block-55640c8da9ff4328a47b05c9c0bb2955"><li>如果你想搜索字面量 <code class="notion-inline-code">AND</code>、<code class="notion-inline-code">OR</code>、<code class="notion-inline-code">NOT</code>，可以用英文双引号包起来。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1b6093d05cf24bef8ef2e96a686448ee" data-id="1b6093d05cf24bef8ef2e96a686448ee"><span><div id="1b6093d05cf24bef8ef2e96a686448ee" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1b6093d05cf24bef8ef2e96a686448ee" title="正则表达式搜索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">正则表达式搜索</span></span></h3><div class="notion-text notion-block-8d09f7c871794b849aff76503ff7c105">正则表达式适合查“形式”而不是查“固定词”。在搜索方式中切换到“正则表达式”后，可以输入正则模式。</div><div class="notion-text notion-block-abeffb6cb5194d5a8078ffbfcaaee7c9">常见例子：</div><div class="notion-text notion-block-e8e6e200fd34425ab53b55838661ac46">匹配 <code class="notion-inline-code">2026-06-23</code> 这类日期。</div><div class="notion-text notion-block-16d1d2f888c4498fb2b13ca8f3afeb35">匹配 <code class="notion-inline-code">TODO</code> 或 <code class="notion-inline-code">FIXME</code>。</div><div class="notion-text notion-block-6a0c5e17ecd044bbb9fc4de09e437191">匹配以 <code class="notion-inline-code">http://</code> 或 <code class="notion-inline-code">https://</code> 开头的链接。</div><div class="notion-text notion-block-400ee24b925747d88fca582eaf54214b">使用建议：</div><ul class="notion-list notion-list-disc notion-block-1c2d53c562fe45c0a2b256ba5db537e0"><li>先限制到某个笔记本或文档，再运行复杂正则。</li></ul><ul class="notion-list notion-list-disc notion-block-8eb0056e80af4dff886f744c72c4081c"><li>正则中的 <code class="notion-inline-code">.</code>、<code class="notion-inline-code">*</code>、<code class="notion-inline-code">?</code>、<code class="notion-inline-code">[</code>、<code class="notion-inline-code">]</code> 等都有特殊含义，搜索字面量时需要转义。</li></ul><ul class="notion-list notion-list-disc notion-block-64a6ab8cd9f7460592ae55c5c5f3562c"><li>如果只是查多个词，优先使用查询语法；正则留给格式化内容。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-1967a6405d79443684675c3c15753fbc" data-id="1967a6405d79443684675c3c15753fbc"><span><div id="1967a6405d79443684675c3c15753fbc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1967a6405d79443684675c3c15753fbc" title="SQL 搜索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">SQL 搜索</span></span></h3><div class="notion-text notion-block-0aa4e2c86e8f49b59da0bf733e8c7c88">SQL 适合按结构化字段查询，例如块类型、创建时间、更新时间、任务状态等。它常用于两类场景：</div><ul class="notion-list notion-list-disc notion-block-c59fb6560ed341c480829c2c18a1e280"><li>搜索面板中切换搜索方式为 <code class="notion-inline-code">SQL</code>，直接用 SQL 找块。</li></ul><ul class="notion-list notion-list-disc notion-block-dcd79579034648fc872a727cea2bcf5e"><li>在文档中插入嵌入块，用 SQL 动态展示查询结果。</li></ul><div class="notion-text notion-block-0c50de80861c4f8eb278ac8ce668bfc2">基础示例：</div><div class="notion-text notion-block-1949ca66c37d47309efa08e437960d98">查找最近更新的任务块：</div><div class="notion-text notion-block-920120f55a494f7f952ec83d859ecfa9">查找同时包含两个关键词的文档：</div><div class="notion-text notion-block-3b5495859b2648228753675ea51468c3">注意事项：</div><ul class="notion-list notion-list-disc notion-block-769798bb0efe4a43be3f992cc7b5af93"><li>日常查询尽量加 <code class="notion-inline-code">LIMIT</code>，避免一次返回太多结果。</li></ul><ul class="notion-list notion-list-disc notion-block-0735cf08af11451e84e1695031a065cf"><li>SQL 搜索方式不支持替换操作，需要替换文本时请切回其他搜索方式。</li></ul><ul class="notion-list notion-list-disc notion-block-faebe673538f474785cfb2e6eab31cc3"><li>不熟悉表结构时，先从 <code class="notion-inline-code">blocks</code> 表开始；常见字段包括 <code class="notion-inline-code">id</code>、<code class="notion-inline-code">root_id</code>、<code class="notion-inline-code">content</code>、<code class="notion-inline-code">markdown</code>、<code class="notion-inline-code">type</code>、<code class="notion-inline-code">subtype</code>、<code class="notion-inline-code">created</code>、<code class="notion-inline-code">updated</code>。</li></ul><ul class="notion-list notion-list-disc notion-block-6bc69e6d22124e3baad23fc542669ff3"><li>不要把 SQL 搜索当作修改数据库的工具；用户指南中建议只编写查询型 SQL。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-b03814d24c9b428cada4c0dc173185d7" data-id="b03814d24c9b428cada4c0dc173185d7"><span><div id="b03814d24c9b428cada4c0dc173185d7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b03814d24c9b428cada4c0dc173185d7" title="搜索资源文件内容"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">搜索资源文件内容</span></span></h3><div class="notion-text notion-block-293e3a55b766465baac8774a5496351a">普通笔记搜索主要面向笔记块内容。如果要搜索附件或资源文件里的文字，请使用“搜索资源文件内容”入口。</div><div class="notion-text notion-block-1a50e9245e0349e9b7a4844bcf7ef944">适合场景：</div><ul class="notion-list notion-list-disc notion-block-d4695529b59b4cb19291ef69c8fae862"><li>想在 PDF、Office 文档等资源文件中查找文字。</li></ul><ul class="notion-list notion-list-disc notion-block-afd658b194874b2d984841128971e8da"><li>明明记得内容在附件里，但普通笔记搜索没有结果。</li></ul><ul class="notion-list notion-list-disc notion-block-d5529654337c402aad2e1892a5f48329"><li>需要确认某个关键词是否出现在资源文件正文中。</li></ul><div class="notion-text notion-block-13167c3cb9354a86934a7fca2b91693a">排查建议：</div><ul class="notion-list notion-list-disc notion-block-6dba728d20f34e5d802b1220eb21f895"><li>先确认资源文件本身能被提取出文本；扫描件图片可能需要 OCR 后才容易搜索。</li></ul><ul class="notion-list notion-list-disc notion-block-c240f6fc460740cbb9cae558976162cd"><li>搜索资源文件内容和搜索笔记块是两个入口，不要混用。</li></ul><ul class="notion-list notion-list-disc notion-block-04802045fb6d4cf9b3f12d50347ab31f"><li>如果资源文件很多，先用更具体的关键词，避免搜索时间过长。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2838bbaa269e411cbc52939507f7bff9" data-id="2838bbaa269e411cbc52939507f7bff9"><span><div id="2838bbaa269e411cbc52939507f7bff9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2838bbaa269e411cbc52939507f7bff9" title="API 和插件调用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">API 和插件调用</span></span></h3><div class="notion-text notion-block-158b138d1dc0451dacbb5b3de1a51c7a">插件、脚本或外部工具可以调用搜索接口：</div><div class="notion-text notion-block-05c0a47c91a74eabad7235815eea6a53">常用请求体示例：</div><div class="notion-text notion-block-786a51fa43614ef99b778dfe060e8c5c"><code class="notion-inline-code">method</code> 的含义：</div><ul class="notion-list notion-list-disc notion-block-3f1120a473ec413f84b16a99ecb3b8b3"><li><code class="notion-inline-code">0</code>：关键字</li></ul><ul class="notion-list notion-list-disc notion-block-47867a4a709b4d97b4511aedb463f7b8"><li><code class="notion-inline-code">1</code>：查询语法</li></ul><ul class="notion-list notion-list-disc notion-block-0a625bf29f5e4db2a01f691961b66329"><li><code class="notion-inline-code">2</code>：SQL</li></ul><ul class="notion-list notion-list-disc notion-block-6fcbf20a3aa843c096abbed6b2290937"><li><code class="notion-inline-code">3</code>：正则表达式</li></ul><div class="notion-text notion-block-3784d4490a104767938ff085f4828f34">接口返回结果中通常包含命中的块列表、命中块数量、命中文档数量、页数等信息。SQL 模式需要管理员权限；如果只是做普通搜索集成，优先使用关键字、查询语法或正则模式。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-44f6783ca0f9410284bd7e4f346d37ae" data-id="44f6783ca0f9410284bd7e4f346d37ae"><span><div id="44f6783ca0f9410284bd7e4f346d37ae" class="notion-header-anchor"></div><a class="notion-hash-link" href="#44f6783ca0f9410284bd7e4f346d37ae" title="搜不到或结果不准时"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">搜不到或结果不准时</span></span></h3><div class="notion-text notion-block-fe264bc6e4e04dd6be338daee6961dd9">按这个顺序排查，通常最快：</div><ol start="1" class="notion-list notion-list-numbered notion-block-b561ffb51240448bb9692ce11457bd72" style="list-style-type:decimal"><li>先清空路径限制，确认不是搜错笔记本或文档。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-92f571ee76264518a1594a1f2f682bcb" style="list-style-type:decimal"><li>检查是否启用了“包含子文档”。只限定父文档时，可能不会覆盖你想搜的子文档。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-eef2372e674a4ec39ac8118bf91f138d" style="list-style-type:decimal"><li>检查块级类型过滤。只勾选标题时，自然搜不到正文段落。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-f7a467bfedfb4208b7eeafa6a375808e" style="list-style-type:decimal"><li>检查搜索方式。逻辑查询要用“查询语法”，格式匹配要用“正则表达式”。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-8337652596844a50a529e6d86dd972cf" style="list-style-type:decimal"><li>检查“设置 → 搜索”中的块级类型、块级属性、区分大小写、搜索结果显示数。</li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-05ff559b30e9418a9f108fcd3217ed9d" style="list-style-type:decimal"><li>如果目标内容在附件里，改用“搜索资源文件内容”。</li></ol><ol start="7" class="notion-list notion-list-numbered notion-block-5a987c0bbe0a4fcaa5f1e5bd7fb59171" style="list-style-type:decimal"><li>如果某些内容被配置为忽略搜索，需要调整忽略搜索规则。</li></ol><ol start="8" class="notion-list notion-list-numbered notion-block-cd9367142ca344c88df526d03fe9c4d7" style="list-style-type:decimal"><li>如果索引疑似异常，可以在“设置 → 搜索 → 索引”中重建索引。重建期间可能占用资源，建议在不急用时操作。</li></ol><ol start="9" class="notion-list notion-list-numbered notion-block-31499c039e644cf6bc32ac128f1f7ff9" style="list-style-type:decimal"><li>如果全局搜索响应较慢，增加关键词、设置类型过滤或缩小路径范围。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-d0790c415f1a4470ab8486431fba095c" data-id="d0790c415f1a4470ab8486431fba095c"><span><div id="d0790c415f1a4470ab8486431fba095c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d0790c415f1a4470ab8486431fba095c" title="推荐学习路径"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">推荐学习路径</span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-e93faebd5d0a49d382bf26d0bc4bca50" style="list-style-type:decimal"><li>先熟悉全局搜索、当前文档搜索、路径过滤和块类型过滤。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-05797a2eab1c4fce8582237e0af5e0eb" style="list-style-type:decimal"><li>再学习查询语法，用 <code class="notion-inline-code">AND</code>、<code class="notion-inline-code">OR</code>、<code class="notion-inline-code">NOT</code> 解决大部分复杂搜索。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-e6bc54c8c3a4498aad5ed9e729d437e5" style="list-style-type:decimal"><li>需要查格式时学习正则表达式。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-64405fcb9c0e4d759b869add3fc3dfbd" style="list-style-type:decimal"><li>需要按块类型、时间、任务状态汇总时，再学习 SQL 和嵌入块。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-ac23dea2b67f4295bde44042a696c49e" style="list-style-type:decimal"><li>需要自动化时，再使用搜索 API 或插件接口。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-17efea67ff174bbbae31cddc3d92e0e4" data-id="17efea67ff174bbbae31cddc3d92e0e4"><span><div id="17efea67ff174bbbae31cddc3d92e0e4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#17efea67ff174bbbae31cddc3d92e0e4" title="参考资料"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">参考资料</span></span></h3><ul class="notion-list notion-list-disc notion-block-21283b0430814178949ad871477433d3"><li><a class="notion-link" href="https://siyuannote.com/article/1735150477" target="_blank" rel="noopener noreferrer">笔记搜索 | 思源笔记用户指南</a></li></ul><ul class="notion-list notion-list-disc notion-block-8079cd0c7ee84f66bc86ba98cd11b944"><li><a class="notion-link" href="https://siyuannote.com/article/1724743375" target="_blank" rel="noopener noreferrer">查询语法 | 思源笔记用户指南</a></li></ul><ul class="notion-list notion-list-disc notion-block-deeabca3a54a42d09bfd6c33bc164391"><li><a class="notion-link" href="https://siyuannote.com/article/1725202966" target="_blank" rel="noopener noreferrer">搜索资源文件内容 | 思源笔记用户指南</a></li></ul><ul class="notion-list notion-list-disc notion-block-966be7bd78854de1b7f2280fb478bb17"><li><a class="notion-link" href="https://siyuannote.com/article/1724743432" target="_blank" rel="noopener noreferrer">忽略搜索 | 思源笔记用户指南</a></li></ul><ul class="notion-list notion-list-disc notion-block-8d5200ec7d1f41b28d305fc9d359d9f9"><li><a class="notion-link" href="https://github.com/siyuan-note/siyuan/blob/master/kernel/api/search.go" target="_blank" rel="noopener noreferrer">思源笔记源码：搜索接口</a></li></ul><ul class="notion-list notion-list-disc notion-block-a5b8eb0d22944622b2ca3069fb1ded5f"><li><a class="notion-link" href="https://ld246.com/article/1715212892616" target="_blank" rel="noopener noreferrer">重建索引安全吗 - 链滴</a></li></ul></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[超链接]]></title>
            <link>https://siyuannote.com/article/1725202932</link>
            <guid>https://siyuannote.com/article/1725202932</guid>
            <pubDate>Fri, 31 Dec 2021 00:00:00 GMT</pubDate>
            <description><![CDATA[介绍思源 siyuan:// 块超链接的格式、复制方式、Markdown 用法、系统协议注册、Linux 配置和常见跳转问题。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-177c4a5595ce46d0baa0533ee866814e"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-6bbb985115714bee894f30be4c0a6888" data-id="6bbb985115714bee894f30be4c0a6888"><span><div id="6bbb985115714bee894f30be4c0a6888" class="notion-header-anchor"></div><a class="notion-hash-link" href="#6bbb985115714bee894f30be4c0a6888" title="概述"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">概述</span></span></h2><div class="notion-text notion-block-7aa8336cd07243f78456add969488824">思源支持使用 <code class="notion-inline-code">siyuan://</code> 协议从外部应用跳转到桌面端里的指定内容块。这个链接常用于浏览器书签、任务管理工具、日历、聊天软件、Markdown 文档或其他支持超链接的软件中。</div><div class="notion-text notion-block-c2d2d66fea0c44fa936bced01e4b08f1">最常见的形式是：</div><div class="notion-text notion-block-8041b5206aaa41f9a40d53b8d0eff29e">点击后，系统会尝试唤起思源桌面端，并定位到对应的块。</div><div class="notion-callout notion-yellow_background_co notion-block-e616c3fca901441e8805fdd8e6436d85"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="⚠️">⚠️</span></div><div class="notion-callout-text"><div class="notion-text notion-block-b82f9115358c48ba80a6e3e542a5abe2"><code class="notion-inline-code">Siyuan://</code> 块超链接依赖本机已经安装并注册了思源桌面端协议。它不是网页分享链接，也不能让没有本地数据的人访问你的笔记内容。</div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-b7f48aa1b3ef4de69a5a457aadc17ce8" data-id="b7f48aa1b3ef4de69a5a457aadc17ce8"><span><div id="b7f48aa1b3ef4de69a5a457aadc17ce8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b7f48aa1b3ef4de69a5a457aadc17ce8" title="适用场景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">适用场景</span></span></h2><ul class="notion-list notion-list-disc notion-block-69dd20ae05c94712a99634c1eb1f2a63"><li>在外部待办事项中关联某条笔记、段落或任务块</li></ul><ul class="notion-list notion-list-disc notion-block-c45e33f52a6e4e0a9d2d249bbb1ec724"><li>在浏览器书签里保存常用文档入口</li></ul><ul class="notion-list notion-list-disc notion-block-9365cab75a704cf4b10f12ebe7d69b02"><li>在聊天、邮件、项目管理工具中给自己或同设备用户快速跳转</li></ul><ul class="notion-list notion-list-disc notion-block-4761bf7a81094e1098887d1e4810c067"><li>在其他 Markdown 文档中引用思源里的某个块</li></ul><ul class="notion-list notion-list-disc notion-block-232d34060665403c83719bc57936fa55"><li>配合启动器、快捷指令、自动化工具快速打开指定内容</li></ul><div class="notion-text notion-block-17a0cc7d07ce4f52a9b84b2209f9793c">如果只是想在思源内部引用内容，通常优先使用块引用、嵌入块或内部链接；如果要从思源外部跳回桌面端，再使用 <code class="notion-inline-code">siyuan://</code> 超链接。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-94fb858f3f244950bb0830104f01f2d2" data-id="94fb858f3f244950bb0830104f01f2d2"><span><div id="94fb858f3f244950bb0830104f01f2d2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#94fb858f3f244950bb0830104f01f2d2" title="链接格式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">链接格式</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-01f6135ff1ce4892b8f4cf320caeac1b" data-id="01f6135ff1ce4892b8f4cf320caeac1b"><span><div id="01f6135ff1ce4892b8f4cf320caeac1b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#01f6135ff1ce4892b8f4cf320caeac1b" title="打开指定块"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">打开指定块</span></span></h3><div class="notion-text notion-block-fa23d928fb694a3faccf13cd9c30a2cb">其中 <code class="notion-inline-code">{id}</code> 是目标块 ID，例如：</div><div class="notion-text notion-block-9e0bfc9e525b4e56b5ab44bd1bdff718">要求：</div><ul class="notion-list notion-list-disc notion-block-4b8034dab4bb4f35ab30ff9a25f1fdf8"><li>思源桌面端已经安装并能被系统唤起</li></ul><ul class="notion-list notion-list-disc notion-block-3881f4284fb4808da500e36e7dfd8511"><li>目标块所在的工作空间是当前桌面端正在使用的工作空间</li></ul><ul class="notion-list notion-list-disc notion-block-5a277bedd20f4376b848653dea338006"><li>目标块所在笔记本已经处于打开状态</li></ul><ul class="notion-list notion-list-disc notion-block-85f98a1eaf944143b3333a6282de7780"><li>目标块没有被删除</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-e0b304110aec4c2188d9adf008a2496f" data-id="e0b304110aec4c2188d9adf008a2496f"><span><div id="e0b304110aec4c2188d9adf008a2496f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e0b304110aec4c2188d9adf008a2496f" title="聚焦打开"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">聚焦打开</span></span></h3><div class="notion-text notion-block-fed755423f4d4a6ca6a60791d7db5ff5">在链接后加入 <code class="notion-inline-code">focus=1</code>，可以让思源打开后聚焦到目标块：</div><div class="notion-text notion-block-12c4847c8da541ed95fe7ad617592c1d">例如：</div><div class="notion-text notion-block-a064c7df00fe479fa6e236b8f7547f1a">如果链接里还需要追加其他查询参数，请使用标准 URL 查询字符串写法，用 <code class="notion-inline-code">&amp;</code> 连接多个参数。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3cc32c6835e64f26a0e16a6517f5c8e7" data-id="3cc32c6835e64f26a0e16a6517f5c8e7"><span><div id="3cc32c6835e64f26a0e16a6517f5c8e7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3cc32c6835e64f26a0e16a6517f5c8e7" title="如何复制块超链接"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">如何复制块超链接</span></span></h2><ol start="1" class="notion-list notion-list-numbered notion-block-c7f5ca4a4d3b4fa2b729ace70b46f634" style="list-style-type:decimal"><li>在思源中找到目标块。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-5ddab99f19dc480b95eb13c043b85da8" style="list-style-type:decimal"><li>打开块标菜单。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-5ae594506555463db5a29607f842f5a3" style="list-style-type:decimal"><li>选择 <code class="notion-inline-code">复制</code>。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-dfdde5dc343549f18208cb6a76384207" style="list-style-type:decimal"><li>选择 <code class="notion-inline-code">复制块超链接</code>。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-83f59b22019e4a2faa1713f6e86fb939" style="list-style-type:decimal"><li>将复制得到的 <code class="notion-inline-code">siyuan://blocks/...</code> 链接粘贴到外部应用中。</li></ol><div class="notion-text notion-block-34572668b84644e68fc7c876f33f6283">块标菜单通常位于块左侧。不同平台、主题或移动端界面可能略有差异，但入口都围绕块菜单展开。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-06ab2d5a3cab4cdbbfde799b9b84da84" data-id="06ab2d5a3cab4cdbbfde799b9b84da84"><span><div id="06ab2d5a3cab4cdbbfde799b9b84da84" class="notion-header-anchor"></div><a class="notion-hash-link" href="#06ab2d5a3cab4cdbbfde799b9b84da84" title="放到 Markdown 中"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">放到 Markdown 中</span></span></h2><div class="notion-text notion-block-f7f0fb1c38f14a57ada0e0897398e21d">如果目标软件支持 Markdown，可以把块超链接写成普通链接：</div><div class="notion-text notion-block-ead4c39b438245deb4c9401e2a787af3">也可以使用聚焦打开：</div><div class="notion-text notion-block-96506926e7d64c3f9a7700bb0db4bc71">部分软件会限制非 <code class="notion-inline-code">http</code> 协议链接，导致 <code class="notion-inline-code">siyuan://</code> 无法点击或被自动转义。遇到这种情况时，可以改为直接粘贴纯文本链接，或检查该软件是否允许自定义协议跳转。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-add8cf8fbfb242cc8e49dc833be3acf1" data-id="add8cf8fbfb242cc8e49dc833be3acf1"><span><div id="add8cf8fbfb242cc8e49dc833be3acf1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#add8cf8fbfb242cc8e49dc833be3acf1" title="系统注册"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">系统注册</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3aabe8eda999405594e6b84e52342a88" data-id="3aabe8eda999405594e6b84e52342a88"><span><div id="3aabe8eda999405594e6b84e52342a88" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3aabe8eda999405594e6b84e52342a88" title="Windows 和 macOS"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Windows 和 macOS</span></span></h3><div class="notion-text notion-block-bbe0d790b6ab443da45b836b7bdb9fae">Windows 和 macOS 上，思源桌面端启动后通常会自动向系统注册 <code class="notion-inline-code">siyuan://</code> 协议。</div><div class="notion-text notion-block-e8a5fc678e724755bb615183547ea979">如果点击链接没有反应，可以尝试：</div><ul class="notion-list notion-list-disc notion-block-d08a0ec47b7c47ceae2e04ca1d6daf74"><li>确认已经安装并启动过思源桌面端</li></ul><ul class="notion-list notion-list-disc notion-block-79101995125b42728a2f829bb69ac05d"><li>退出并重新启动思源</li></ul><ul class="notion-list notion-list-disc notion-block-140f72a0e5d9473abde9ee4b6ef1e2fd"><li>更新到较新的桌面端版本</li></ul><ul class="notion-list notion-list-disc notion-block-ab402b676d6b467b8d8237b75b9d69dc"><li>检查系统是否弹出过“允许打开思源”的确认窗口</li></ul><ul class="notion-list notion-list-disc notion-block-94e5021226e147b584f4dd5845bf5067"><li>在浏览器地址栏中直接粘贴 <code class="notion-inline-code">siyuan://blocks/{id}</code> 测试</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3344450635404d84aba05612c0da2bc7" data-id="3344450635404d84aba05612c0da2bc7"><span><div id="3344450635404d84aba05612c0da2bc7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3344450635404d84aba05612c0da2bc7" title="Linux"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Linux</span></span></h3><div class="notion-text notion-block-7455e33af3204006b1fa5a6de66ae83f">Linux 上可能需要手动注册 URL Scheme。大致流程如下：</div><ol start="1" class="notion-list notion-list-numbered notion-block-f25586905e4642ab8c96477842ee230f" style="list-style-type:decimal"><li>创建或找到 <code class="notion-inline-code">siyuan.desktop</code> 文件。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-b83c3e70458e4048a94e638e25a22c27" style="list-style-type:decimal"><li>确保文件中包含协议关联：</li></ol><ol start="1" class="notion-list notion-list-numbered notion-block-c30a9473e3884160ae10bd30d1f6b483" style="list-style-type:decimal"><li>确保 <code class="notion-inline-code">Exec</code> 后面带有 <code class="notion-inline-code">%u</code>，用于接收外部传入的链接：</li></ol><ol start="1" class="notion-list notion-list-numbered notion-block-e581b21c24a6450bb686b4b5b56d4d1b" style="list-style-type:decimal"><li>更新桌面数据库并设置默认处理程序：</li></ol><ol start="1" class="notion-list notion-list-numbered notion-block-163fc979752846618fe22b0950d933b8" style="list-style-type:decimal"><li>测试是否能唤起：</li></ol><div class="notion-text notion-block-79fbbdd123d746f5a804ae030bf30275">更多细节可参考 <a class="notion-link" href="https://www.freedesktop.org/wiki/Software/xdg-utils/" target="_blank" rel="noopener noreferrer">xdg-utils</a>。</div><div class="notion-callout notion-blue_background_co notion-block-7d42f517f37f40129c06e9b6f3221132"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-65ee63cc6c82459998068d310649d0f9">如果 Linux 桌面环境不一致，<code class="notion-inline-code">.desktop</code> 文件的位置和刷新方式可能不同。常见位置包括 <code class="notion-inline-code">~/.local/share/applications/</code> 和 <code class="notion-inline-code">/usr/share/applications/</code>。</div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-51716bf10e5642fbaa56f4ab25f665c5" data-id="51716bf10e5642fbaa56f4ab25f665c5"><span><div id="51716bf10e5642fbaa56f4ab25f665c5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#51716bf10e5642fbaa56f4ab25f665c5" title="常见问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">常见问题</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-c04a46977f294a73b6f8a8c329fa1087" data-id="c04a46977f294a73b6f8a8c329fa1087"><span><div id="c04a46977f294a73b6f8a8c329fa1087" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c04a46977f294a73b6f8a8c329fa1087" title="点击后只打开思源，没有跳到目标块"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">点击后只打开思源，没有跳到目标块</span></span></h3><div class="notion-text notion-block-240524ff642b43c0b34a50ec00569187">可能原因：</div><ul class="notion-list notion-list-disc notion-block-870fc4c47764494ab30e6c5af629dd29"><li>块 ID 不正确或块已被删除</li></ul><ul class="notion-list notion-list-disc notion-block-344bc2fc16c042fea069fea4b3d9d3b5"><li>当前打开的不是包含该块的工作空间</li></ul><ul class="notion-list notion-list-disc notion-block-e9b8250fd93244708b4f5211a0b4771a"><li>目标块所在笔记本没有打开</li></ul><ul class="notion-list notion-list-disc notion-block-3a8c8a1d61494e3fa3325175b5f35183"><li>外部软件没有完整传递 <code class="notion-inline-code">siyuan://blocks/{id}</code> 链接</li></ul><ul class="notion-list notion-list-disc notion-block-f64798086b754bde9ee889926b9bffb4"><li>外部软件对自定义协议兼容性不好</li></ul><div class="notion-text notion-block-06e6650d1fec4467a0ff7cf29506da55">建议先把同一个链接粘贴到浏览器地址栏测试。如果浏览器能跳转，问题通常在外部软件；如果浏览器也不能跳转，再检查思源本身和块 ID。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-aa3fa43824e94b13a868c376bcca8322" data-id="aa3fa43824e94b13a868c376bcca8322"><span><div id="aa3fa43824e94b13a868c376bcca8322" class="notion-header-anchor"></div><a class="notion-hash-link" href="#aa3fa43824e94b13a868c376bcca8322" title="外部软件不允许点击 siyuan:// 链接"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">外部软件不允许点击 <code class="notion-inline-code">siyuan://</code> 链接</span></span></h3><div class="notion-text notion-block-b88deeb689f7436e8010ac4745aedc44">一些软件只允许 <code class="notion-inline-code">http://</code> 或 <code class="notion-inline-code">https://</code> 链接，可能会把 <code class="notion-inline-code">siyuan://</code> 当作普通文本或危险链接处理。</div><div class="notion-text notion-block-97b7191f37f941408e7fa79683f0f4e2">可以尝试：</div><ul class="notion-list notion-list-disc notion-block-3a165301b247479ba47cfe1d95ba97fa"><li>使用 Markdown 链接格式</li></ul><ul class="notion-list notion-list-disc notion-block-83818639ac8b412595d702ea795881a6"><li>直接粘贴纯文本链接</li></ul><ul class="notion-list notion-list-disc notion-block-155fa64629c74e52b637f6d02cb54b42"><li>换到浏览器、系统运行窗口或支持自定义协议的软件中测试</li></ul><ul class="notion-list notion-list-disc notion-block-4d225bbb28c545b081d9e195eb344322"><li>查看目标软件是否有“允许外部协议”或“打开外部应用”的设置</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-4cd5b20475204fa9877394c534d06424" data-id="4cd5b20475204fa9877394c534d06424"><span><div id="4cd5b20475204fa9877394c534d06424" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4cd5b20475204fa9877394c534d06424" title="移动端点击后行为不一致"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">移动端点击后行为不一致</span></span></h3><div class="notion-text notion-block-85ff8e5d9f1c44738f82fd69f04c3954"><code class="notion-inline-code">Siyuan://</code> 超链接主要用于拉起桌面端。移动端、浏览器环境或第三方应用中的跳转行为可能受系统和应用限制影响，并不一定和桌面端完全一致。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-c059e01ec9e64534867dc5b9510b541a" data-id="c059e01ec9e64534867dc5b9510b541a"><span><div id="c059e01ec9e64534867dc5b9510b541a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c059e01ec9e64534867dc5b9510b541a" title="链接发给别人能不能打开"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">链接发给别人能不能打开</span></span></h3><div class="notion-text notion-block-c8dd12e8759b43ff94712362f88d988d">能否打开取决于对方本机是否有同一个块：</div><ul class="notion-list notion-list-disc notion-block-039f2124e9a94252bf695ccad252d9b3"><li>对方必须安装思源并注册 <code class="notion-inline-code">siyuan://</code> 协议</li></ul><ul class="notion-list notion-list-disc notion-block-1060a7c495034e96a9c3774edd93762b"><li>对方必须拥有包含该块 ID 的工作空间数据</li></ul><ul class="notion-list notion-list-disc notion-block-dbc4abfabb4b4adda558dab5478b663e"><li>对方当前工作空间和笔记本状态也会影响跳转</li></ul><div class="notion-text notion-block-f9068fa2cf33477ea73c31eb3436d2a2">因此块超链接更适合个人跨软件跳转，不适合作为公开分享链接。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-8873fb3edbda426d91b34034dafd083b" data-id="8873fb3edbda426d91b34034dafd083b"><span><div id="8873fb3edbda426d91b34034dafd083b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8873fb3edbda426d91b34034dafd083b" title="超链接和其他链接方式的区别"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">超链接和其他链接方式的区别</span></span></h2><table class="notion-simple-table notion-block-37b4261b668e4c4586f23563a38743e6"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3b8087a658714a349de34e8cd72a8ec5"><td class="" style="width:120px"><div class="notion-simple-table-cell">方式</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">适用范围</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">说明</div></td></tr><tr class="notion-simple-table-row notion-block-0e9f2cf24a4d464b8057c605666d3f00"><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">siyuan://blocks/{id}</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">思源外部跳转到桌面端</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">需要本机安装思源并有对应数据</div></td></tr><tr class="notion-simple-table-row notion-block-cb24988132214aa0a6238eb35375ff11"><td class="" style="width:120px"><div class="notion-simple-table-cell">块引用</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">思源内部引用</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">适合在笔记内引用另一个块</div></td></tr><tr class="notion-simple-table-row notion-block-d04b276ce6334399816c768b469924b3"><td class="" style="width:120px"><div class="notion-simple-table-cell">嵌入块</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">思源内部复用内容</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">适合把查询或块内容嵌入当前文档</div></td></tr><tr class="notion-simple-table-row notion-block-54f2e59115e04b5e8076989ab66fca12"><td class="" style="width:120px"><div class="notion-simple-table-cell">网页分享链接</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">网页访问</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">依赖发布、分享或站点服务，不等同于本地块超链接</div></td></tr></tbody></table><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-8e18fb9460964ceba559a1beb198cb58" data-id="8e18fb9460964ceba559a1beb198cb58"><span><div id="8e18fb9460964ceba559a1beb198cb58" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8e18fb9460964ceba559a1beb198cb58" title="使用建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用建议</span></span></h2><ul class="notion-list notion-list-disc notion-block-e0ac2346345e4274bf4e9f997c5798dd"><li>给重要块建立稳定链接前，先确认该块不太会被删除或重建</li></ul><ul class="notion-list notion-list-disc notion-block-309eaafbbced498c8ac61ca7fd65e884"><li>外部工具里保存链接时，建议同时写上简短标题，避免只有一串块 ID</li></ul><ul class="notion-list notion-list-disc notion-block-ec22f121477d485db8341e8047a824d8"><li>公开文档中不要把 <code class="notion-inline-code">siyuan://</code> 当作分享链接使用</li></ul><ul class="notion-list notion-list-disc notion-block-7118bd5d497b45c3af2ca56d23233295"><li>出现跳转问题时，优先用浏览器地址栏或 <code class="notion-inline-code">xdg-open</code> 做最小化测试</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-e9aea013c0f945f1966afa3c4e76efc6" data-id="e9aea013c0f945f1966afa3c4e76efc6"><span><div id="e9aea013c0f945f1966afa3c4e76efc6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e9aea013c0f945f1966afa3c4e76efc6" title="参考资料"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">参考资料</span></span></h2><ul class="notion-list notion-list-disc notion-block-1056e186fbb94cf79dbbafef8919d0bc"><li><a class="notion-link" href="https://siyuannote.com/article/1725202932" target="_blank" rel="noopener noreferrer">思源笔记用户指南：超链接</a></li></ul><ul class="notion-list notion-list-disc notion-block-b478b7fa8cf0419ab9e32d261679b957"><li><a class="notion-link" href="https://www.freedesktop.org/wiki/Software/xdg-utils/" target="_blank" rel="noopener noreferrer">xdg-utils</a></li></ul></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker 伺服]]></title>
            <link>https://siyuannote.com/article/1725202944</link>
            <guid>https://siyuannote.com/article/1725202944</guid>
            <pubDate>Fri, 31 Dec 2021 00:00:00 GMT</pubDate>
            <description><![CDATA[使用官方 Docker 镜像部署思源笔记，包含 docker run、Docker Compose、权限、反向代理、升级备份和常见问题。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-ca8ed53dcdfd4507a49ea393bc6db243"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-bbe86522debd48fd92ac39164a397cb5">在服务器或 NAS 上运行思源，最简单稳定的方案是使用官方 Docker 镜像 <code class="notion-inline-code">b3log/siyuan</code>。部署完成后，通过浏览器访问 <code class="notion-inline-code">http://服务器 IP:6806</code> 即可使用。</div><div class="notion-callout notion-red_background_co notion-block-3a2a128fe33b4f8daba3d67e378beb61"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="⚠️">⚠️</span></div><div class="notion-callout-text"><div class="notion-text notion-block-8f61abe8393a42ed808d2e3beae4e0b5"><b>先确认工作空间挂载正确。</b> 思源数据保存在工作空间目录中，如果 <code class="notion-inline-code">-v</code> 或 <code class="notion-inline-code">volumes</code> 写错，容器删除后可能会造成数据丢失。公开访问时务必设置强访问授权码。</div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-f5bfaa985acb47fb93d4387bb4679d55" data-id="f5bfaa985acb47fb93d4387bb4679d55"><span><div id="f5bfaa985acb47fb93d4387bb4679d55" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f5bfaa985acb47fb93d4387bb4679d55" title="适用场景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">适用场景</span></span></h2><ul class="notion-list notion-list-disc notion-block-e715af2f265946e3be6b38fad7ba1b5b"><li>适合在 Linux 服务器、NAS、Unraid、TrueNAS、群晖等环境中长期运行</li></ul><ul class="notion-list notion-list-disc notion-block-f4477892de854c25bc326b13526f5963"><li>适合只需要通过浏览器访问思源的场景</li></ul><ul class="notion-list notion-list-disc notion-block-92cabd3bf770493a9614a4e1cd903d90"><li>不适合把 Docker 版当作桌面端或移动端的同步服务</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-44123e926f864c22849c0ac54aef58e1" data-id="44123e926f864c22849c0ac54aef58e1"><span><div id="44123e926f864c22849c0ac54aef58e1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#44123e926f864c22849c0ac54aef58e1" title="镜像信息"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">镜像信息</span></span></h2><ul class="notion-list notion-list-disc notion-block-ebd17a78e8b2485a9d8d64a436ea7d20"><li>镜像名称：<code class="notion-inline-code">b3log/siyuan</code></li></ul><ul class="notion-list notion-list-disc notion-block-7b1775c6e0d04c6fa7bba33a4d8f2d74"><li>镜像地址：<a class="notion-link" href="http://hub.docker.com/r/b3log/siyuan" target="_blank" rel="noopener noreferrer">hub.docker.com/r/b3log/siyuan</a></li></ul><ul class="notion-list notion-list-disc notion-block-8f3e26a865c040928aa1a73aad754292"><li>官方源码：<a class="notion-link" href="http://github.com/siyuan-note/siyuan" target="_blank" rel="noopener noreferrer">github.com/siyuan-note/siyuan</a></li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-58a3a940ae904a51833960cea5a0cbdf" data-id="58a3a940ae904a51833960cea5a0cbdf"><span><div id="58a3a940ae904a51833960cea5a0cbdf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#58a3a940ae904a51833960cea5a0cbdf" title="程序结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">程序结构</span></span></h2><div class="notion-text notion-block-87d5d7420c3a4c68a53c1530fd3e0070">容器内程序位于 <code class="notion-inline-code">/opt/siyuan/</code>，主要结构如下：</div><ul class="notion-list notion-list-disc notion-block-bdfc4394f9b54592b3d3995de24d10ad"><li><code class="notion-inline-code">appearance</code>：图标、主题、多语言资源</li></ul><ul class="notion-list notion-list-disc notion-block-9e2ef27532f34f92844009cc156b2737"><li><code class="notion-inline-code">guide</code>：帮助文档</li></ul><ul class="notion-list notion-list-disc notion-block-d13891d0443043f9ab1aef1401096109"><li><code class="notion-inline-code">stage</code>：界面和静态资源</li></ul><ul class="notion-list notion-list-disc notion-block-bbca1898697e42c5a01df35478d7b608"><li><code class="notion-inline-code">kernel</code>：思源内核程序</li></ul><ul class="notion-list notion-list-disc notion-block-bf308fe49e984daf90ba417406d3be22"><li><code class="notion-inline-code">entrypoint.sh</code>：容器启动入口脚本</li></ul><div class="notion-text notion-block-8de89351c77d4b08bbbdebe74aec7fd7">当前 Docker 镜像入口为：</div><div class="notion-text notion-block-1c7c2bdf7a9444bdaf7a35358c95149d">启动时最终会运行思源内核，并把工作空间路径、访问授权码等参数传给内核。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-4626d0035b524c8bb91922664bbcc184" data-id="4626d0035b524c8bb91922664bbcc184"><span><div id="4626d0035b524c8bb91922664bbcc184" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4626d0035b524c8bb91922664bbcc184" title="1 分钟启动"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1 分钟启动</span></span></h2><div class="notion-text notion-block-acf6f7e741d348aab47d15da8106c934">以下示例把宿主机和容器内的工作空间都统一为 <code class="notion-inline-code">/siyuan/workspace</code>，这样最不容易写错路径。</div><div class="notion-text notion-block-7be652c0f0e847a4b777ff3a26cefc45">启动后访问：</div><div class="notion-text notion-block-ef35a7fbde764a41a61d426c1ac137d3">查看运行状态：</div><div class="notion-text notion-block-874e590f2c80468db410c6240aa98bf6">停止和启动：</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-318eca69f3594801b03391529f1556e0" data-id="318eca69f3594801b03391529f1556e0"><span><div id="318eca69f3594801b03391529f1556e0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#318eca69f3594801b03391529f1556e0" title="参数说明"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">参数说明</span></span></h2><ul class="notion-list notion-list-disc notion-block-20d1f4284fb480cfafdfe9a5972b1026"><li><code class="notion-inline-code">-v /siyuan/workspace:/siyuan/workspace</code>：把宿主机目录挂载为容器内工作空间</li></ul><ul class="notion-list notion-list-disc notion-block-20d1f4284fb4801eba30cba4ad03cb19"><li><code class="notion-inline-code">-p 6806:6806</code>：把思源 Web 端口暴露到宿主机</li></ul><ul class="notion-list notion-list-disc notion-block-268f55ddb6f84f7c82d002a96642726a"><li><code class="notion-inline-code">PUID</code>：容器内运行用户的用户 ID，未设置时默认 <code class="notion-inline-code">1000</code></li></ul><ul class="notion-list notion-list-disc notion-block-3f319d3d8505436285f952e6fb5e1547"><li><code class="notion-inline-code">PGID</code>：容器内运行用户的用户组 ID，未设置时默认 <code class="notion-inline-code">1000</code></li></ul><ul class="notion-list notion-list-disc notion-block-42c90617839a47a3ae8d5748753443c5"><li><code class="notion-inline-code">--workspace</code>：指定思源工作空间路径</li></ul><ul class="notion-list notion-list-disc notion-block-724ec68e06904d37a19e3ce79d77b7ee"><li><code class="notion-inline-code">--accessAuthCode</code>：访问授权码，请务必改成强密码</li></ul><div class="notion-text notion-block-de8b55ffb7b84fccbaffa02c149752ff">可以用下面命令查看当前 Linux 用户的 UID 和 GID：</div><div class="notion-text notion-block-1f682bb330e845ebb6375a1273f8ff38">如果宿主机工作空间属于当前用户，例如 UID/GID 是 <code class="notion-inline-code">1001:1002</code>，则要同步调整目录权限和环境变量：</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-4e45412ba97d4c829cdd1437c6800044" data-id="4e45412ba97d4c829cdd1437c6800044"><span><div id="4e45412ba97d4c829cdd1437c6800044" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4e45412ba97d4c829cdd1437c6800044" title="Docker Compose 部署"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Docker Compose 部署</span></span></h2><div class="notion-text notion-block-0949be66e3934fd28a5bee5edc78c714">更推荐长期使用 Docker Compose，方便升级、重启和维护。</div><div class="notion-text notion-block-09be807fe2364118a72fc3e1cb355a76">在服务器上创建 <code class="notion-inline-code">compose.yaml</code>：</div><div class="notion-text notion-block-35acd49636824b4aaf538f9715a6658a">同目录创建 <code class="notion-inline-code">.env</code>：</div><div class="notion-text notion-block-03373a1424e94939bb8f0e440de79c14">启动：</div><div class="notion-text notion-block-66970799bc56493c8d900044a7421c24">查看日志：</div><div class="notion-text notion-block-757385b1f0a94c05a6bdba374358c8cc">关闭：</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-6c9e84e72227445fa418aceeb1beee33" data-id="6c9e84e72227445fa418aceeb1beee33"><span><div id="6c9e84e72227445fa418aceeb1beee33" class="notion-header-anchor"></div><a class="notion-hash-link" href="#6c9e84e72227445fa418aceeb1beee33" title="环境变量写法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">环境变量写法</span></span></h2><div class="notion-text notion-block-741daa7b37f3432aa7a6059121520d8a">除了命令行参数，也可以使用环境变量指定工作空间和访问授权码：</div><div class="notion-text notion-block-b4bb54f70d86441ab0e900d7ad8ea409">如果命令行参数和环境变量同时存在，命令行参数优先级更高。</div><div class="notion-text notion-block-bad9aef43284491981ee7def73888f3d">不建议公开部署时关闭访问授权码。如果只在完全可信的内网环境中使用，可以通过下面变量跳过授权码：</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-a648868edb0e482eb080e58085d8a1b1" data-id="a648868edb0e482eb080e58085d8a1b1"><span><div id="a648868edb0e482eb080e58085d8a1b1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a648868edb0e482eb080e58085d8a1b1" title="权限处理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">权限处理</span></span></h2><div class="notion-text notion-block-3198aa3a26834c5cbb233ea63bf5d9d6">官方镜像会通过 <code class="notion-inline-code">entrypoint.sh</code> 根据 <code class="notion-inline-code">PUID</code> 和 <code class="notion-inline-code">PGID</code> 创建或调整容器内的 <code class="notion-inline-code">siyuan</code> 用户。现在通常不需要再额外传 <code class="notion-inline-code">-u 1000:1000</code>。</div><div class="notion-text notion-block-9148bba36d364c469c079560098e3fbc">如果出现无法创建文件、无法保存、启动时报 <code class="notion-inline-code">permission denied</code>，优先检查：</div><div class="notion-text notion-block-156ebca9ff1c4322a7f913a16f73868b">然后让目录所属用户和容器环境变量保持一致：</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-80a3f5df24a94800a195babec48bd8ed" data-id="80a3f5df24a94800a195babec48bd8ed"><span><div id="80a3f5df24a94800a195babec48bd8ed" class="notion-header-anchor"></div><a class="notion-hash-link" href="#80a3f5df24a94800a195babec48bd8ed" title="反向代理和隐藏端口"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">反向代理和隐藏端口</span></span></h2><div class="notion-text notion-block-a004c7f875e74971a683f2f275159c30">如果需要通过域名访问，建议使用 NGINX、Caddy、Traefik 等反向代理，并把 Docker 端口只绑定到本机。</div><div class="notion-text notion-block-dc4f5d790de54f04826128e61f55bd92">Docker 端口改为：</div><div class="notion-text notion-block-30faf47796ee419c80b167a003a71f4f">Docker Compose 写法：</div><div class="notion-text notion-block-e26ef9521fc04615aeb8d45bb85870b6">NGINX 示例：</div><div class="notion-callout notion-yellow_background_co notion-block-9b81bf01ddd24644ac8426772d18dae5"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text"><div class="notion-text notion-block-d1c68a85ad1c4126a159f5f6edbda9c7">建议使用独立域名或子域名，例如 <code class="notion-inline-code">siyuan.example.com</code>。不要用 URL 重写把思源挂到某个子路径下，否则鉴权和 WebSocket 可能出现异常。</div></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-fe6075e84d614ab4ad3fa713915b6385" data-id="fe6075e84d614ab4ad3fa713915b6385"><span><div id="fe6075e84d614ab4ad3fa713915b6385" class="notion-header-anchor"></div><a class="notion-hash-link" href="#fe6075e84d614ab4ad3fa713915b6385" title="升级"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">升级</span></span></h2><div class="notion-text notion-block-7606c94862e14ce88eece47bae5a0d66">升级前先备份工作空间。使用 Compose 时推荐流程如下：</div><div class="notion-text notion-block-4d271de516be4df39a4572d3b311e358">生产环境更稳妥的做法是固定镜像版本，例如：</div><div class="notion-text notion-block-7be00c3a77544a46a2446d928f1ee90e">确认新版正常后再修改版本号升级。可在 <a class="notion-link" href="https://hub.docker.com/r/b3log/siyuan/tags" target="_blank" rel="noopener noreferrer">Docker Hub Tags</a> 或 <a class="notion-link" href="https://github.com/siyuan-note/siyuan/releases" target="_blank" rel="noopener noreferrer">GitHub Releases</a> 查看版本。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-88c55eccdd1c443792eeabf92282d2e8" data-id="88c55eccdd1c443792eeabf92282d2e8"><span><div id="88c55eccdd1c443792eeabf92282d2e8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#88c55eccdd1c443792eeabf92282d2e8" title="备份和恢复"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">备份和恢复</span></span></h2><div class="notion-text notion-block-f2b106d5610241dfa5ebe5edf8167d80">思源 Docker 部署最重要的是工作空间目录。建议定期备份整个 <code class="notion-inline-code">/siyuan/workspace</code>，不要只备份容器。</div><div class="notion-text notion-block-3af98ba4d4df47ef8e468bc9810fbc98">备份：</div><div class="notion-text notion-block-bc379beda75a40e299447e0f0f2f1925">恢复：</div><div class="notion-text notion-block-beec368896904a1a95666bb0f70f5412">如果使用快照、云盘或 NAS 备份，也要确保备份的是宿主机上的工作空间目录，而不是容器内部目录。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-025c7c2653c3499781cac1bf0b78c488" data-id="025c7c2653c3499781cac1bf0b78c488"><span><div id="025c7c2653c3499781cac1bf0b78c488" class="notion-header-anchor"></div><a class="notion-hash-link" href="#025c7c2653c3499781cac1bf0b78c488" title="安全建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安全建议</span></span></h2><ul class="notion-list notion-list-disc notion-block-c9ba57e9e92e4584851d01f5eaf03736"><li><code class="notion-inline-code">--accessAuthCode</code> 必须设置为强密码</li></ul><ul class="notion-list notion-list-disc notion-block-04a445be72934da2823180e0b2514804"><li>公网访问建议开启 HTTPS</li></ul><ul class="notion-list notion-list-disc notion-block-4efcebf59e264658bda248388db1cc69"><li>使用反向代理时，容器端口尽量只绑定 <code class="notion-inline-code">127.0.0.1</code></li></ul><ul class="notion-list notion-list-disc notion-block-90bbe380597846659fc3465c4242d850"><li>云服务器安全组只开放必要端口，例如 80、443</li></ul><ul class="notion-list notion-list-disc notion-block-ce03a2e339e94da5841ef891d430b6c4"><li>不要把工作空间目录放到会被第三方同步盘实时同步的位置</li></ul><ul class="notion-list notion-list-disc notion-block-0987eafa80c947c4a8171f003a88a734"><li>不要把 <code class="notion-inline-code">.env</code> 中的访问授权码提交到公开仓库</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-cd8a4717b1b042468ce3e6eb4291e8c0" data-id="cd8a4717b1b042468ce3e6eb4291e8c0"><span><div id="cd8a4717b1b042468ce3e6eb4291e8c0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#cd8a4717b1b042468ce3e6eb4291e8c0" title="常见问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">常见问题</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-68c468eb55d74ca9b9cfbb8880b33475" data-id="68c468eb55d74ca9b9cfbb8880b33475"><span><div id="68c468eb55d74ca9b9cfbb8880b33475" class="notion-header-anchor"></div><a class="notion-hash-link" href="#68c468eb55d74ca9b9cfbb8880b33475" title="打开页面后要求输入授权码"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">打开页面后要求输入授权码</span></span></h3><div class="notion-text notion-block-2d0409a4f0844c40ac774e484e54f082">输入启动参数或环境变量中设置的 <code class="notion-inline-code">accessAuthCode</code>。如果忘记了，查看 Compose 文件、<code class="notion-inline-code">.env</code> 文件或 Docker 启动命令。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-7e17f95cb69945df86a1931eade06033" data-id="7e17f95cb69945df86a1931eade06033"><span><div id="7e17f95cb69945df86a1931eade06033" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7e17f95cb69945df86a1931eade06033" title="容器启动后访问不了"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">容器启动后访问不了</span></span></h3><div class="notion-text notion-block-970b5cc1bcd3497c866385f8e302f75f">依次检查：</div><ul class="notion-list notion-list-disc notion-block-1bfe8b5ae0654c21ade65bbdce64a753"><li>容器是否运行：<code class="notion-inline-code">docker ps</code></li></ul><ul class="notion-list notion-list-disc notion-block-d2eefda0ae82494daada2c99c1844c89"><li>日志是否报错：<code class="notion-inline-code">docker logs siyuan</code> 或 <code class="notion-inline-code">docker compose logs -f</code></li></ul><ul class="notion-list notion-list-disc notion-block-25a2db5585a048899cf1d422231f58d3"><li>服务器防火墙和云服务器安全组是否放行 6806</li></ul><ul class="notion-list notion-list-disc notion-block-24f991d6dcb944e7ac20d867349e053b"><li>如果用了反向代理，确认 <code class="notion-inline-code">/ws</code> 已经正确代理 WebSocket</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3fa5fe65997b4499ab6c8bfd95315cd6" data-id="3fa5fe65997b4499ab6c8bfd95315cd6"><span><div id="3fa5fe65997b4499ab6c8bfd95315cd6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3fa5fe65997b4499ab6c8bfd95315cd6" title="提示权限不足或无法保存"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">提示权限不足或无法保存</span></span></h3><div class="notion-text notion-block-344c04b6aa754b91b8d22e9cf6c260a2">通常是宿主机目录权限和 <code class="notion-inline-code">PUID</code>/<code class="notion-inline-code">PGID</code> 不一致。检查目录所有者后执行：</div><div class="notion-text notion-block-b263fbda2b174f5b90b78bae2ce6f850">如果你的 <code class="notion-inline-code">PUID</code>/<code class="notion-inline-code">PGID</code> 不是 <code class="notion-inline-code">1000:1000</code>，请替换为实际值。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-305a0194bad34eb7a9d20076ec56d0c9" data-id="305a0194bad34eb7a9d20076ec56d0c9"><span><div id="305a0194bad34eb7a9d20076ec56d0c9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#305a0194bad34eb7a9d20076ec56d0c9" title="升级后数据不见了"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">升级后数据不见了</span></span></h3><div class="notion-text notion-block-de7c8362bfb543ed86a19589222ea37e">优先检查 <code class="notion-inline-code">volumes</code> 或 <code class="notion-inline-code">-v</code> 是否指向了原来的宿主机目录。只要原工作空间目录还在，通常重新挂载正确路径即可恢复。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-f2e91bd0393143d493ce03daaaad69bc" data-id="f2e91bd0393143d493ce03daaaad69bc"><span><div id="f2e91bd0393143d493ce03daaaad69bc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f2e91bd0393143d493ce03daaaad69bc" title="反向代理后登录或连接异常"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">反向代理后登录或连接异常</span></span></h3><div class="notion-text notion-block-e234585915524dedb9d46ac834ab199e">不要使用 URL 重写；优先使用独立域名或子域名。确认 <code class="notion-inline-code">/ws</code> WebSocket 代理配置正确。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-b3786374bea74adf9b88714d25dfc7a1" data-id="b3786374bea74adf9b88714d25dfc7a1"><span><div id="b3786374bea74adf9b88714d25dfc7a1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b3786374bea74adf9b88714d25dfc7a1" title="当前限制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">当前限制</span></span></h2><div class="notion-text notion-block-5c57a7d37964456ca5521e3d5624664a">Docker 伺服版有一些限制：</div><ul class="notion-list notion-list-disc notion-block-a3c6a6c9443c4b909f011566947e050f"><li>不支持桌面端和移动端应用连接，仅支持浏览器使用</li></ul><ul class="notion-list notion-list-disc notion-block-239c134e0a2147ad9c3f8f1692470d5c"><li>不支持导出 PDF、HTML 和 Word 格式</li></ul><ul class="notion-list notion-list-disc notion-block-6792ad79bfc04556bee536e59e12f74c"><li>不支持导入 Markdown 文件</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-36a05a6baf4d4f6d91248c9b65a59a73" data-id="36a05a6baf4d4f6d91248c9b65a59a73"><span><div id="36a05a6baf4d4f6d91248c9b65a59a73" class="notion-header-anchor"></div><a class="notion-hash-link" href="#36a05a6baf4d4f6d91248c9b65a59a73" title="参考资料"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">参考资料</span></span></h2><ul class="notion-list notion-list-disc notion-block-b8d4ac457b8341f2bcc69a6b419ecbd2"><li><a class="notion-link" href="https://github.com/siyuan-note/siyuan#docker-hosting" target="_blank" rel="noopener noreferrer">思源官方 README：Docker Hosting</a></li></ul><ul class="notion-list notion-list-disc notion-block-c79886f08b1940cab6ca5db8d48c487b"><li><a class="notion-link" href="https://hub.docker.com/r/b3log/siyuan" target="_blank" rel="noopener noreferrer">Docker Hub：b3log/siyuan</a></li></ul><ul class="notion-list notion-list-disc notion-block-d8c1b38be9684a8ca4b0a04dc30490f5"><li><a class="notion-link" href="https://github.com/siyuan-note/siyuan/releases" target="_blank" rel="noopener noreferrer">GitHub Releases</a></li></ul></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>