webflow.getSiteInfo()
webflow.getSiteInfo()
Get metadata about the current site.
Syntax
webflow.getSiteInfo(): Promise<{siteId: string; siteName: string; shortName: string}>
Returns
A Promise that resolves to a record containing information about the site that is currently open in the Designer - with the following properties
siteId
: string
siteId
: stringThe unique ID of the current Webflow site.
siteName
: string
siteName
: stringThe name of the current Webflow site.
shortName
: string
shortName
: stringThe the short name of the current Webflow site.
Example
const siteInfo = await webflow.getSiteInfo();
console.log('Site ID:', siteInfo.siteId);
console.log('Site Name:', siteInfo.siteName);