Diggama Logo
Integration

Diggama + Astro

The perfect pairing for content-focused websites. Zero JavaScript by default, island hydration when needed.

Zero JS by Default

Ship pure HTML and CSS. Add JavaScript only where you need interactivity.

Content Collections

Fetch Diggama content at build time. Type-safe content with Astro's collections.

100 Lighthouse

Perfect scores out of the box. Optimized for Core Web Vitals and SEO.

src/pages/blog/[slug].astro
---
import { diggama } from '@diggama/client'
import Layout from '../../layouts/Layout.astro'

export async function getStaticPaths() {
  const posts = await diggama.content
    .type('blog-post')
    .all()

  return posts.map(post => ({
    params: { slug: post.slug },
    props: { post }
  }))
}

const { post } = Astro.props
---

<Layout title={post.title}>
  <article class="prose">
    <h1>{post.title}</h1>
    <time>{post.publishedAt}</time>
    <Fragment set:html={post.content} />
  </article>
</Layout>

Why Astro + Diggama?

Content-First

Astro was built for content sites. Diggama provides the structured content.

Use Any Framework

Add React, Vue, or Svelte components. Astro handles the hydration.

SEO Optimized

Static HTML that search engines love. Fast and indexable.

Fast Builds

Astro builds are fast. Content from Diggama fetched once at build time.

Start building with Astro

Get started with our Astro starter template. This very site is built with Astro + Diggama.

Need help with Astro?

Our team can help you get started with Astro and Diggama.