Site config#
hubspot-site.json at the root of a site repo holds every constant that differs from one site to the next. The
plugin scripts and the guard hook read it, so no script names a client. The scripts find it by walking up from the
current directory. Start from templates/hubspot-site.example.json:
{
"site": { "name": "Example Co", "url": "https://www.example.com", "title_suffix": " | Example Co" },
"theme": { "name": "Main Theme", "folder": "theme" },
"dnd_area": "main_content",
"accounts": {
"dev": {
"cli": "example-dev", "portal": "11111111",
"files": "https://11111111.fs1.hubspotusercontent-na1.net/hubfs/11111111/",
"sentinel": { "id": "100000000001", "slug": "dev-smoke-test" }
},
"live": {
"cli": "example-live", "portal": "22222222",
"files": "https://www.example.com/hubfs/",
"sentinel": { "slug": "about" },
"token_env": "HUBSPOT_LIVE_TOKEN"
}
},
"catalog": { "annotations": "catalog-annotations.json", "crawl_theme": "", "crawl_names": {} },
"style_tab": { "adopted": [], "themes": ["solid_white", "light", "transparent", "dark", "darker"] },
"regression": { "representative": [] },
"qa": { "no_closer_types": ["case-study", "utility"], "no_closer_slugs": ["contact"] },
"drafts": { "type_order": ["home", "service", "solution", "partner", "case-study", "industry", "company"] }
}
Fields#
| Field | Used by | Meaning |
|---|---|---|
site.name |
drafts index | The client name shown on generated pages. |
site.url |
QA, regression gate | The live origin. QA accepts site-relative links against it; the gate snapshots registry pages whose source starts with it. |
site.title_suffix |
publisher | Stripped from htmlTitle to name a page in HubSpot. |
theme.name |
publisher, catalog | The Design Manager folder: module paths are /<name>/<module>. |
theme.folder |
catalog, linter | Where the fetched theme sits in the repo. |
dnd_area |
publisher, clone, patch | The template's drag-and-drop area name, the key in layoutSections. |
accounts.<role>.cli |
everything that writes, guard | The HubSpot CLI account name. |
accounts.<role>.portal |
guards | The portal id. hs account list must show the name resolving to it. |
accounts.<role>.files |
publisher, clone, patch, staging | The File Manager base URL that ../assets/ is rewritten to. Dev defaults to the portal's hubfs URL. |
accounts.<role>.sentinel |
publisher, clone | A page that must exist on the portal before anything is written. On dev, use the smoke page, with its id. |
accounts.live.token_env |
live scripts, guard | The name of the service-key variable in .env. |
catalog.annotations |
catalog | The path of the hand-written module notes. |
catalog.crawl_theme |
catalog | If set, only crawled pages with this theme tag count toward live usage. |
catalog.crawl_names |
catalog | Module path → crawler name, wherever they differ. |
style_tab.adopted |
linter | Modules that follow the Style tab convention. |
style_tab.themes |
linter | The one shared theme list. |
regression.representative |
regression gate | Slugs that also get a 390px screenshot: one or two per page type. |
qa.no_closer_types |
QA | Page types that end without a closer section (default: case-study, utility). |
qa.no_closer_slugs |
QA | Single pages that end without a closer. |
drafts.type_order |
drafts index | The order page types are listed in. Types not named follow alphabetically. |
--account on the scripts takes dev, live or the CLI name.
Keys don't go here#
hubspot-site.json is committed. CLI keys live in ~/.hscli/config.yml. The live service key lives in the
git-ignored .env, under the name in token_env.