# Create a siteSettings singleton

https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/site-settings-singleton

Set up a singleton document for global site configuration and pin it in Structure Builder so editors always know where to find it.

---

## Navigation

**Course:** [Migrating from Webflow to Sanity](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity) · [View as markdown](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity.md)

**Previous:** [Model navigation in Sanity](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/model-navigation) · **Next:** [Handle internal links in Portable Text](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/internal-links-portable-text)

---

## Course Contents

1. [Introduction](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/introduction-to-webflow-migration)
2. [Audit your Webflow content](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/audit-webflow-content)
3. [Recognize Webflow's content modeling patterns](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/recognize-content-modeling-patterns)
4. [Export from Webflow and connect the Data API](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/export-webflow-connect-api)
5. [Initialize Sanity and install the migration toolkit](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/initialize-sanity-migration-toolkit)
6. [Map collections to Sanity document types](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/map-collections-to-schemas)
7. [Build a page builder with a sections array](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/page-builder-sections-array)
8. [Model custom-template pages as singletons](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/custom-template-singletons)
9. [Model navigation in Sanity](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/model-navigation)
10. **Create a siteSettings singleton** *(current)*
11. [Handle internal links in Portable Text](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/internal-links-portable-text)
12. [Fetch your collection items from the API](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/fetch-collection-items-api)
13. [Run the asset pre-upload pass](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/asset-pre-upload)
14. [Resolve reference fields from API data](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/resolve-reference-fields)
15. [Convert rich text to Portable Text](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/convert-rich-text-portable-text)
16. [Extract static page content using the page DOM API](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/extract-static-page-content)
17. [Import content with the two-pass pattern](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/two-pass-import)
18. [Validate your import in Studio](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/validate-import-studio)
19. [Set up forms, redirects, and sitemap](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/forms-redirects-sitemap)
20. [Set up draft mode and visual preview](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/draft-mode-visual-preview)
21. [Validate your import without a frontend](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/validate-migration)
22. [Launch checklist and DNS transfer](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/launch-checklist-dns)
23. [AI prompt library and resources](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity/appendix-prompt-library-resources)

---

Global configuration, site name, default OG image, and footer copy belong in a single document with a fixed `_id`. This prevents multiple conflicting documents from being created. Your HTML export contains all of this: the `<title>`, default meta tags, footer text, and any global branding are already in the rendered markup. Use it as the source.



Keep siteSettings narrow: site name, default meta description, default OG image, footer copyright, social links. These are things a layout component reads once on every render, and that editors almost never touch.



Shared content blocks, a CTA section, a newsletter signup, a promotional banner, are a different problem. Putting them in siteSettings breaks down quickly: where does the second CTA go? Editors will also expect siteSettings to hold configuration, not content. The right model depends on how the content behaves:



- Always in the layout, never in the page body (e.g. a footer newsletter form). Give it its own singleton document type and query it alongside siteSettings

- Appears on multiple pages but could vary. Model it as a normal section type; editors add it per page

- Must stay in sync everywhere (change once, updates everywhere). Model it as a standalone document with a reference; page section arrays hold a `_ref` to it rather than the content itself


### Ask AI to generate the schema



```text
@webflow/export/index.html @webflow/export/[your-most-content-rich-page].html Looking at the <head>, header, and footer of these pages, identify global site configuration that belongs in a siteSettings singleton: site name, default meta description, default OG image, footer copyright text, and social links. Do not include content sections or marketing blocks — only configuration a layout component would read on every page. Write a siteSettings document type schema in TypeScript using defineType and defineField. Save it to /sanity/schemaTypes/documents/siteSettings.ts.
```

### What to look for when reviewing the output



The AI should identify fields grounded in what's actually in your site, not a generic template. One thing to verify: analytics IDs, API keys, and third-party tokens should NOT be fields in this schema. If the AI includes them, remove them. Those belong in environment variables — storing them in the CMS means a content publish is in the critical path for a configuration change.



A typical output looks like:



```typescript:sanity/schemaTypes/documents/siteSettings.ts
// sanity/schemaTypes/documents/siteSettings.ts
import { defineType, defineField } from 'sanity'

export const siteSettings = defineType({
  name: 'siteSettings',
  title: 'Site Settings',
  type: 'document',
  fields: [
    defineField({ name: 'siteName', type: 'string' }),
    defineField({ name: 'defaultMetaDescription', type: 'text', rows: 3 }),
    defineField({ name: 'defaultOgImage', type: 'image' }),
    // Your site may have additional global fields — footer copy, social links, etc.
  ]
})
```

### Pin it in Structure Builder



The fixed documentId ensures only one instance ever exists. Ask AI to wire it up:



```text
@sanity/sanity.config.ts @sanity/schemaTypes/documents/siteSettings.ts Update sanity.config.ts to add a custom Structure Builder entry that pins siteSettings as a singleton. It should appear as a top-level item in the Studio sidebar, open the single document with documentId: 'settings.global', and not be creatable as a new document from the list view. Use the structureTool plugin with a custom structure callback.
```

Editors will always find it in the same place in the sidebar, and the fixed documentId prevents duplicates from being created.



Next you’ll decide how internal links work in your rich text before extraction begins.



---

## Related Resources

- [Full course as markdown](https://www.sanity.io/learn/course/migrating-content-from-webflow-to-sanity.md)
- [All courses and lessons](https://www.sanity.io/learn/sitemap.md)
- [Complete content for LLMs](https://www.sanity.io/learn/llms-full.txt)

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://www.sanity.io/learn/resource/feedback

```json
{
  "path": "/learn/course/migrating-content-from-webflow-to-sanity/site-settings-singleton.md",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>
