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.
Parameters
Section titled “Parameters”string
The current contents of the sites/<Site>.site-meta.xml file.
options
Section titled “options”The domain (and whether it’s primary) to write, and an optional path prefix.
Returns
Section titled “Returns”The rewritten document, plus the domains the replace-all discarded.
Throws
Section titled “Throws”If xml isn’t parseable.