hubspot-cms-sync 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/hubspot-cms-sync.mjs +2 -0
- package/package.json +1 -1
- package/src/build-static.mjs +1 -1
package/bin/hubspot-cms-sync.mjs
CHANGED
|
@@ -53,6 +53,7 @@ async function main(argv = process.argv) {
|
|
|
53
53
|
.option('--out <dir>', 'output directory', 'dist')
|
|
54
54
|
.option('--base-url <url>', 'absolute base URL for canonical/og links', '')
|
|
55
55
|
.option('--tracking-portal <id>', 'HubSpot tracking-script portal id (keeps forms de-anonymizing)')
|
|
56
|
+
.option('--blog-page-size <n>', 'posts per blog listing page (match the HubSpot blog setting)', '10')
|
|
56
57
|
.action(async (options) => {
|
|
57
58
|
const config = await withConfig(program.opts());
|
|
58
59
|
const summary = await buildStatic({
|
|
@@ -60,6 +61,7 @@ async function main(argv = process.argv) {
|
|
|
60
61
|
outDir: resolvePath(config.root, options.out),
|
|
61
62
|
baseUrl: options.baseUrl,
|
|
62
63
|
trackingPortalId: options.trackingPortal,
|
|
64
|
+
blogPageSize: Number(options.blogPageSize),
|
|
63
65
|
});
|
|
64
66
|
console.log(`built static site -> ${options.out}`);
|
|
65
67
|
console.log(
|
package/package.json
CHANGED
package/src/build-static.mjs
CHANGED
|
@@ -41,7 +41,7 @@ async function loadTagSlugs(siteDir) {
|
|
|
41
41
|
* trackingPortalId, if set, injects the HubSpot tracking script into the footer so
|
|
42
42
|
* forms keep de-anonymizing (`standard_footer_includes`). Returns counts.
|
|
43
43
|
*/
|
|
44
|
-
export async function buildStatic({ siteDir, outDir, baseUrl = '', assetBase = '/assets', trackingPortalId, blogPageSize =
|
|
44
|
+
export async function buildStatic({ siteDir, outDir, baseUrl = '', assetBase = '/assets', trackingPortalId, blogPageSize = 10 } = {}) {
|
|
45
45
|
const tagMap = await loadTagSlugs(siteDir);
|
|
46
46
|
const tagSlugFor = (name) => tagMap[name] || slugify(name);
|
|
47
47
|
const footerIncludes = trackingPortalId
|