@siteai/bookings-astro
v0.2.0
Published
Astro page templates for customer-facing booking pages, built on top of `@siteai/bookings-react`.
Downloads
474
Maintainers
Readme
@siteai/bookings-astro
Astro page templates for customer-facing booking pages, built on top of @siteai/bookings-react.
Install
npm install @siteai/bookings-astro @siteai/bookings-react react react-domRequires the @astrojs/react integration in your astro.config.mjs:
import react from '@astrojs/react';
export default defineConfig({ integrations: [react()] });Usage
Copy the fixed management pages from node_modules/@siteai/bookings-astro/src/pages/bookings/ into your Astro site:
src/pages/bookings/cancel.astro
src/pages/bookings/reschedule.astroTo publish a standalone booking page, start from the template at:
node_modules/@siteai/bookings-astro/src/pages/book/[slug].astroThen generate a concrete route like src/pages/book/intro-call.astro and replace:
__SITEAI_BOOKINGS_INSTALL_ID____SITEAI_BOOKINGS_SLUG____SITEAI_BOOKINGS_TITLE____SITEAI_BOOKINGS_DESCRIPTION__
Set the platform API URL in your environment:
PUBLIC_SITEAI_API_URL=https://api.siteai.chatURL shapes
- Public booking page:
https://your-site.com/book/intro-call - Cancel:
https://your-site.com/bookings/cancel?t={token} - Reschedule:
https://your-site.com/bookings/reschedule?t={token}
The tokens are generated by the SiteAI Bookings plugin and embedded in confirmation emails as {{data.cancel_url}} and {{data.reschedule_url}}.
