dataview 的查询代码
Table without id "["+标题+"]("+file.name+")" as 标题,file.size as 字数,file.mtime as 修改时间,file.outlinks as 外链,highlightcount as 划线数, pagenote as 页面笔记,pagemirror as 全文剪藏
From "9文献笔记/wu"
where file.name!="wucai-2023-07-03-H8ADHKA"
Sort file.mtime desc
limit 10
📅2023-09-02 版本
参照[[seyee]]的文章:我的五彩同步 obsidian 模板 — 结合更新的 property 功能,改进了自己的ob模板如下
- {% if mdcontent %}pagemirror: 1 {% endif %} 全文剪藏为1
---
标题: "{{title}}"
创建时间: {{ createat}}
更新时间: {{updateat}}
笔记ID: {{noteid}}
全域名: {{domain}}
母域名: {{domain2}}
url: "{{url}}"
wucai_url: {{wucaiurl}}
highlightcount: {{highlightcount}}
{% if pagenote %}pagenote: 1 {% endif %}
{% if mdcontent %}pagemirror: 1 {% endif %}
---
[[{{ createat_ts | date("YYYY-MM-DD") }}]] 来源: [{{title}}]({{url}})
## 页面笔记
{% block pagenote %}
{{pagenote | replace("\n", "\n> ") }}
{% endblock %}
---
## 划线列表
{% block highlights %}
{% for item in highlights %}
{% if item.imageUrl%}

{% else %}
{{ item.note }}
---
{%if item.annonation%} {{item.annonation}}
---
{% endif %}
{% endif%}
{% endfor %}
{% endblock %}
{% if mdcontent %}
## 全文剪藏
{% block mdcontent %}
{{mdcontent}}
{% endblock %}
{% endif %}
显示全部 property 的 snippet 片段
.metadata-input-longtext:not(:empty) { max-height: none; display: inline-block;}
📅2023-07-02 版本
修改后的模板:
- 支持和日记进行连接
- 每段内容用分割线进行切割
- 去掉多余的符号, 只聚焦于正文
---
标题: "{{title}}"
创建时间: {{ createat}}
更新时间: {{updateat}}
笔记ID: {{noteid}}
全域名: {{domain}}
母域名: {{domain2}}
url: "{{url}}"
---
{% if tags %}{{ tags }}{% endif %}
[[{{ createat_ts | date("YYYY-MM-DD") }}]] 来源: [{{title}}]({{url}})
## 页面笔记
{% block pagenote %}
{{pagenote | replace("\n", "\n> ") }}
{% endblock %}
---
## 划线列表
{% block highlights %}
{% for item in highlights %}
{% if item.imageUrl%}

{% else %}
{{ item.note }}
---
{%if item.annonation%} {{item.annonation}}
---
{% endif %}
{% endif%}
{% endfor %}
{% endblock %}