---
export type Props = {
  value: string
  template?: `${string}%s${string}`
}

const { value, template = "%s" } = Astro.props

// A replacer function keeps "$&" and other "$" patterns in the title as text
const title = template.replace("%s", () => value)
---

<title>{title}</title>
