Mira Astro documentation

SEO, search and sharing

What Mira does for search engines, social sharing and site search, and what to set before you launch.

Before you launch

  1. Domain: set site in astro.config.mjs to your address. Canonical URLs, the sitemap, robots.txt, RSS feeds and share images all use it.
  2. Descriptions: give every page file a description, about 150 characters saying what the page is about. Conditions, treatments and posts use their summary.
  3. Share image: set shareImage in site.config.ts to a photo in src/assets/images/. Pages with their own photo, such as posts and clinics, use that instead, and a page file can set image: to choose one.
  4. Business type: set schemaType in site.config.ts to Physiotherapy, MedicalClinic or HealthAndBeautyBusiness.
  5. Your clinics: check every address and opening time. Search engines show them, and they must match your Google Business Profile.

What Mira does for you

  • A canonical URL, title and description on every page.
  • Open Graph and Twitter Card tags with a 1200×630 image, so links look good when shared on WhatsApp, Facebook and LinkedIn.
  • Structured data that helps search engines understand your site:
    • your clinic, with its address, phone and opening hours, on the home page and on each clinic’s page
    • each therapist as a Person
    • each treatment as a Service, with its price
    • each blog post as an Article, with its author
    • FAQ blocks as an FAQ (turn it off with schema: false on the block)
    • breadcrumbs on inner pages
  • hreflang tags linking each page to its translations.
  • A sitemap at /sitemap-index.xml, listing every language, and a robots.txt that points to it.
  • RSS feeds of your posts at /rss.xml and /or/rss.xml.
  • Clean, accessible HTML: one h1 per page, headings in order, labelled forms and image descriptions.
  • Fast pages. Speed affects ranking and bookings alike, and Mira is built to score 95–100 on mobile PageSpeed.

For a clinic, most patients come from local search and Google Maps:

  • Claim your Google Business Profile for each clinic, with the same name, address and phone as your site.
  • Ask happy patients for Google reviews, and link to them from the reviews block’s summary and your footer’s social links.
  • One page per condition you treat helps you appear for searches like “sciatica treatment near me”. Write about each one in your own words.

Add noindex: true to a page file. The demo does this for /thank-you/ and /search/. The block library, style guide and demo booking calendar are left out too.

After launch

Add your site to Google Search Console and submit https://yourclinic.com/sitemap-index.xml. Do the same in Bing Webmaster Tools.

Mira includes site search, powered by Pagefind. It needs no account or server: npm run build creates a search index in dist/pagefind/, and the search page loads it only when someone types.

  • The search page is /search/, and the magnifying-glass button in the header opens it.
  • Visitors only see results in the language they’re reading.
  • Pages, conditions, treatments, clinics, therapists and posts are all searchable. The block library, style guide and noindex pages are not.

Search works on the built site, so try it with npm run build and npm run preview. During npm run dev the search page explains that the index isn’t built yet.