wiki-dashboard

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Wiki Dashboard — Dynamic Vault Views

Wiki仪表盘——动态库视图

You are creating a
.base
file — an Obsidian Bases definition that turns vault frontmatter into a live, queryable view. The
.base
format is native to Obsidian 1.8+ and requires no plugins.
你将创建一个
.base
文件——这是Obsidian Bases的定义文件,可将库笔记的前置元数据转换为实时可查询的视图。
.base
格式是Obsidian 1.8+的原生格式,无需额外插件。

Before You Start

开始之前

  1. Read
    ~/.obsidian-wiki/config
    (preferred) or
    .env
    (fallback) to get
    OBSIDIAN_VAULT_PATH
  2. Read
    $OBSIDIAN_VAULT_PATH/index.md
    to understand what categories and pages exist
  3. Ask the user what they want to view if not specified — what folder, tag, category, or date range?
  1. 读取
    ~/.obsidian-wiki/config
    (优先)或
    .env
    (备选)获取
    OBSIDIAN_VAULT_PATH
  2. 读取
    $OBSIDIAN_VAULT_PATH/index.md
    以了解现有分类和页面
  3. 如果用户未指定查看内容,询问用户需求——要查看哪个文件夹、标签、分类或日期范围?

What Obsidian Bases Can Do

Obsidian Bases的功能

.base
files define database-style views over vault notes. Each file declares:
  • Which notes to include — filtered by folder, tag, frontmatter property, or combination
  • Which properties to show — any frontmatter field becomes a column
  • What view type
    table
    ,
    cards
    , or
    list
  • Sort and group — by any property
  • Computed columns — formulas using
    file.*
    helpers and arithmetic
Embed a
.base
into any note with
![[MyBase.base]]
.
.base
文件定义了库笔记的数据库式视图。每个文件需声明:
  • 包含哪些笔记——按文件夹、标签、前置元数据属性或组合筛选
  • 显示哪些属性——任何前置元数据字段都可成为列
  • 视图类型——
    table
    (表格)、
    cards
    (卡片)或
    list
    (列表)
  • 排序与分组——按任意属性
  • 计算列——使用
    file.*
    辅助函数和算术运算的公式
可通过
![[MyBase.base]]
.base
文件嵌入任意笔记中。

Step 1: Understand the Request

步骤1:理解需求

Determine:
  • What to show — all pages in a category? Pages with a specific tag? A project's pages?
  • What columns matter — title, tags, created, updated, summary, category, project?
  • View type — table (default), cards (visual), or list (minimal)
  • Sort order — by updated (default), created, title, or a custom property
  • Any filters — date range, specific tags, folder scope
确定:
  • 显示内容——某分类下的所有页面?带特定标签的页面?某个项目的页面?
  • 重要列——标题、标签、创建时间、更新时间、摘要、分类、项目?
  • 视图类型——表格(默认)、卡片(可视化)或列表(极简)
  • 排序顺序——按更新时间(默认)、创建时间、标题或自定义属性
  • 筛选条件——日期范围、特定标签、文件夹范围

Step 2: Generate the
.base
File

步骤2:生成
.base
文件

The
.base
format is YAML. Here are the patterns you'll use:
.base
格式为YAML。以下是常用模板:

Basic table — all pages in a category folder

基础表格——某分类文件夹下的所有页面

yaml
filters:
  - type: folder
    folder: concepts
columns:
  - property: file.name
    title: Page
  - property: tags
    title: Tags
  - property: summary
    title: Summary
  - property: updated
    title: Updated
sort:
  - property: updated
    direction: desc
view: table
yaml
filters:
  - type: folder
    folder: concepts
columns:
  - property: file.name
    title: Page
  - property: tags
    title: Tags
  - property: summary
    title: Summary
  - property: updated
    title: Updated
sort:
  - property: updated
    direction: desc
view: table

Filtered by tag

按标签筛选

yaml
filters:
  - type: tag
    tag: "#machine-learning"
columns:
  - property: file.name
    title: Page
  - property: category
    title: Category
  - property: summary
    title: Summary
  - property: created
    title: Created
sort:
  - property: created
    direction: desc
view: table
yaml
filters:
  - type: tag
    tag: "#machine-learning"
columns:
  - property: file.name
    title: Page
  - property: category
    title: Category
  - property: summary
    title: Summary
  - property: created
    title: Created
sort:
  - property: created
    direction: desc
view: table

Multi-filter (folder AND tag)

多条件筛选(文件夹且标签)

yaml
filters:
  operator: and
  conditions:
    - type: folder
      folder: projects
    - type: tag
      tag: "#active"
columns:
  - property: file.name
    title: Project
  - property: summary
    title: Summary
  - property: updated
    title: Last Updated
view: cards
yaml
filters:
  operator: and
  conditions:
    - type: folder
      folder: projects
    - type: tag
      tag: "#active"
columns:
  - property: file.name
    title: Project
  - property: summary
    title: Summary
  - property: updated
    title: Last Updated
view: cards

Computed column (days since last update)

计算列(上次更新至今天数)

yaml
columns:
  - property: file.name
    title: Page
  - property: updated
    title: Updated
  - formula: "floor((now() - updated) / 86400000)"
    title: Days Stale
    type: number
sort:
  - formula: "floor((now() - updated) / 86400000)"
    direction: desc
view: table
yaml
columns:
  - property: file.name
    title: Page
  - property: updated
    title: Updated
  - formula: "floor((now() - updated) / 86400000)"
    title: Days Stale
    type: number
sort:
  - formula: "floor((now() - updated) / 86400000)"
    direction: desc
view: table

Filter operators and functions available

可用的筛选运算符和函数

  • file.hasTag("tag")
    — boolean, true if page has tag
  • file.inFolder("path")
    — boolean, true if page is in folder
  • file.name
    — the note's filename (without extension)
  • file.path
    — full vault-relative path
  • now()
    — current timestamp in ms
  • Arithmetic:
    +
    ,
    -
    ,
    *
    ,
    /
    ,
    floor()
    ,
    ceil()
  • Comparison:
    ==
    ,
    !=
    ,
    >
    ,
    <
    ,
    >=
    ,
    <=
  • file.hasTag("tag")
    ——布尔值,页面包含标签时为true
  • file.inFolder("path")
    ——布尔值,页面在指定文件夹时为true
  • file.name
    ——笔记文件名(不含扩展名)
  • file.path
    ——库相对路径的完整路径
  • now()
    ——当前时间戳(毫秒)
  • 算术运算:
    +
    ,
    -
    ,
    *
    ,
    /
    ,
    floor()
    ,
    ceil()
  • 比较运算:
    ==
    ,
    !=
    ,
    >
    ,
    <
    ,
    >=
    ,
    <=

Step 3: Write the File

步骤3:写入文件

Target path:
$OBSIDIAN_VAULT_PATH/_meta/<dashboard-name>.base
Use a slug derived from the dashboard's purpose:
  • "All concepts" →
    _meta/concepts-index.base
  • "Recent ingests" →
    _meta/recent-ingests.base
  • "Project overview" →
    _meta/projects-overview.base
  • "Stale pages" →
    _meta/stale-pages.base
Create
_meta/
if it doesn't exist yet.
目标路径:
$OBSIDIAN_VAULT_PATH/_meta/<dashboard-name>.base
根据仪表盘用途生成短名称:
  • "所有概念" →
    _meta/concepts-index.base
  • "最近导入内容" →
    _meta/recent-ingests.base
  • "项目概览" →
    _meta/projects-overview.base
  • "过期页面" →
    _meta/stale-pages.base
如果
_meta/
文件夹不存在,先创建它。

Step 4: Embed (optional)

步骤4:嵌入(可选)

If the user wants the dashboard embedded in an existing note (e.g.,
index.md
or a project overview), add:
markdown
undefined
如果用户希望将仪表盘嵌入现有笔记(如
index.md
或项目概览页),添加以下内容:
markdown
undefined

<Dashboard Title>

<仪表盘标题>

![[_meta/<dashboard-name>.base]]

Ask the user before modifying an existing note.
![[_meta/<dashboard-name>.base]]

修改现有笔记前需询问用户。

Step 5: Update Tracking

步骤5:更新追踪

log.md
— Append:
- [TIMESTAMP] WIKI_DASHBOARD name="<slug>" view=<type> filter="<description>"
No manifest or index update needed —
.base
files are live queries, not static content pages.
log.md
——追加内容:
- [TIMESTAMP] WIKI_DASHBOARD name="<slug>" view=<type> filter="<description>"
无需更新清单或索引——
.base
文件是实时查询,而非静态内容页面。

Common Dashboard Recipes

常见仪表盘模板

Tell the user about these if they're not sure what to ask for:
DashboardWhat it shows
Content indexAll wiki pages grouped by category, sortable by updated date
Entity trackerAll entity pages (people, tools, orgs) with tags and sources
Ingestion logPages sorted by
created
date — see what was added recently
Stale contentPages not updated in 30+ days — maintenance view
Project overviewAll project pages with last-sync date
Tag cloudPages grouped by tag — see coverage across topics
Research trackerAll synthesis pages tagged
research
— shows research history
如果用户不确定需求,可向他们推荐以下模板:
仪表盘显示内容
内容索引所有wiki页面按分类分组,可按更新日期排序
实体追踪器所有实体页面(人物、工具、组织),包含标签和来源
导入日志
created
日期排序的页面——查看最近添加的内容
过期内容30天以上未更新的页面——维护视图
项目概览所有项目页面,包含最后同步日期
标签云按标签分组的页面——查看主题覆盖范围
研究追踪器所有标记为
research
的综合页面——显示研究历史

Quality Checklist

质量检查清单

  • .base
    YAML is valid and uses correct field names
  • Filter matches the user's intent
  • File written to
    _meta/
    with a descriptive slug
  • log.md
    updated
  • User told how to embed it (
    ![[_meta/<name>.base]]
    ) and what Obsidian version is required (1.8+)
  • .base
    文件YAML格式有效,字段名称正确
  • 筛选条件符合用户需求
  • 文件已写入
    _meta/
    文件夹,且短名称描述清晰
  • log.md
    已更新
  • 已告知用户嵌入方法 (
    ![[_meta/<name>.base]]
    ) 及所需Obsidian版本(1.8+)