Site Fields
Site Fields are global content that appears across multiple pages. They’re perfect for content that needs to be consistent site-wide but may change over time.Common Use Cases
- Logo: Site logo that appears in the header
- Navigation: Main navigation menu items
- Footer Content: Footer links, copyright, social media
- Contact Information: Phone, email, address
- Social Links: Twitter, Facebook, LinkedIn profiles
- SEO Defaults: Default meta description, Open Graph image
Creating Site Fields
1
Open site settings
Navigate to your site and click “Site” in the toolbar
2
Add a field
Click “Add Field” and choose your field type
3
Configure the field
- Name: Internal identifier (e.g.,
logo,nav_items) - Label: Display name for editors
- Type: Field type (text, image, repeater, etc.)
4
Use in blocks
Reference site fields in your blocks using Site Field fields:
- Add a Site Field field to your block
- Set the field key (e.g.,
logo) - Select which site field to reference
Site fields are reactive. When you update them, all blocks using them update automatically across your entire site.
Head HTML
The Head HTML section lets you add custom HTML to the<head> of every page on your site. Use this for analytics, fonts, meta tags, and other site-wide scripts.
Head HTML supports Svelte syntax and has access to site fields, allowing you to dynamically generate content based on your site configuration.
Common Use Cases
CSS Variables (Design System): Define a design system for your site using CSS Custom Properties. Define colors, typography, spacing, and other design tokens once, then use them across all your blocks.Body Footer HTML
The Body Footer HTML section lets you add custom HTML before the closing</body> tag of every page. Use this for scripts that should load after the page content.
Common Use Cases
Chat Widgets:Body Footer HTML loads after page content, making it better for non-critical scripts. This improves perceived page load speed.
Next Steps
Working with Fields
Learn how to create and use fields in blocks
Understanding Slots
Master page type slots for consistent layouts