Backfill a single HTML string. Pure function โ does not touch the filesystem. Returns the (possibly unchanged) HTML plus an action tag describing what happened.
Contract:
If the input already contains any og:locale:alternate tag โ no-op.
If no og:locale tag is present โ no-op (we never invent one).
If the existing og:locale value is in OG_LOCALE_ALIASES, rewrite it to the canonical form before inserting the alternates list.
Otherwise we insert the 13 sibling alternate tags directly after the existing og:locale, using the same leading whitespace so the head block stays visually tidy.
Backfill a single HTML string. Pure function โ does not touch the filesystem. Returns the (possibly unchanged) HTML plus an action tag describing what happened.
Contract:
og:locale:alternatetag โ no-op.og:localetag is present โ no-op (we never invent one).og:localevalue is inOG_LOCALE_ALIASES, rewrite it to the canonical form before inserting the alternates list.og:locale, using the same leading whitespace so the head block stays visually tidy.