Your first site in 10 minutes
This guide starts from scratch and stops at a green astro build. The first page shows without an account: the starter ships a demo snapshot read offline. Count account creation separately, the rest fits in ten minutes.
-
Create the project and run it
The starter installs an Astro site with the Menestrel loader already wired and an offline fixture.
Fenêtre de terminal npm create menestrel@latest my-sitecd my-sitenpm run devOpen
http://localhost:4321/. The home page, a service entry and the Menestrel badge show up, served by the embedded snapshot. -
Tour the template
Three files are enough to understand the wiring:
src/content.config.ts: each collection declaresloader: menestrelLoader({ collection: '...' }).src/layouts/Layout.astro:<CmsSeo>, therichtext-styles.csssheet and<MenestrelBadge>.src/pages/services/[slug].astro:getStaticPathsover the entries,<RichText>and<CmsImage>over the fields.
-
Create a project and a token
In the Menestrel admin, create a project, then an
admin-scoped token. Keep it:menestrel initwill drop it into an unversioned.envfile. -
Connect the project and push the schema
From the site root,
initwrites the config, the.envand the snippets to paste.syncsends your schema to the server.Fenêtre de terminal npx menestrel init --token cmt_adm_xxxnpx menestrel sync --yes -
Edit, publish, build
Edit an entry in the admin and publish it. Pull the published snapshot and run the build: the pages reflect the published content.
Fenêtre de terminal npx menestrel pullnpm run build
And for production
Section titled “And for production”In production, do not depend on the admin at build time. Set MENESTREL_CONTENT_URL to the published snapshot URL: the build passes even if the application is down. See Environment variables.