# Querying Authorships

**URL:** https://community.silverbullet.md/t/querying-authorships/4391
**Category:** General
**Created:** [September 21, 2026, 7:29am UTC](https://community.silverbullet.md/t/querying-authorships/4391 "2026-09-21T07:29:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Al3cLee](https://community.silverbullet.md/user_avatar/community.silverbullet.md/al3clee/32/1091_2.png) [@Al3cLee](https://community.silverbullet.md/u/Al3cLee)
#### Post date: [September 21, 2026, 7:29am UTC](https://community.silverbullet.md/t/querying-authorships/4391/1 "2026-09-21T07:29:15Z")

</div>

Hi Zef, can we currently query according to authorship, e.g. query for all pages that are authored by the admin? I tried something like

```auto
${query[[
  from p = index.contentPages()
  where table.includes(p.authors, "admin")
  select templates.pageItem(p)
]]}

```

but this does not seem to work.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [September 21, 2026, 7:44am UTC](https://community.silverbullet.md/t/querying-authorships/4391/2 "2026-09-21T07:44:36Z")

</div>

This should work if all your pages have a frontmatter attribute "authors" with "admin" in that list. If you don't, there's currently no way to do this because SilverBullet actually doesn't really know who authored what right now. With revisions this _could_ indeed become available by inspecting version history I suppose, but that's not currently accessible via the object index. Is this what you're after?

---

<div class="post-metadata">

### Author: ![Al3cLee](https://community.silverbullet.md/user_avatar/community.silverbullet.md/al3clee/32/1091_2.png) [@Al3cLee](https://community.silverbullet.md/u/Al3cLee)
#### Post date: [September 21, 2026, 8:05am UTC](https://community.silverbullet.md/t/querying-authorships/4391/3 "2026-09-21T08:05:12Z")

</div>

I'm not asking for silverbullet to know who authored which and register in the object index; instead, I would like to manually write in the frontmatter something like

```yaml
authors: admin pete

```

and be able to query for the pages who are authored by `admin` (or `pete`).

Specifically, the error returned by the query is `Cannot use includes on a non-table or non-array value`.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [September 21, 2026, 8:08am UTC](https://community.silverbullet.md/t/querying-authorships/4391/4 "2026-09-21T08:08:22Z")

</div>

yes, because "admin pete" is not an array, it's a string, you'd have to write it like this:

```yaml
authors:
- admin
- pete

```

or:

```yaml
authors: [admin, pete]

```

---

<div class="post-metadata">

### Author: ![Al3cLee](https://community.silverbullet.md/user_avatar/community.silverbullet.md/al3clee/32/1091_2.png) [@Al3cLee](https://community.silverbullet.md/u/Al3cLee)
#### Post date: [September 21, 2026, 8:12am UTC](https://community.silverbullet.md/t/querying-authorships/4391/5 "2026-09-21T08:12:17Z")

</div>

Fixed! Sorry for a silly question, I assumed maybe authorship works in a special manner different from ordinary attributes.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [September 21, 2026, 8:13am UTC](https://community.silverbullet.md/t/querying-authorships/4391/6 "2026-09-21T08:13:43Z")

</div>

no, but to be honest I do have "hacks" in place for e.g. `tags` where I support both this "spaced out" version as well as lists, even with `#` in there, just for convenience. But that's specifically done for tags, not for everything.
