# lol.dids.sites.defs

> Published by [ngerakines.me](https://lexicon.garden/identity/did:plc:cbkjy5n7bk3ax2wplmtjofq2)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:cbkjy5n7bk3ax2wplmtjofq2/lol.dids.sites.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:cbkjy5n7bk3ax2wplmtjofq2/lol.dids.sites.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:cbkjy5n7bk3ax2wplmtjofq2/lol.dids.sites.defs/examples)

## Definitions

### `lol.dids.sites.defs#manifest`

**Type**: `object`

A path-keyed bundle of resources — bard's camelCase subset of a MASL bundle-mode document. The inline source of a site, or the content of a tile.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | No | Bundle name. Required when the manifest is a tile's content; optional for an inline site source. |
| `resources` | `unknown` | Yes | Map of absolute request path (beginning with '/') to lol.dids.sites.defs#resource. Lexicon has no map type. A '/' entry is required for tile content and recommended for sites. |

### `lol.dids.sites.defs#redirect`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `to` | `string` | Yes | Destination path. Must be an absolute path on this site that exists as a manifest key. |
| `from` | `string` | Yes | The request path to match, optionally including a query string. Matching is exact. |
| `status` | `integer` | No | Redirect status. Defaults to 302. |

### `lol.dids.sites.defs#resource`

**Type**: `object`

A single addressable resource within a manifest.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `src` | `blob` | Yes | The blob holding this resource's bytes. |
| `status` | `integer` | No | Response status. Defaults to 200 for manifest entries and 404 for the notFound resource. |
| `contentType` | `string` | No | Serve the asset with this content type instead of the blob's mimeType. |
| `contentEncoding` | `string` | No | Declares the stored blob is already encoded with this algorithm; the origin serves it as-is with a matching Content-Encoding header. |

### `lol.dids.sites.defs#wellKnown`

**Type**: `object`

Controls the responses bard synthesizes under /.well-known/. Every field defaults to true; the object exists only to turn things off.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `rasl` | `boolean` | No | Serve GET /.well-known/rasl/{cid} for every CID this site references. Default true. |
| `atproto` | `boolean` | No | Serve GET /.well-known/atproto-did with the site's owning DID. Default true. |

## Raw Schema

```json
{
  "id": "lol.dids.sites.defs",
  "defs": {
    "manifest": {
      "type": "object",
      "required": [
        "resources"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 1000,
          "description": "Bundle name. Required when the manifest is a tile's content; optional for an inline site source.",
          "maxGraphemes": 100
        },
        "resources": {
          "type": "unknown",
          "description": "Map of absolute request path (beginning with '/') to lol.dids.sites.defs#resource. Lexicon has no map type. A '/' entry is required for tile content and recommended for sites."
        }
      },
      "description": "A path-keyed bundle of resources — bard's camelCase subset of a MASL bundle-mode document. The inline source of a site, or the content of a tile."
    },
    "redirect": {
      "type": "object",
      "required": [
        "from",
        "to"
      ],
      "properties": {
        "to": {
          "type": "string",
          "maxLength": 2048,
          "description": "Destination path. Must be an absolute path on this site that exists as a manifest key."
        },
        "from": {
          "type": "string",
          "maxLength": 2048,
          "description": "The request path to match, optionally including a query string. Matching is exact."
        },
        "status": {
          "type": "integer",
          "description": "Redirect status. Defaults to 302.",
          "knownValues": [
            301,
            302,
            307,
            308
          ]
        }
      }
    },
    "resource": {
      "type": "object",
      "required": [
        "src"
      ],
      "properties": {
        "src": {
          "type": "blob",
          "description": "The blob holding this resource's bytes."
        },
        "status": {
          "type": "integer",
          "description": "Response status. Defaults to 200 for manifest entries and 404 for the notFound resource.",
          "knownValues": [
            200,
            404,
            410
          ]
        },
        "contentType": {
          "type": "string",
          "maxLength": 255,
          "description": "Serve the asset with this content type instead of the blob's mimeType."
        },
        "contentEncoding": {
          "type": "string",
          "description": "Declares the stored blob is already encoded with this algorithm; the origin serves it as-is with a matching Content-Encoding header.",
          "knownValues": [
            "gzip",
            "br",
            "zstd",
            "identity"
          ]
        }
      },
      "description": "A single addressable resource within a manifest."
    },
    "wellKnown": {
      "type": "object",
      "properties": {
        "rasl": {
          "type": "boolean",
          "description": "Serve GET /.well-known/rasl/{cid} for every CID this site references. Default true."
        },
        "atproto": {
          "type": "boolean",
          "description": "Serve GET /.well-known/atproto-did with the site's owning DID. Default true."
        }
      },
      "description": "Controls the responses bard synthesizes under /.well-known/. Every field defaults to true; the object exists only to turn things off."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
