[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71303":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},71303,"obsidian-dataview","blacksmithgu\u002Fobsidian-dataview","blacksmithgu","A data index and query language over Markdown files, for https:\u002F\u002Fobsidian.md\u002F.","https:\u002F\u002Fblacksmithgu.github.io\u002Fobsidian-dataview\u002F",null,"TypeScript",9044,538,51,635,0,23,41,129,69,114.19,"MIT License",false,"master",true,[27,28,29,30],"obsidian-md","obsidian-plugin","query-language","typescript","2026-06-12 04:01:00","# Obsidian Dataview\n\nTreat your [Obsidian Vault](https:\u002F\u002Fobsidian.md\u002F) as a database which you can query from. Provides a JavaScript API and\npipeline-based query language for filtering, sorting, and extracting data from Markdown pages. See the Examples section\nbelow for some quick examples, or the full [reference](https:\u002F\u002Fblacksmithgu.github.io\u002Fobsidian-dataview\u002F) for all the details.\n\n## Examples\n\nShow all games in the game folder, sorted by rating, with some metadata:\n\n~~~markdown\n```dataview\ntable time-played, length, rating\nfrom \"games\"\nsort rating desc\n```\n~~~\n\n![Game Example](docs\u002Fdocs\u002Fassets\u002Fgame.png)\n\n---\n\nList games which are MOBAs or CRPGs.\n\n~~~markdown\n```dataview\nlist from #game\u002Fmoba or #game\u002Fcrpg\n```\n~~~\n\n![Game List](docs\u002Fdocs\u002Fassets\u002Fgame-list.png)\n\n---\n\nList all markdown [tasks](https:\u002F\u002Fblacksmithgu.github.io\u002Fobsidian-dataview\u002Fdata-annotation\u002F#tasks) in un-completed projects:\n\n~~~markdown\n```dataview\ntask from #projects\u002Factive\n```\n~~~\n\n![Task List](docs\u002Fdocs\u002Fassets\u002Fproject-task.png)\n\n---\n\nShow all files in the `books` folder that you read in 2021, grouped by genre and sorted by rating:\n\n~~~markdown\n```dataviewjs\nfor (let group of dv.pages(\"#book\").where(p => p[\"time-read\"].year == 2021).groupBy(p => p.genre)) {\n\tdv.header(3, group.key);\n\tdv.table([\"Name\", \"Time Read\", \"Rating\"],\n\t\tgroup.rows\n\t\t\t.sort(k => k.rating, 'desc')\n\t\t\t.map(k => [k.file.link, k[\"time-read\"], k.rating]))\n}\n```\n~~~\n\n![Books By Genre](docs\u002Fdocs\u002Fassets\u002Fbooks-by-genre.png)\n\n## Usage\n\nFor a full description of all features, instructions, and examples, see the [reference](https:\u002F\u002Fblacksmithgu.github.io\u002Fobsidian-dataview\u002F). For a more brief outline, let us examine the two major aspects of Dataview: *data* and *querying*.\n\n#### **Data**\n\nDataview generates *data* from your vault by pulling\ninformation from **Markdown frontmatter** and **Inline fields**.\n\n- Markdown frontmatter is arbitrary YAML enclosed by `---` at the top of a markdown document which can store metadata\n  about that document.\n- Inline fields are a Dataview feature which allow you to write metadata directly inline in your markdown document via\n  `Key:: Value` syntax.\n\nExamples of both are shown below:\n\n```yaml\n---\nalias: \"document\"\nlast-reviewed: 2021-08-17\nthoughts:\n  rating: 8\n  reviewable: false\n---\n```\n```markdown\n# Markdown Page\n\nBasic Field:: Value\n**Bold Field**:: Nice!\nYou can also write [field:: inline fields]; multiple [field2:: on the same line].\nIf you want to hide the (field3:: key), you can do that too.\n```\n\n#### **Querying**\n\nOnce you've annotated documents and the like with metadata, you can then query it using any of Dataview's four query\nmodes:\n\n1. **Dataview Query Language (DQL)**: A pipeline-based, vaguely SQL-looking expression language which can support basic\n   use cases. See the [documentation](https:\u002F\u002Fblacksmithgu.github.io\u002Fobsidian-dataview\u002Fquery\u002Fqueries\u002F) for details.\n\n   ~~~markdown\n   ```dataview\n   TABLE file.name AS \"File\", rating AS \"Rating\" FROM #book\n   ```\n   ~~~\n\n2. **Inline Expressions**: DQL expressions which you can embed directly inside markdown and which will be evaluated in\n   preview mode. See the [documentation](https:\u002F\u002Fblacksmithgu.github.io\u002Fobsidian-dataview\u002Freference\u002Fexpressions\u002F) for\n   allowable queries.\n\n   ```markdown\n   We are on page `= this.file.name`.\n   ```\n\n3. **DataviewJS**: A high-powered JavaScript API which gives full access to the Dataview index and some convenient\n   rendering utilities. Highly recommended if you know JavaScript, since this is far more powerful than the query\n   language. Check the [documentation](https:\u002F\u002Fblacksmithgu.github.io\u002Fobsidian-dataview\u002Fapi\u002Fintro\u002F) for more details.\n\n   ~~~markdown\n   ```dataviewjs\n   dv.taskList(dv.pages().file.tasks.where(t => !t.completed));\n   ```\n   ~~~\n\n4. **Inline JS Expressions**: The JavaScript equivalent to inline expressions, which allow you to execute arbitrary JS\n   inline:\n\n   ~~~markdown\n   This page was last modified at `$= dv.current().file.mtime`.\n   ~~~\n\n#### JavaScript Queries: Security Note\n\nJavaScript queries are very powerful, but they run at the same level of access as any other Obsidian plugin. This means\nthey can potentially rewrite, create, or delete files, as well as make network calls. You should generally write\nJavaScript queries yourself or use scripts that you understand or that come from reputable sources. Regular Dataview\nqueries are sandboxed and cannot make negative changes to your vault (in exchange for being much more limited).\n\n## Contributing\n\nContributions via bug reports, bug fixes, documentation, and general improvements are always welcome. For more major\nfeature work, make an issue about the feature idea \u002F reach out to me so we can judge feasibility and how best to\nimplement it.\n\n#### Local Development\n\nThe codebase is written in TypeScript and uses `rollup` \u002F `node` for compilation; for a first time set up, all you\nshould need to do is pull, install, and build:\n\n```console\nfoo@bar:~$ git clone git@github.com:blacksmithgu\u002Fobsidian-dataview.git\nfoo@bar:~$ cd obsidian-dataview\nfoo@bar:~\u002Fobsidian-dataview$ npm install\nfoo@bar:~\u002Fobsidian-dataview$ npm run dev\n```\n\nThis will install libraries, build dataview, and deploy it to `test-vault`, which you can then open in Obsidian. This\nwill also put `rollup` in watch mode, so any changes to the code will be re-compiled and the test vault will automatically\nreload itself.\n\n#### Preparing for creating pull requests\n\nIf you plan on doing pull request, we would also recommend to do the following in advance of creating the pull request:\n\n```console\nfoo@bar:~$ npm run dev\nfoo@bar:~$ npm run check-format\nfoo@bar:~$ npm run format\nfoo@bar:~$ npm run test\n```\n\nThe third step of `npm run format` is only needed if the format check reports some issue.\n\n#### Installing to Other Vaults\n\nIf you want to dogfood dataview in your real vault, you can build and install manually. Dataview is predominantly a\nread-only store, so this should be safe, but watch out if you are adjusting functionality that performs file edits!\n\n```console\nfoo@bar:~\u002Fobsidian-dataview$ npm run build\nfoo@bar:~\u002Fobsidian-dataview$ .\u002Fscripts\u002Finstall-built path\u002Fto\u002Fyour\u002Fvault\n```\n\n#### Building Documentation\n\nWe use `MkDocs` for documentation (found in `docs\u002F`). You'll need to have python and pip to run it locally:\n\n```console\nfoo@bar:~\u002Fobsidian-dataview$ pip3 install mkdocs mkdocs-material mkdocs-redirects\nfoo@bar:~\u002Fobsidian-dataview$ cd docs\nfoo@bar:~\u002Fobsidian-dataview\u002Fdocs$ mkdocs serve\n```\n\nThis will start a local web server rendering the documentation in `docs\u002Fdocs`, which will live-reload on change.\nDocumentation changes are automatically pushed to `blacksmithgu.github.io\u002Fobsidian-dataview` once they are merged\nto the main branch.\n\n#### Using Dataview Types In Your Own Plugin\n\nDataview publishes TypeScript typings for all of its APIs onto NPM (as `blacksmithgu\u002Fobsidian-dataview`). For\ninstructions on how to set up development using Dataview, see [setup instructions](https:\u002F\u002Fblacksmithgu.github.io\u002Fobsidian-dataview\u002Fplugin\u002Fdevelop-against-dataview\u002F).\n\n## Support\n\nHave you found the Dataview plugin helpful, and want to support it? I accept donations which go towards future\ndevelopment efforts. I generally do not accept payment for bug bounties\u002Ffeature requests, as financial incentives add\nstress\u002Fexpectations which I want to avoid for a hobby project!\n\nSupport @blacksmithgu:  \n[![paypal](https:\u002F\u002Fwww.paypalobjects.com\u002Fen_US\u002Fi\u002Fbtn\u002Fbtn_donateCC_LG.gif)](https:\u002F\u002Fwww.paypal.com\u002Fdonate?business=Y9SKV24R5A8BQ&item_name=Open+source+software+development&currency_code=USD)\n\nSupport @holroy:  \n\u003Ca href=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fholroy\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fcdn.buymeacoffee.com\u002Fbuttons\u002Fv2\u002Fdefault-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 40px !important;width: 175px !important;\" >\u003C\u002Fa>\n","Obsidian Dataview 是一个为 Obsidian 笔记应用设计的数据索引和查询工具，允许用户像操作数据库一样查询 Markdown 文件。其核心功能包括通过 JavaScript API 和基于管道的查询语言来过滤、排序及提取数据，支持从 Markdown 页面中读取前元数据和内联字段。适用于需要对笔记内容进行复杂管理和分析的场景，例如整理书籍、游戏列表或项目任务等。该项目采用 TypeScript 编写，拥有丰富的文档和示例，便于用户快速上手使用。",2,"2026-06-11 03:37:05","high_star"]