SR
Click to open github profile
Composables

useCraftCurrentSite

Learn how to use the useCraftCurrentSite composable.


This composable offers an easy way to retrieve the current site based on the siteMap defined in nuxt.config.ts. It facilitates multisite support and simplifies querying data from your Craft CMS backend.

Usage

Returns the current site based on the current URL:

const currentSite = useCraftCurrentSite();

Copyright © 2025 Samuel Reichör