Statamic is a modern, flat-file CMS. It allows developers to easily create dynamic websites and applications while offering content editors an intuitive and user-friendly interface for managing content.
Statamic comes with a built-in REST API and GraphQL API to connect your data to Astro.
To get started, you will need to have the following:
STATAMIC_API_ENABLED=true or STATAMIC_GRAPHQL_ENABLED=true in the .env file and enable required resources in the API configuration file.Fetch your Statamic data from your site’s REST API URL. By default, it’s https://[YOUR-SITE]/api/. Then, you can render your data properties using Astro’s set:html={} directive.
For example, to display a list of titles and their content from a selected collection:
Fetch your Statamic data with your site’s GraphQL API URL. By default, it’s https://[YOUR-SITE]/graphql/. Then, you can render your data properties using Astro’s set:html={} directive.
For example, to display a list of titles and their content from a selected collection:
To deploy your Astro site visit our deployment guides and follow the instructions for your preferred hosting provider.
© 2021 Fred K. Schott
Licensed under the MIT License.
https://docs.astro.build/en/guides/cms/statamic/