About this project
Obsidian Dataview is a plugin for the Obsidian note-taking application that transforms a user's vault into a queryable database. It indexes Markdown files by extracting metadata from YAML frontmatter and inline field annotations (using `Key:: Value` syntax), then provides multiple query modes to filter, sort, and visualize that data.
The plugin offers four query interfaces:
1. **Dataview Query Language (DQL)**: A pipeline-based, SQL-like expression language for basic queries. Examples include listing files from a folder sorted by rating, or filtering by tags.
2. **Inline Expressions**: DQL expressions that can be embedded directly in Markdown text and evaluated in preview mode, such as displaying the current page name.
3. **DataviewJS**: A full JavaScript API that provides access to the Dataview index and rendering utilities. This is the most powerful mode, allowing complex grouping, sorting, and custom rendering logic.
4. **Inline JS Expressions**: JavaScript equivalents of inline expressions for executing arbitrary JS inline within Markdown.
Data extraction relies on two mechanisms: Markdown frontmatter (YAML blocks at the top of documents) and inline fields (metadata written directly in the document body using `Key:: Value` syntax). Both can be used to annotate notes with structured data.
The codebase is written in TypeScript and uses rollup/node for compilation. Development involves cloning the repository, installing dependencies with npm, and running `npm run dev` to build and deploy to a test vault. The project also uses MkDocs for documentation.
JavaScript queries run with the same access level as other Obsidian plugins, meaning they can potentially modify files or make network calls. Regular Dataview queries are sandboxed and cannot make negative changes to the vault.
The project is open-source and accepts contributions via bug reports, fixes, documentation, and improvements. TypeScript type definitions are published to NPM for use in other plugins.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.