# pub.leaflet.publication

> Published by [leaflet.pub](https://lexicon.garden/identity/did:plc:btxrwcaeyodrap5mnjw2fvmz)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:btxrwcaeyodrap5mnjw2fvmz/pub.leaflet.publication)
- [Documentation](https://lexicon.garden/lexicon/did:plc:btxrwcaeyodrap5mnjw2fvmz/pub.leaflet.publication/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:btxrwcaeyodrap5mnjw2fvmz/pub.leaflet.publication/examples)

## Definitions

### `pub.leaflet.publication`

**Type**: `record`

Record declaring a publication

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `icon` | `blob` | No |  |
| `name` | `string` | Yes |  |
| `theme` | `ref` → `#theme` | No |  |
| `base_path` | `string` | No |  |
| `description` | `string` | No |  |
| `preferences` | `ref` → `#preferences` | No |  |

### `pub.leaflet.publication#theme`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `primary` | `union` | No |  |
| `bodyFont` | `string` | No |  |
| `pageWidth` | `integer` | No |  |
| `accentText` | `union` | No |  |
| `headingFont` | `string` | No |  |
| `pageBackground` | `union` | No |  |
| `backgroundColor` | `union` | No |  |
| `backgroundImage` | `ref` → `pub.leaflet.theme.backgroundImage` | No |  |
| `accentBackground` | `union` | No |  |
| `showPageBackground` | `boolean` | No |  |

### `pub.leaflet.publication#preferences`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `showComments` | `boolean` | No |  |
| `showMentions` | `boolean` | No |  |
| `showPrevNext` | `boolean` | No |  |
| `showInDiscover` | `boolean` | No |  |
| `showRecommends` | `boolean` | No |  |

## Raw Schema

```json
{
  "id": "pub.leaflet.publication",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "icon": {
            "type": "blob",
            "accept": [
              "image/*"
            ],
            "maxSize": 1000000
          },
          "name": {
            "type": "string",
            "maxLength": 2000
          },
          "theme": {
            "ref": "#theme",
            "type": "ref"
          },
          "base_path": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "preferences": {
            "ref": "#preferences",
            "type": "ref"
          }
        }
      },
      "description": "Record declaring a publication"
    },
    "theme": {
      "type": "object",
      "properties": {
        "primary": {
          "refs": [
            "pub.leaflet.theme.color#rgba",
            "pub.leaflet.theme.color#rgb"
          ],
          "type": "union"
        },
        "bodyFont": {
          "type": "string",
          "maxLength": 100
        },
        "pageWidth": {
          "type": "integer",
          "maximum": 1600,
          "minimum": 0
        },
        "accentText": {
          "refs": [
            "pub.leaflet.theme.color#rgba",
            "pub.leaflet.theme.color#rgb"
          ],
          "type": "union"
        },
        "headingFont": {
          "type": "string",
          "maxLength": 100
        },
        "pageBackground": {
          "refs": [
            "pub.leaflet.theme.color#rgba",
            "pub.leaflet.theme.color#rgb"
          ],
          "type": "union"
        },
        "backgroundColor": {
          "refs": [
            "pub.leaflet.theme.color#rgba",
            "pub.leaflet.theme.color#rgb"
          ],
          "type": "union"
        },
        "backgroundImage": {
          "ref": "pub.leaflet.theme.backgroundImage",
          "type": "ref"
        },
        "accentBackground": {
          "refs": [
            "pub.leaflet.theme.color#rgba",
            "pub.leaflet.theme.color#rgb"
          ],
          "type": "union"
        },
        "showPageBackground": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "preferences": {
      "type": "object",
      "properties": {
        "showComments": {
          "type": "boolean",
          "default": true
        },
        "showMentions": {
          "type": "boolean",
          "default": true
        },
        "showPrevNext": {
          "type": "boolean",
          "default": true
        },
        "showInDiscover": {
          "type": "boolean",
          "default": true
        },
        "showRecommends": {
          "type": "boolean",
          "default": true
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
