Docs

Code snippets

Tools → Snippets is a built-in library of copy-paste Astro code. Snippets are generated dynamically — form URLs use your admin origin, collection examples use the real names from your pod, and the ticket-button snippet only appears when an events collection exists.

Where to find it

Go to Tools → Snippets in the admin sidebar (or press g p in Space Station mode). Click any card to expand it, then hit Copy to copy the code to clipboard.

Available snippets

CategorySnippetDescription
SetupIntegration — astro.config.mjsAdd orbiter-integration to your Astro project
ContentgetCollectionFetch all published entries from a collection at build time
ContentDynamic page — [slug].astroGenerate one static page per entry
ContentImage from media libraryRender a media-library image field
SEOSEO <head> — meta + OGFull head block with meta title, description, and Open Graph
FormsContact formHTML + JS for a contact form with honeypot
FormsBooking / TerminanfrageBooking form with date, time, persons fields
EventsTicket-ButtonPretix / Eventbrite / Eventim ticket link with price display (only shown when an events collection exists)
IntegrationRSS Feed link<link rel="alternate"> for the auto-generated feed
IntegrationSitemaprobots.txt Sitemap directive for Google Search Console
IntegrationJSON API fetchClient-side runtime fetch without a build step

Dynamic values

The following are substituted automatically when the page loads:

  • Collection name — uses the first content collection found in the pod (blog, posts, articles, news — or the first one defined)
  • Admin origin — form action URLs use window.location.origin, so they point to your actual admin host
  • Events collection — the ticket-button snippet only renders if your pod has a collection with ID events

Filter by category

Use the filter bar at the top (All / Setup / Content / SEO / Forms / Events / Integration) to show only the snippets relevant to your current task.