← back to Dw Sarah Rowland Searchfix
TK-10037: publish Meet-the-Koroseal-Designers page live (id 220364832819, /pages/koroseal-designers), verified
841c4979ade09dcfb1f3c6ecb94f7f3d19573a67 · 2026-07-30 09:38:58 -0700 · Steve Abrams
Files touched
Diff
commit 841c4979ade09dcfb1f3c6ecb94f7f3d19573a67
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Jul 30 09:38:58 2026 -0700
TK-10037: publish Meet-the-Koroseal-Designers page live (id 220364832819, /pages/koroseal-designers), verified
---
publish.mjs | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/publish.mjs b/publish.mjs
new file mode 100644
index 0000000..8880d6c
--- /dev/null
+++ b/publish.mjs
@@ -0,0 +1,16 @@
+// Publish the Meet-the-Koroseal-Designers page to the LIVE store.
+// Reads the already-built koroseal-designers-page.html (Steve-approved) and POSTs it.
+import fs from 'node:fs'; import os from 'node:os';
+const env=fs.readFileSync(`${os.homedir()}/Projects/secrets-manager/.env`,'utf8');
+const tok=(k)=>(env.match(new RegExp('^'+k+'=(.+)$','m'))||[])[1]?.trim();
+// pages create needs write_content — use the content token, not the products token
+const T=tok('SHOPIFY_CONTENT_TOKEN')||tok('SHOPIFY_ADMIN_TOKEN');
+const S='designer-laboratory-sandbox.myshopify.com',A='2024-10';
+const body=fs.readFileSync(new URL('./koroseal-designers-page.html',import.meta.url),'utf8');
+const res=await fetch(`https://${S}/admin/api/${A}/pages.json`,{method:'POST',
+ headers:{'X-Shopify-Access-Token':T,'Content-Type':'application/json'},
+ body:JSON.stringify({page:{title:'Meet the Koroseal Designers', handle:'koroseal-designers', body_html:body, published:true}})});
+const j=await res.json();
+if(res.status>=300){ console.log('CREATE FAILED', res.status, JSON.stringify(j).slice(0,400)); process.exit(1); }
+console.log(`page id=${j.page.id} handle=${j.page.handle} published=${!!j.page.published_at}`);
+console.log(`URL: https://www.designerwallcoverings.com/pages/${j.page.handle}`);
← ce8dd7e TK-10037: build Meet-the-Koroseal-Designers directory page (
·
back to Dw Sarah Rowland Searchfix
·
auto-save: 2026-07-30T09:46:44 (4 files) — list-menus.mjs re 81e6816 →