Frontend only
This file is shipped to the browser (or imported by the loader). Put only
pk_ / dk_ here — never sk_ or mt_. Minimal example
export const macroConfig = {
apiBaseUrl: 'https://api.macrocontent.dev',
websiteId: 'YOUR_WEBSITE_UUID',
publicKey: 'pk_…',
defaultLocale: 'en',
editorLogin: {
enabled: true,
shortcut: 'Mod+Shift+M',
triggers: true,
},
}Options
| Name | Type | Description |
|---|---|---|
apiBaseUrl | string | Required. API origin. |
websiteId | string | Required. Website UUID from Dashboard. |
publicKey | string | Required. pk_ or dk_ frontend key. |
devKey | string | Optional alternate development key field. |
defaultLocale | string | Default content locale (e.g. en). |
locale | string | Force editor/content locale; omit for site default. |
debug | boolean | Log [Macro SDK] phased diagnostics. |
autoSaveDebounceMs | number | Debounce for draft autosave. |
enableInlineEditing | boolean | Allow inline edit after session. |
openOverlayOnSession | boolean | Open overlay chrome after login. |
editorLogin | object | In-page sign-in modal + shortcut. |
overlay | boolean | object | false disables overlay package load. |
poweredBy | boolean | object | Floating badge / attribution options. |
contentRoot | string | CSS selector for badge layout root. |
resolvePageSlug | fn | (pathname) => slug for SEO/page registry. |
syncOnEditorStart | string[] | Data-source groups to sync on editor start. |
nodes | MacroNodeDefinition[] | Custom/community node definitions. |
editorLogin
| Name | Type | Description |
|---|---|---|
enabled | boolean | Default true. |
shortcut | string | Default 'Mod+Shift+M' (⌘/Ctrl+Shift+M). |
triggers | boolean | Wire [data-macro-editor-login-trigger] clicks. |
poweredBy
Boolean or object. Client false is ignored when the server requires attribution (powered_by_required). See Powered-by & attribution.
| Name | Type | Description |
|---|---|---|
enabled | boolean | Default true. |
href | string | Marketing URL (UTM appended). |
label | string | Badge label text. |
contentRoot | string | Shell selector for badge positioning. |
overlay
Load @macrocontent/overlay after login unless set to false. Object form supports position, mode, theme (dark | light), and close button. Details: Overlay & login.
nodes
Array of MacroNodeDefinition registered at boot. Local definitions override Store components with the same typeId. See Custom components.