---
title: Document Lexicon
description: Schema reference for documents, used to provide metadata for documents published on the web.
date: 2026-02-10
atUri: "at://did:plc:re3ebnp5v7ffagz6rb6xfei4/site.standard.document/3mek5jhy7fc25"
ogImage: opengraph-image-docs-document-lexicon-v2.png
---

import { Table, Updated } from '@/app/components/docs'

# Document Lexicon

The `site.standard.document` lexicon provides metadata for documents published on the web.

## Overview

Documents may be standalone or associated with a publication. This lexicon can be used to store a document's content and its associated metadata.

## Schema

### Required Properties

<Table
    headers={['Property', 'Type', 'Description']}
    rows={[
        ['site', 'string', <>Points to a publication record <code>at://</code> or a publication url <code>https://</code> for loose documents. Avoid trailing slashes.</>],
        ['title', 'string', <>Title of the document. <code>maxLength: 5000</code> <code>maxGraphemes: 500</code></>],
        ['publishedAt', 'datetime', 'Timestamp of the documents publish time.'],
    ]}
/>

### Optional Properties <Updated />

<Table
    headers={['Property', 'Type', 'Description']}
    rows={[
        ['path', 'string', <>Combine with <code>site</code> or publication <code>url</code> to construct a canonical URL to the document. Prepend with a leading slash.</>],
        ['description', 'string', <>A brief description or excerpt from the document. <code>maxLength: 30000</code> <code>maxGraphemes: 3000</code></>],
        ['coverImage', 'blob', 'Image to used for thumbnail or cover image. Less than 1MB is size.'],
        ['content', 'union', <>Open union used to define the record's content. Each entry must specify a <code>$type</code> and may be extended with other lexicons to support additional content formats.</>],
        ['textContent', 'string', 'Plaintext representation of the documents contents. Should not contain markdown or other formatting.'],
        ['bskyPostRef', 'ref', 'Strong reference to a Bluesky post. Useful to keep track of comments off-platform.'],
        ['tags', 'array', <>Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags. <code>items.maxLength: 1280</code> <code>items.maxGraphemes: 128</code></>],
        ['links', 'union', "Open union describing relationships between this document and external resources."],
        ['labels', 'union', <>Self-label values for this document. Effectively content warnings. (ref → <code>com.atproto.label.defs#selfLabels</code>)</>],
        ['contributors', 'array', <>List of additional contributors to this document (ref → <a href="#contributor">#contributor</a>).</>],
        ['updatedAt', 'datetime', 'Timestamp of the documents last edit.'],
    ]}
/>

### Contributor <Updated label="New" />

The `#contributor` property describes a participant on a document beyond the record's author.

<Table
    headers={['Property', 'Type', 'Required', 'Description']}
    rows={[
        ['did', 'string:did', 'Yes', 'DID of the contributor.'],
        ['role', 'string', 'No', <>Role of the contributor (ex: "editor", "translator"). <code>maxLength: 1000</code> <code>maxGraphemes: 100</code></>],
        ['displayName', 'string', 'No', <>Optional display name override for the contributor. <code>maxLength: 1000</code> <code>maxGraphemes: 100</code></>],
    ]}
/>

## Example

```json
{
  "$type": "site.standard.document",
  "site": "at://did:plc:abc123/site.standard.publication/3lwafzkjqm25s",
  "path": "/blog/getting-started",
  "title": "Getting Started with Standard.site",
  "description": "Learn how to use Standard.site lexicons in your project",
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreiexample123456789"
    },
    "mimeType": "image/jpeg",
    "size": 245678
  },
  "textContent": "Full text of the article...",
  "tags": ["tutorial", "atproto"],
  "publishedAt": "2024-01-20T14:30:00.000Z"
}
```

## Content Format

The content property is an open union, allowing for extensibility. Each entry must specify a `$type` and may be extended with other lexicons to support additional content formats like Markdown, blocks, or other rich text.

## View the Lexicon

- [View full lexicon schema](https://pdsls.dev/at://did:plc:re3ebnp5v7ffagz6rb6xfei4/com.atproto.lexicon.schema/site.standard.document)
- [Example record](https://pdsls.dev/at://did:plc:revjuqmkvrw6fnkxppqtszpv/site.standard.document/3mbfqhezge25u)

## Best Practices

- While we encourage avoid trailing slashes, some may not implement this in practice. If you are validating records, you should trim trailing slashes for `site` in your codebase.

## Related

- [Publication lexicon](/docs/lexicons/publication) - Collections of documents
- [Verification](/docs/verification) - Link documents to web pages
- [Quick Start](/docs/quick-start) - Implementation guide
