#What is the best astro infrastructure for CMS?

1 messages · Page 1 of 1 (latest)

sturdy urchin
#

How should I structure my astro project to allow for headless cms interaction.

What files and folder structure need to be included?

unique juncoBOT
#

Hi @sturdy urchin. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

To structure your Astro project for headless CMS interaction, you should follow Astro's recommended project structure and integrate the CMS of your choice. Here's a general outline of the project structure:

  • src/ - Your project source code (components, pages, styles, etc.)
  • public/ - Your non-code, unprocessed assets (fonts, icons, etc.)
  • package.json - A project manifest.
  • astro.config.mjs - An Astro configuration file (recommended).
  • tsconfig.json - A TypeScript configuration file (recommended).

For headless CMS integration, you can choose a CMS that works well with Astro, such as Storyblok, which provides an Astro integration (https://docs.astro.build/en/guides/integrations-guide/). Some CMSes provide a JavaScript SDK, a library that you install and use to fetch your remote content.

If you're using a Front Matter CMS, you'll have a frontmatter.json configuration file and a .frontmatter folder in the root of your project:

  • .frontmatter/
    • database/
      • mediaDb.json
  • src/
  • astro.config.mjs
  • frontmatter.json
  • package.json

For more information on Astro's project structure, refer to the Project Structure (https://docs.astro.build/en/core-concepts/project-structure) documentation.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

Astro Documentation

Learn how to structure a project with Astro.