Development ·

What fits inside an article

A client logo rendered as a field of dots

This post is a test rig. The prose around it is ordinary Markdown, and everything between the paragraphs is a component from src/components — the same instances the home page uses, rendered inside the article body rather than after it.

An inline component

A component can sit in the middle of a sentence, not only between blocks. Here is the site’s marker link, inline in this paragraph: Back to the blog — same component the nav and the CTA use.

A component taking props

A site design shown on a billboard mockup

Case study

Peak

A card with its own eyebrow, heading, body and button, given four props from the article body.

Props are written the way they are in any .astro file, and imported images are real assets, so the card’s picture goes through the same optimisation as the cover above.

A component that reads its own layout

MediaCaptionRow is built for the 12-column grid, so it needs a cols container around it and the full width of the page to sit in. Both are one wrapper:

A project page shown on a laptop

Grid components need the grid. Dropped straight into the text column this row collapses, because its columns are a subgrid of a parent that is not there. Wrapped in a full-width cols container it behaves exactly as it does on a project page.

A component that queries the CMS itself

The section below is HomeTestimonials.astro, unchanged. It runs its own getCollection("testimonials"), builds its WebGL portrait stage, and keeps the Smooothy slider — drag it, or use the arrows.

Our Customers Said

We create beautiful and functional websites that make an impact.

All Testimonials
Robin Rohrmann
Kabarza
Lena Hoffmann
  • Our experience with this company has been exceptional. They delivered a beautifully designed and functional website that exceeded our expectations.
    Robin Rohrmann — CO Founder, Peak Impact Ventures
  • They understood our brand from the first call and turned it into a site that finally feels like us. Launch was on time and the CMS is a joy to use.
    Kabarza — Founder, Kabarza.com
  • Fast, precise and genuinely creative. The interactions they built made our course pages convert noticeably better within weeks.
    Lena Hoffmann — Head of Marketing, Flux Academy

Nothing was passed to it. The component owns its query, so dropping it into a post pulls whatever is in the testimonials collection at build time.

A component fed from the article

  • A desk setup with a large display
    Props can be written inline in the body.
  • Wireframes sketched on paper
    Or bound to frontmatter fields, as the other posts do.

The trade to know about: this file is .mdx, not .md. The prose still edits as prose, but each component is a JSX node rather than rich text, so the CMS treats those the way it treats any markup it does not own — see the two .md posts for the version that stays entirely in fields and rich text.

Let’s explore how we can help you achieve your goals

Click to copy
Book a Meeting