···1export { DocsSidebar } from './DocsSidebar'
2export { DocsNav } from './DocsNav'
3export { Table } from './Table'
0000
···1export { DocsSidebar } from './DocsSidebar'
2export { DocsNav } from './DocsNav'
3export { Table } from './Table'
4+export { LinkCard } from './LinkCard'
5+export { StandardSite } from './StandardSite'
6+export { MarkdownButton } from './MarkdownButton'
7+export { ClickableHeading } from './ClickableHeading'
+3-3
app/components/sections/DefinitionsSection.tsx
···38 </h2>
3940 <p className="text-base sm:text-xl leading-snug tracking-tight text-muted">
41- We currently define two main lexicons that cover the core building
42- blocks of long-form platforms: where content lives, and what it
43- contains.
44 </p>
4546 <TabbedLexiconViewer tabs={ tabs } allSchemas={ allSchemas } />
···38 </h2>
3940 <p className="text-base sm:text-xl leading-snug tracking-tight text-muted">
41+ We currently define three main lexicons that cover the core building
42+ blocks of long-form platforms: where content lives, what it
43+ contains, and how users connect with publications.
44 </p>
4546 <TabbedLexiconViewer tabs={ tabs } allSchemas={ allSchemas } />
···001# Frequently Asked Questions
23-Common questions about Standard.site and implementing the lexicons.
45## General
67### What is Standard.site?
89-Standard.site is a community-driven initiative to create shared lexicon schemas for long-form publishing on AT Protocol. It enables interoperability between different publishing platforms.
1011### Who created Standard.site?
1213-Standard.site emerged from conversations between developers building long-form platforms on AT Protocol. It's maintained by the community and grows as builders identify shared needs.
14-15-### Is Standard.site official?
16-17-Standard.site is a community standard, not an official Bluesky or AT Protocol specification. However, it's designed to work seamlessly with the AT Protocol ecosystem.
1819## Technical
2021### Do I need to use all the lexicons?
2223-No. You can implement just the lexicons that make sense for your application. The schemas are designed to work independently while supporting richer integrations when combined.
2425### Can I extend the schemas?
2627-The standard focuses on shared metadata fields. You're free to add additional fields in your application, though they may not be understood by other platforms.
28-29-### How do I validate records?
30-31-Use AT Protocol's standard validation mechanisms. The lexicon schemas define the expected structure, and records are validated against these schemas by the PDS.
3233## Contributing
3435### How can I contribute?
3637-Standard.site is developed in the open. Join the conversation on Bluesky, Tangled, or check the project on GitHub to propose changes or additions.
3839### How are changes decided?
40
···1+import { StandardSite } from '@/app/components/docs'
2+3# Frequently Asked Questions
45+Common questions about <StandardSite /> and implementing the lexicons.
67## General
89### What is Standard.site?
1011+<StandardSite /> is a community-driven initiative to create shared lexicon schemas for long-form publishing on AT Protocol. It enables interoperability between different publishing platforms.
1213### Who created Standard.site?
1415+<StandardSite /> emerged from conversations between developers building long-form platforms on AT Protocol. It's maintained by the community and grows as builders identify shared needs.
00001617## Technical
1819### Do I need to use all the lexicons?
2021+No. Applications can implement just the lexicons that make sense for their use case. The schemas are designed to work independently while supporting richer integrations when combined.
2223### Can I extend the schemas?
2425+The standard focuses on shared metadata properties. Applications are free to add additional properties, though they may not be understood by other platforms.
00002627## Contributing
2829### How can I contribute?
3031+<StandardSite /> is developed in the open. Join the conversation on Bluesky or [Tangled](https://tangled.org/standard.site) to propose changes or additions.
3233### How are changes decided?
34
+43
content/docs/implementations.mdx
···0000000000000000000000000000000000000000000
···1+import { LinkCard } from '@/app/components/docs'
2+3+import { StandardSite } from '@/app/components/docs'
4+5+# Implementations
6+7+Projects and tools using <StandardSite /> lexicons to build interoperable platforms on AT Protocol.
8+9+## Development Tools
10+11+<LinkCard url="https://site-validator.fly.dev" />
12+13+## Migration Tools
14+15+<LinkCard url="https://sequoia.pub/blog/introducing-sequoia/" />
16+17+## Indexes & Discovery
18+19+<LinkCard url="https://read.pckt.blog" />
20+21+<LinkCard url="https://docs.surf" />
22+23+<LinkCard url="https://standard-search.octet-stream.net/" />
24+25+## Building Your Own
26+27+Building a tool or platform using <StandardSite /> lexicons? We'd love to hear about it! <StandardSite /> is a community-driven initiative, and new implementations help grow the ecosystem.
28+29+### What to Build
30+31+Some ideas for new implementations:
32+33+- **RSS bridges**: Convert <StandardSite /> records to RSS/Atom feeds
34+- **Static site generators**: Export <StandardSite /> content to static HTML
35+- **Mobile readers**: Native mobile apps for reading <StandardSite /> content
36+- **Import tools**: Import content from existing platforms to <StandardSite />
37+- **Content management**: Editors for creating <StandardSite /> records
38+39+## Related
40+41+- [Quick Start](/docs/quick-start) - Start implementing <StandardSite />
42+- [Publication lexicon](/docs/lexicons/publication) - Understand publication schemas
43+- [Document lexicon](/docs/lexicons/document) - Understand document schemas
+17-12
content/docs/introduction.mdx
···001# Introduction
23-**Standard.site** provides shared lexicons for long-form publishing on AT Protocol.
45## What is Standard.site?
67-Standard.site is a set of lexicon schemas that enable interoperability between long-form publishing platforms built on AT Protocol. By using shared schemas, content created on one platform can be understood and displayed by any other compatible platform.
89-## Why use shared lexicons?
1011-- **Interoperability**: Your content works across multiple platforms
12-- **Portability**: Move your content without losing structure
13-- **Consistency**: Shared vocabulary for publications, documents, and subscriptions
14-15-## Core concepts
1617### Publications
1819-A publication is a container for documents. Think of it as a blog, magazine, or newsletter. Each publication has metadata like a title, description, and avatar.
2021### Documents
2223-Documents are individual pieces of content within a publication. They contain the actual written content, along with metadata like title, publish date, and status.
2425### Subscriptions
2627-Subscriptions track relationships between users and publications, enabling follow functionality.
0000002829## Next steps
3031- Read the [Quick Start](/docs/quick-start) guide to begin implementing
32- Explore the [Publication lexicon](/docs/lexicons/publication) schema
33-- Check out the [FAQ](/docs/faq) for common questions
0
···1+import { StandardSite } from '@/app/components/docs'
2+3# Introduction
45+<StandardSite /> lexicons bring long-form writing into the social web by linking blog posts and articles to the AT Protocol. This integration helps make published work easier to share and find, while ensuring authors maintain ownership of their writing in the form of records stored on their Personal Data Server (PDS).
67## What is Standard.site?
89+Our lexicons are built with discovery and connectivity in mind. <StandardSite /> lexicons bridge the gap between writers and the communities they intend to reach.
1011+We have two main lexicons that are used to create and manage publications and written documents. In addition to these base lexicons, we maintain a handful of supporting lexicons for social features and utility.
1213+## Core Lexicons
00001415### Publications
1617+The [`site.standard.publication`](/docs/lexicons/publication) lexicon is a representation of a collection of documents published to the web. It includes important information about a publication including its location on the web, theming information, user preferences, and more.
1819### Documents
2021+The [`site.standard.document`](/docs/lexicons/document) lexicon provides metadata for individual documents. Including the document's relation to a publication if applicable, a path to the document, and more information like a document's complete contents.
2223### Subscriptions
2425+The [`site.standard.graph.subscription`](/docs/lexicons/subscription) lexicon tracks relationships between users and publications, enabling follow functionality and personalized content feeds across the AT Protocol network.
26+27+## Design Philosophy
28+29+There are minimal requirements to use these lexicons, ensuring adoptability is as straightforward as possible. As long as the minimum required properties are included in published records, they will be available for other AT Protocol platforms to consume.
30+31+While <StandardSite /> lexicons are lightweight on their own, they can be expanded to fit individual needs if necessary. The existing properties should not be seen as constraints, but rather as starting points.
3233## Next steps
3435- Read the [Quick Start](/docs/quick-start) guide to begin implementing
36- Explore the [Publication lexicon](/docs/lexicons/publication) schema
37+- Learn about [Verification](/docs/verification) to link records to a domain
38+- Check out [Implementations](/docs/implementations) to see tools and platforms using <StandardSite />
+47-32
content/docs/lexicons/document.mdx
···23# Document Lexicon
45-The `site.standard.document` lexicon defines the schema for documents within publications.
67## Overview
89-A document represents an individual piece of content, such as a blog post or article. Documents belong to a publication and contain the actual written content along with metadata.
1011## Schema
120013<Table
14- headers={['Field', 'Type', 'Required', 'Description']}
15 rows={[
16- ['publication', 'at-uri', 'Yes', 'Reference to parent publication'],
17- ['title', 'string', 'Yes', 'Document title'],
18- ['content', 'string', 'Yes', 'The document content'],
19- ['status', 'string', 'Yes', 'One of: draft, published, archived'],
20- ['visibility', 'string', 'No', 'One of: public, subscribers, private'],
21- ['createdAt', 'datetime', 'Yes', 'When the document was created'],
22- ['publishedAt', 'datetime', 'No', 'When the document was published'],
23 ]}
24/>
2526-## Status values
2728-- **draft**: Work in progress, not publicly visible
29-- **published**: Live and visible according to visibility settings
30-- **archived**: No longer actively displayed but still accessible
00000000003132## Example
3334-```typescript
35-const document = {
36- $type: 'site.standard.document',
37- publication: 'at://did:plc:abc.../site.standard.publication/main',
38- title: 'Getting Started with AT Protocol',
39- content: '...', // Your content here
40- status: 'published',
41- visibility: 'public',
42- createdAt: '2024-01-20T14:00:00.000Z',
43- publishedAt: '2024-01-20T14:30:00.000Z',
0000000044}
45```
4647-## Content format
4849-The content field is intentionally flexible. Standard.site does not prescribe a specific content format, allowing platforms to use:
5051-- Markdown
52-- HTML
53-- JSON-based rich text
54-- Custom formats
5556-This flexibility enables each platform to optimize for their use case while maintaining interoperability at the metadata level.
05758## Related
5960-- [Publication lexicon](/docs/lexicons/publication) - Parent container for documents
061- [Quick Start](/docs/quick-start) - Implementation guide
···23# Document Lexicon
45+The `site.standard.document` lexicon provides metadata for documents published on the web.
67## Overview
89+Documents may be standalone or associated with a publication. This lexicon can be used to store a document's content and its associated metadata.
1011## Schema
1213+### Required Properties
14+15<Table
16+ headers={['Property', 'Type', 'Description']}
17 rows={[
18+ ['site', 'string', 'Points to a publication record (at://) or publication URL (https://). Avoid trailing slashes.'],
19+ ['title', 'string', 'Title of the document'],
20+ ['publishedAt', 'datetime', 'Timestamp of the document\'s publish time'],
000021 ]}
22/>
2324+### Optional Properties
2526+<Table
27+ headers={['Property', 'Type', 'Description']}
28+ rows={[
29+ ['path', 'string', 'Combined with site/publication URL to construct canonical URL. Should start with a slash.'],
30+ ['description', 'string', 'Brief description or excerpt from the document'],
31+ ['coverImage', 'blob', 'Image for thumbnail or cover. Less than 1MB in size.'],
32+ ['content', 'union', 'Open union used to define the record\'s content. Each entry must specify a $type.'],
33+ ['textContent', 'string', 'Plaintext representation of the document. Should not contain markdown or formatting.'],
34+ ['bskyPostRef', 'ref', 'Strong reference to a Bluesky post. Useful to track comments off-platform.'],
35+ ['tags', 'array', 'Array of strings to tag or categorize the document. Avoid prepending with hashtags.'],
36+ ['updatedAt', 'datetime', 'Timestamp of the document\'s last edit'],
37+ ]}
38+/>
3940## Example
4142+```json
43+{
44+ "$type": "site.standard.document",
45+ "site": "at://did:plc:abc123/site.standard.publication/3lwafzkjqm25s",
46+ "path": "/blog/getting-started",
47+ "title": "Getting Started with Standard.site",
48+ "description": "Learn how to use Standard.site lexicons in your project",
49+ "coverImage": {
50+ "$type": "blob",
51+ "ref": {
52+ "$link": "bafkreiexample123456789"
53+ },
54+ "mimeType": "image/jpeg",
55+ "size": 245678
56+ },
57+ "textContent": "Full text of the article...",
58+ "tags": ["tutorial", "atproto"],
59+ "publishedAt": "2024-01-20T14:30:00.000Z"
60}
61```
6263+## Content Format
6465+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.
6667+## View the Lexicon
0006869+- [View full lexicon schema](https://pdsls.dev/at://did:plc:re3ebnp5v7ffagz6rb6xfei4/com.atproto.lexicon.schema/site.standard.document)
70+- [Example record](https://pdsls.dev/at://did:plc:revjuqmkvrw6fnkxppqtszpv/site.standard.document/3mbfqhezge25u)
7172## Related
7374+- [Publication lexicon](/docs/lexicons/publication) - Collections of documents
75+- [Verification](/docs/verification) - Link documents to web pages
76- [Quick Start](/docs/quick-start) - Implementation guide
+78-14
content/docs/lexicons/publication.mdx
···23# Publication Lexicon
45-The `site.standard.publication` lexicon defines the schema for publications.
67## Overview
89-A publication represents a container for documents, similar to a blog, magazine, or newsletter. Each user can have multiple publications.
001011## Schema
120013<Table
14- headers={['Field', 'Type', 'Required', 'Description']}
15 rows={[
16- ['title', 'string', 'Yes', 'The publication title'],
17- ['description', 'string', 'No', 'A brief description'],
18- ['avatar', 'blob', 'No', 'Publication avatar image'],
19- ['createdAt', 'datetime', 'Yes', 'When the publication was created'],
0000000000020 ]}
21/>
2223## Example
2425-```typescript
26-const publication = {
27- $type: 'site.standard.publication',
28- title: 'Tech Insights',
29- description: 'Weekly thoughts on technology and software development',
30- createdAt: '2024-01-15T10:30:00.000Z',
0000000000000000000000000000000000000031}
32```
3300000000034## Related
3536-- [Document lexicon](/docs/lexicons/document) - Content within publications
0037- [Quick Start](/docs/quick-start) - Implementation guide
···23# Publication Lexicon
45+The `site.standard.publication` lexicon is used to describe information about a particular publication.
67## Overview
89+A publication represents a collection of documents published to the web. It includes important information about a publication including its location on the web, theming information, user preferences, and more.
10+11+The publication lexicon is not a requirement, but is recommended when publishing collections of related documents.
1213## Schema
1415+### Required Properties
16+17<Table
18+ headers={['Property', 'Type', 'Description']}
19 rows={[
20+ ['url', 'string', 'Base URL for the publication (ex: https://standard.site). Combined with document path to construct full URLs. Avoid trailing slashes.'],
21+ ['name', 'string', 'The name of the publication'],
22+ ]}
23+/>
24+25+### Optional Properties
26+27+<Table
28+ headers={['Property', 'Type', 'Description']}
29+ rows={[
30+ ['icon', 'blob', 'Square image to identify publication'],
31+ ['description', 'string', 'Description of the publication'],
32+ ['basicTheme', 'ref', 'Simplified publication theme (ref → [site.standard.theme.basic](/docs/lexicons/theme))'],
33+ ['preferences', 'object', 'Platform-specific preferences for the publication'],
34+ ['preferences.showInDiscover', 'boolean', 'Whether the publication should appear in discovery feeds'],
35 ]}
36/>
3738## Example
3940+```json
41+{
42+ "$type": "site.standard.publication",
43+ "url": "https://standard.site",
44+ "icon": {
45+ "$type": "blob",
46+ "ref": {
47+ "$link": "bafkreiexample123456789"
48+ },
49+ "mimeType": "image/png",
50+ "size": 12345
51+ },
52+ "name": "Standard.site Blog",
53+ "description": "Documentation and updates about Standard.site lexicons",
54+ "basicTheme": {
55+ "$type": "site.standard.theme.basic",
56+ "background": {
57+ "$type": "site.standard.theme.color#rgb",
58+ "r": 255,
59+ "g": 255,
60+ "b": 255
61+ },
62+ "foreground": {
63+ "$type": "site.standard.theme.color#rgb",
64+ "r": 31,
65+ "g": 41,
66+ "b": 55
67+ },
68+ "accent": {
69+ "$type": "site.standard.theme.color#rgb",
70+ "r": 59,
71+ "g": 130,
72+ "b": 246
73+ },
74+ "accentForeground": {
75+ "$type": "site.standard.theme.color#rgb",
76+ "r": 255,
77+ "g": 255,
78+ "b": 255
79+ }
80+ },
81+ "preferences": {
82+ "showInDiscover": true
83+ }
84}
85```
8687+## View the Lexicon
88+89+- [View full lexicon schema](https://pdsls.dev/at://did:plc:re3ebnp5v7ffagz6rb6xfei4/com.atproto.lexicon.schema/site.standard.publication)
90+- [Example record](https://pdsls.dev/at://did:plc:revjuqmkvrw6fnkxppqtszpv/site.standard.publication/3lwafzkjqm25s)
91+92+## Extensibility
93+94+Lexicons are extendable. Additional properties may be added to better suit the needs of a project.
95+96## Related
9798+- [Document lexicon](/docs/lexicons/document) - Individual documents within publications
99+- [Theme lexicon](/docs/lexicons/theme) - Publication theming
100+- [Verification](/docs/verification) - Link publications to a domain
101- [Quick Start](/docs/quick-start) - Implementation guide
+40
content/docs/lexicons/subscription.mdx
···0000000000000000000000000000000000000000
···1+import { Table } from '@/app/components/docs'
2+3+# Subscription Lexicon
4+5+The `site.standard.graph.subscription` lexicon tracks relationships between users and publications.
6+7+## Overview
8+9+Subscriptions enable users to follow publications and receive updates about new content. They represent the social connection between readers and the publications they're interested in.
10+11+## Schema
12+13+### Required Properties
14+15+<Table
16+ headers={['Property', 'Type', 'Description']}
17+ rows={[
18+ ['publication', 'at-uri', 'AT-URI reference to the publication record being subscribed to (ex: at://did:plc:abc123/site.standard.publication/xyz789)'],
19+ ]}
20+/>
21+22+## Example
23+24+```json
25+{
26+ "$type": "site.standard.graph.subscription",
27+ "publication": "at://did:plc:abc123/site.standard.publication/3lwafzkjqm25s"
28+}
29+```
30+31+## View the Lexicon
32+33+- [View full lexicon schema](https://pdsls.dev/at://did:plc:re3ebnp5v7ffagz6rb6xfei4/com.atproto.lexicon.schema/site.standard.graph.subscription)
34+- [Example record](https://pdsls.dev/at://did:plc:revjuqmkvrw6fnkxppqtszpv/site.standard.graph.subscription/3lz4ynejb4225)
35+36+## Related
37+38+- [Publication lexicon](/docs/lexicons/publication) - Publications that can be subscribed to
39+- [Document lexicon](/docs/lexicons/document) - Content from subscribed publications
40+- [Quick Start](/docs/quick-start) - Implementation guide
···1+import { Table } from '@/app/components/docs'
2+3+# Theme Lexicon
4+5+The `site.standard.theme.basic` lexicon provides a simplified theme definition for publications, enabling basic color customization for content display across different platforms and applications.
6+7+## Overview
8+9+This lexicon ensures publications maintain their visual identity across different reading applications and platforms by defining core colors for content display.
10+11+## Schema
12+13+### Required Properties
14+15+<Table
16+ headers={['Property', 'Type', 'Description']}
17+ rows={[
18+ ['background', 'ref', 'Color used for content background (ref → site.standard.theme.color#rgb)'],
19+ ['foreground', 'ref', 'Color used for content text (ref → site.standard.theme.color#rgb)'],
20+ ['accent', 'ref', 'Color used for links and button backgrounds (ref → site.standard.theme.color#rgb)'],
21+ ['accentForeground', 'ref', 'Color used for button text (ref → site.standard.theme.color#rgb)'],
22+ ]}
23+/>
24+25+## Color Format
26+27+Colors are defined using the `site.standard.theme.color#rgb` type from the `site.standard.theme.color` lexicon.
28+29+### RGB Color Type
30+31+Each color is an object with three required integer properties:
32+33+<Table
34+ headers={['Property', 'Type', 'Range', 'Description']}
35+ rows={[
36+ ['r', 'integer', '0-255', 'Red channel value'],
37+ ['g', 'integer', '0-255', 'Green channel value'],
38+ ['b', 'integer', '0-255', 'Blue channel value'],
39+ ]}
40+/>
41+42+### RGBA Color Type
43+44+The `site.standard.theme.color` lexicon also defines an `rgba` type for colors with transparency:
45+46+<Table
47+ headers={['Property', 'Type', 'Range', 'Description']}
48+ rows={[
49+ ['r', 'integer', '0-255', 'Red channel value'],
50+ ['g', 'integer', '0-255', 'Green channel value'],
51+ ['b', 'integer', '0-255', 'Blue channel value'],
52+ ['a', 'integer', '0-100', 'Alpha (opacity) value, where 0 is transparent and 100 is opaque'],
53+ ]}
54+/>
55+56+### Color Roles
57+58+- **background**: Main surface color for content areas
59+- **foreground**: Default color for body text and content
60+- **accent**: Color for interactive elements like links and button backgrounds
61+- **accentForeground**: Text color used on accent-colored backgrounds (ex: button text)
62+63+## Accessibility
64+65+When defining theme colors, ensure sufficient contrast ratios:
66+67+- **Normal text** (foreground/background): Minimum contrast ratio of 4.5:1
68+- **Large text** (18pt+): Minimum contrast ratio of 3:1
69+- **Interactive elements** (accent/accentForeground): Minimum contrast ratio of 4.5:1
70+71+Test color combinations to ensure readability across different devices and lighting conditions.
72+73+## Usage in Publications
74+75+Include the basic theme in your publication record:
76+77+```json
78+{
79+ "$type": "site.standard.publication",
80+ "url": "https://myblog.com",
81+ "name": "My Blog",
82+ "basicTheme": {
83+ "$type": "site.standard.theme.basic",
84+ "background": {
85+ "$type": "site.standard.theme.color#rgb",
86+ "r": 255,
87+ "g": 255,
88+ "b": 255
89+ },
90+ "foreground": {
91+ "$type": "site.standard.theme.color#rgb",
92+ "r": 31,
93+ "g": 41,
94+ "b": 55
95+ },
96+ "accent": {
97+ "$type": "site.standard.theme.color#rgb",
98+ "r": 59,
99+ "g": 130,
100+ "b": 246
101+ },
102+ "accentForeground": {
103+ "$type": "site.standard.theme.color#rgb",
104+ "r": 255,
105+ "g": 255,
106+ "b": 255
107+ }
108+ }
109+}
110+```
111+112+### Converting from Hex to RGB
113+114+Convert hex color codes to RGB objects:
115+116+```typescript
117+function hexToRgb(hex: string): { r: number; g: number; b: number } {
118+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)
119+ return result ? {
120+ r: parseInt(result[1], 16),
121+ g: parseInt(result[2], 16),
122+ b: parseInt(result[3], 16)
123+ } : { r: 0, g: 0, b: 0 }
124+}
125+126+// Example: Convert #3B82F6 to { r: 59, g: 130, b: 246 }
127+const accentColor = hexToRgb('#3B82F6')
128+```
129+130+## Platform Implementation
131+132+### Rendering Content
133+134+Platforms should:
135+1. Read the `basicTheme` from the publication record
136+2. Convert RGB values to usable color formats (hex, CSS rgb(), etc.)
137+3. Apply theme colors to their UI components
138+4. Respect user preferences to override publication themes
139+140+### Example Implementation
141+142+```typescript
143+function rgbToHex(color: { r: number; g: number; b: number }): string {
144+ return `#${color.r.toString(16).padStart(2, '0')}${color.g.toString(16).padStart(2, '0')}${color.b.toString(16).padStart(2, '0')}`
145+}
146+147+function applyPublicationTheme(theme: BasicTheme) {
148+ document.documentElement.style.setProperty(
149+ '--publication-bg',
150+ rgbToHex(theme.background)
151+ )
152+153+ document.documentElement.style.setProperty(
154+ '--publication-fg',
155+ rgbToHex(theme.foreground)
156+ )
157+158+ document.documentElement.style.setProperty(
159+ '--publication-accent',
160+ rgbToHex(theme.accent)
161+ )
162+163+ document.documentElement.style.setProperty(
164+ '--publication-accent-fg',
165+ rgbToHex(theme.accentForeground)
166+ )
167+}
168+```
169+170+## Best Practices
171+172+1. **Test accessibility**: Always verify color contrast ratios meet WCAG guidelines
173+2. **Consider readability**: Ensure foreground/background combinations are legible
174+3. **Test button colors**: Verify accent/accentForeground pairs have sufficient contrast
175+4. **Respect user preferences**: Allow users to override publication themes if desired
176+5. **Provide all required properties**: All four color properties are required for a valid theme
177+178+## Related
179+180+- [Publication lexicon](/docs/lexicons/publication) - Publications can include basicTheme
181+- [Quick Start](/docs/quick-start) - Implementation guide
182+- [Implementations](/docs/implementations) - See how platforms use theming
+42
content/docs/permissions.mdx
···000000000000000000000000000000000000000000
···1+import { Table } from '@/app/components/docs'
2+import { StandardSite } from '@/app/components/docs'
3+4+# Permissions
5+6+<StandardSite /> provides a permission set for applications to access publications, documents, and subscriptions.
7+8+## Overview
9+10+Applications that interact with <StandardSite /> records on a user's Personal Data Server (PDS) must request appropriate permissions. Our permission set defines which collections an application can read from and write to.
11+12+## Full <StandardSite /> Access
13+14+The `site.standard.authFull` permission set provides complete access to all <StandardSite /> features.
15+16+### Requesting Permissions
17+18+Include `site.standard.authFull` in the OAuth scope when requesting user authorization:
19+20+```
21+include:site.standard.authFull
22+```
23+24+### Granted Permissions
25+26+This permission set grants access to the following collections:
27+28+<Table
29+ headers={['Collection', 'Description']}
30+ rows={[
31+ ['site.standard.publication', 'Read and write access to publication records'],
32+ ['site.standard.document', 'Read and write access to document records'],
33+ ['site.standard.graph.subscription', 'Read and write access to subscription records'],
34+ ]}
35+/>
36+37+## Related
38+39+- [Quick Start](/docs/quick-start) - Get started implementing <StandardSite />
40+- [Publication lexicon](/docs/lexicons/publication) - Understanding publication records
41+- [Document lexicon](/docs/lexicons/document) - Understanding document records
42+- [Subscription lexicon](/docs/lexicons/subscription) - Understanding subscription records
+71-29
content/docs/quick-start.mdx
···001# Quick Start
23-Get started with Standard.site lexicons in your AT Protocol application.
45-## Prerequisites
67-- An AT Protocol application or PDS
8-- Familiarity with AT Protocol lexicons and records
910-## Basic implementation
1112-### 1. Reference the lexicons
1314-Standard.site lexicons are published under the `site.standard` namespace. The main lexicons are:
1516-- `site.standard.publication` - Publication metadata
17-- `site.standard.document` - Document content and metadata
18-- `site.standard.subscription` - User-publication relationships
1920-### 2. Create a publication
2122-```typescript
23-const publication = {
24- $type: 'site.standard.publication',
25- title: 'My Blog',
26- description: 'A personal blog about technology',
27- createdAt: new Date().toISOString(),
0000028}
29```
3031-### 3. Create a document
3233-```typescript
34-const document = {
35- $type: 'site.standard.document',
36- publication: 'at://did:plc:.../site.standard.publication/...',
37- title: 'My First Post',
38- content: '...', // Your content format
39- status: 'published',
40- createdAt: new Date().toISOString(),
00000000000000000041}
42```
4344-## Next steps
000000000004546-- Learn about the [Publication](/docs/lexicons/publication) schema in detail
47-- Explore [Document](/docs/lexicons/document) fields and options
000000
···1+import { StandardSite } from '@/app/components/docs'
2+3# Quick Start
45+Get started with <StandardSite /> lexicons.
67+## What You Need
89+- An AT Protocol [Identity](https://atproto.com/guides/identity)
10+- A website or blog (any domain works)
1112+## Basic Implementation
1314+### 1. Reference the Lexicons
1516+<StandardSite /> lexicons are published under the `site.standard` namespace. The main lexicons are:
1718+- [`site.standard.publication`](/docs/lexicons/publication) - Publication metadata
19+- [`site.standard.document`](/docs/lexicons/document) - Document content and metadata
20+- [`site.standard.graph.subscription`](/docs/lexicons/subscription) - User-publication relationships
2122+### 2. Create a Publication Record
2324+A publication requires a `url` and `name`:
25+26+```json
27+{
28+ "$type": "site.standard.publication",
29+ "url": "https://myblog.com",
30+ "name": "My Blog",
31+ "description": "A personal blog about technology",
32+ "preferences": {
33+ "showInDiscover": true
34+ }
35}
36```
3738+### 3. Verify the Publication
3940+Add a `.well-known` endpoint to the domain:
41+42+```
43+https://myblog.com/.well-known/site.standard.publication
44+```
45+46+This should return the publication's AT-URI:
47+48+```
49+at://did:plc:yourDID/site.standard.publication/rkey
50+```
51+52+### 4. Create a Document Record
53+54+Documents require `site`, `title`, and `publishedAt`:
55+56+```json
57+{
58+ "$type": "site.standard.document",
59+ "site": "at://did:plc:abc123/site.standard.publication/3lwafzkjqm25s",
60+ "title": "My First Post",
61+ "path": "/posts/my-first-post",
62+ "description": "An introduction to my blog",
63+ "publishedAt": "2024-01-20T14:30:00.000Z",
64+ "tags": ["introduction", "blog"],
65+ "textContent": "Full text content here..."
66}
67```
6869+### 5. Verify the Document
70+71+Add a `<link>` tag to the document's HTML:
72+73+```html
74+<link
75+ rel="site.standard.document"
76+ href="at://did:plc:yourDID/site.standard.document/rkey"
77+/>
78+```
79+80+## Extensibility
8182+While the minimum required properties are straightforward, additional properties can be added as needed. The lexicons are designed to be starting points, not constraints.
83+84+## Next Steps
85+86+- Learn about [Verification](/docs/verification) in detail
87+- Explore the [Publication](/docs/lexicons/publication) schema
88+- Review [Document](/docs/lexicons/document) properties and options
89+- Check out [Implementations](/docs/implementations) for tools and examples
···1+import { StandardSite } from '@/app/components/docs'
2+3+# Verification
4+5+Since <StandardSite /> records reference domains and web pages, a verifiable way for these resources to point back to their corresponding records is needed.
6+7+## Overview
8+9+Verification is accomplished using a `.well-known` endpoint for publications, and an HTML `<link>` tag for documents.
10+11+When an application needs to verify a record, it fetches the appropriate verification endpoint and checks that the returned value matches the record's AT-URI.
12+13+A <StandardSite /> record should only be considered "valid" if the author of the material provides an accurate verification endpoint pointing to the record.
14+15+## Publication Verification
16+17+To verify a publication, add a `.well-known` endpoint to the domain:
18+19+```
20+/.well-known/site.standard.publication
21+```
22+23+The endpoint should return the AT-URI of the publication record:
24+25+```
26+at://did:plc:abc123/site.standard.publication/rkey
27+```
28+29+### Non-root Publications
30+31+If the publication does not live at the domain root, append the publication path to the endpoint:
32+33+```
34+/.well-known/site.standard.publication/path/to/publication
35+```
36+37+## Document Verification
38+39+To verify an individual document, include a `<link>` tag in the document's `<head>` that references its AT-URI.
40+41+### HTML Example
42+43+```html
44+<link
45+ rel="site.standard.document"
46+ href="at://did:plc:xyz789/site.standard.document/rkey"
47+/>
48+```
49+50+This confirms the association between the rendered document and its `site.standard.document` record.
51+52+## Verification Flow
53+54+1. An application discovers a <StandardSite /> record
55+2. The record contains a `url` (for publications) or `site` + `path` (for documents)
56+3. The application fetches the verification endpoint from that URL
57+4. The application checks if the returned AT-URI matches the record
58+5. If they match, the record is verified
59+60+## Best Practices
61+62+- Always implement verification for production records
63+- Use HTTPS for all publication and document URLs
64+- Keep AT-URIs consistent across records and verification endpoints
65+- Update verification endpoints when migrating records to a new DID
66+67+## Related
68+69+- [Publication lexicon](/docs/lexicons/publication) - Understanding publication records
70+- [Document lexicon](/docs/lexicons/document) - Understanding document records
71+- [Quick Start](/docs/quick-start) - Implementation guide
···1+# Standard.site Documentation
2+3+## Overview
4+Standard.site provides AT Protocol lexicons for long-form publishing on the open social web.
5+6+## Navigation
7+8+### Getting Started
9+- Introduction: https://standard.site/docs/introduction
10+ Overview of Standard.site lexicons and core concepts
11+12+- Quick Start: https://standard.site/docs/quick-start
13+ Step-by-step guide to implementing Standard.site lexicons
14+15+- Permissions: https://standard.site/docs/permissions
16+ Understanding record permissions and access control
17+18+- Verification: https://standard.site/docs/verification
19+ Linking records to domains for authenticity
20+21+### Core Lexicons
22+- Publication: https://standard.site/docs/lexicons/publication
23+ `site.standard.publication` - Collection metadata and theming
24+25+- Document: https://standard.site/docs/lexicons/document
26+ `site.standard.document` - Individual document records
27+28+- Subscription: https://standard.site/docs/lexicons/subscription
29+ `site.standard.graph.subscription` - Follow relationships
30+31+- Theme: https://standard.site/docs/lexicons/theme
32+ `site.standard.theme` - Theming configuration
33+34+### Resources
35+- Implementations: https://standard.site/docs/implementations
36+ Tools and platforms using Standard.site lexicons
37+38+- FAQ: https://standard.site/docs/faq
39+ Common questions and answers
40+41+## Features
42+- All documentation pages support anchor links (click any heading to copy its link)
43+- Each page provides a "Markdown" link in the footer for direct AI agent consumption
44+- Full markdown source available via API: /api/docs/markdown/{slug}
45+46+## API Access
47+GET /api/docs/markdown/{slug} - Returns the raw markdown content of any documentation page
48+Example: /api/docs/markdown/introduction
49+50+## Key Concepts
51+- AT Protocol: Authenticated Transfer Protocol - decentralized social networking
52+- PDS: Personal Data Server - stores user data and records
53+- Lexicons: Schemas that define record types in AT Protocol
54+- NSID: Namespaced Identifier - unique identifier format for lexicons
55+56+## Implementation Quick Reference
57+1. Create publication record with site.standard.publication lexicon
58+2. Create document records with site.standard.document lexicon
59+3. Link documents to publication via publication reference
60+4. Implement verification to link records to your domain
61+5. Support subscription records for follow functionality