Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

astro-tina

dawaltconley138ISC0.1.2TypeScript support: included

Support contextual editing with TinaCMS in static Astro sites.

withastro, tina, tinacms, astro

readme

astro-tina

An Astro integration for Tina CMS.

At the moment, this integration only provides a client directive that only hydrates React components in the Tina CMS visual editor. This allows websites to support live editing without shipping React to the client.

<MyComponent client:tina {...props} />

Setup

First, follow the instructions to set up Tina in your Astro project.

Then, install the integration...

npm install astro-tina

...and add it to your project config.

import { defineConfig } from 'astro/config'
import react from '@astrojs/react'
import tina from 'astro-tina'

// https://astro.build/config
export default defineConfig({
  integrations: [react(), tina()],
})

You can now hydrate components using the client:tina directive.