Slash forward icon
  • Documentation
  • Plugins
  • API Reference
  • Examples
  • GitHub
    • comarkContent
    • content.get
    • content.list
    • content.navigation
    • content.stat
    • content.getSource
    • content.handler
    • content.watch
    • content.update
    • content.remove
    • content.cache
    • content.manifest
    • content.hooks
    • content.status
    • content.init
    • content.loadSnapshot
    • content.addParser
    • content.addListingFields
    • content.addServeHandler
    • createContentClient
    • content.get
    • content.list
    • content.navigation
    • defineContentPlugin
    • defineContentClientPlugin
    • Content
    • Client
    • Plugins
    • Typegen
    • File parsed
  • Cheat Sheet
  • CLI
Reference

content.update()

Upsert a single parsed file into the manifest and cache.

content.update(source, file)

Upserts a single parsed file into the manifest and cache without re-reading the source, then emits the file:upsert hook. Used for surgical updates such as forwarding an HMR change.

Parameters:

  • source: the source name.
  • file: a ContentFile to insert or replace.

Returns: Promise<void>

Usage

usage.ts
await content.update('default', file)

content.watch

Keep the manifest and cache in sync with source file changes.

content.remove

Drop a single entry from the manifest and cache by key.

On this page

  • content.update(source, file)
  • Usage
  • Edit this page on GitHub
  • Star on GitHub
  • Comark docs
© 2026 Vercel, Inc.