Skip to content

patchCustomSiteXml

patchCustomSiteXml(xml, options): PatchCustomSiteXmlResult

Defined in: siteMetadataXml.ts:57

Patch a CustomSite metadata document: replace every customWebAddresses entry with exactly one, and optionally set urlPathPrefix.

Per the CustomSite metadata reference, saving or deploying a CustomSite replaces all root custom URLs with the list being written — so this replaces rather than appends, matching what the deploy is going to do regardless.

string

The current contents of the sites/<Site>.site-meta.xml file.

PatchCustomSiteXmlOptions

The domain (and whether it’s primary) to write, and an optional path prefix.

PatchCustomSiteXmlResult

The rewritten document, plus the domains the replace-all discarded.

If xml isn’t parseable.