---
title: "content.manifest()"
description: "The saveable content index, without document bodies."
canonical_url: "https://content.comark.dev/reference/content/manifest"
---
# content.manifest()

> The saveable content index, without document bodies.

## `content.manifest()`{lang="ts"}

Ensures the index is loaded, then returns the instance's [`Manifest`](https://content.comark.dev/reference/types/content#manifest): a body-free description of every entry, plus the inferred schemas and a freshness stamp.

```ts [manifest.ts]
const manifest = await content.manifest()

manifest.sources // ['default']
manifest.time // epoch ms the index was produced
Object.keys(manifest.items) // ['/', '/about', '/blog/hello']
manifest.items['/about'].data.title // 'About'
manifest.schemas?.default // the inferred data schema
```

### Returns

`Promise<Manifest>`{lang="ts"} — see [`Manifest`](https://content.comark.dev/reference/types/content#manifest).

Entries carry the same shape [`list()`](https://content.comark.dev/reference/content/list) returns: `path`, `data` limited to the [listing fields](https://content.comark.dev/reference/content/add-listing-fields), and `meta`. Bodies are not included; read one with [`get()`](https://content.comark.dev/reference/content/get).

## Storing it

The manifest is plain data, so it can be written anywhere and handed to a [snapshot source](https://content.comark.dev/sources/snapshot) later. It is the light tier: an instance restored from it serves [`list()`](https://content.comark.dev/reference/content/list) and [`navigation()`](https://content.comark.dev/reference/content/navigation) immediately, and hydrates bodies on the first [`get()`](https://content.comark.dev/reference/content/get).

```ts [build.ts]
await useStorage('snapshots').set('manifest.json', await content.manifest())
```

Pair it with [`content.snapshot()`](https://content.comark.dev/reference/content/snapshot) when you also want bodies, and see the [CLI](https://content.comark.dev/reference/cli#comark-content-snapshot) for the build-step wrapper.

## Freshness

`time` is what makes a restored index comparable. On initialization the instance keeps whichever index is newer: the one persisted in its cache, which runtime [`update()`](https://content.comark.dev/reference/content/update), [`remove()`](https://content.comark.dev/reference/content/remove) and [`refresh()`](https://content.comark.dev/reference/content/refresh) calls re-stamp, or the one a [parsed source](https://content.comark.dev/sources/snapshot) provides from a newer deployment.

::note
Serving the manifest over HTTP wraps it in a checksummed artifact — see [`content.handler()`](https://content.comark.dev/reference/content/handler). The artifact is transport only; this method returns the data.
::

## Plugins

Plugins receive the **live** index synchronously as `__manifest__`, because `file:*` hooks fire during initialization, where awaiting this method would deadlock.

```ts [plugin.ts]
defineContentPlugin(() => ({
  name: 'counter',
  setup(content) {
    content.hooks.hook('file:bulk:load', () => {
      const items = Object.keys(content.__manifest__.items).length
      content.logger.info('counter', `${items} entries indexed`)
    })
  },
}))
```


## Sitemap

See the full [sitemap](https://content.comark.dev/sitemap.md) for all pages.
