Site host from one module: host.js exports SITE_HOST/SITE_URL and every module, email, Telegram post, QR, ad click URL and OG tag reads it (no more hard-coded test hostname); public pages carry {{SITE_URL}} filled at serve time; frame check carries the curtain pass for our own hosts so a test ad can point at a spin link; stale IAP sitemap removed

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-07 08:52:04 -05:00
parent 6da444c790
commit ad744d8c0f
29 changed files with 135 additions and 111 deletions
+3 -2
View File
@@ -2,11 +2,12 @@
// through Blotato to X (@cryptoteambuild, account 7998) and Instagram (marketingwithmarty, 16261).
// Key: DATA_DIR/blotato.key (never logged). Record per slug in DATA_DIR/blog-syndication.json so a
// republish never double-posts; admin can see the result on the article row. No Facebook (Marty's call).
const { SITE_HOST, SITE_URL } = require('./host');
const fs = require('fs');
const path = require('path');
const https = require('https');
let DATA_DIR = null, PUBLIC_DIR = null, UPLOADS_DIR = null;
const SITE = 'https://linkspin-test.saasy.top';
const SITE = SITE_URL;
const ACCOUNTS = { x: { id: 7998, target: { targetType: 'twitter' }, platform: 'twitter' }, instagram: { id: 16261, target: { targetType: 'instagram' }, platform: 'instagram' } };
const FILE = () => path.join(DATA_DIR, 'blog-syndication.json');
function init(opts) { DATA_DIR = opts.dataDir; PUBLIC_DIR = opts.publicDir; UPLOADS_DIR = opts.uploadsDir; }
@@ -47,7 +48,7 @@ function xText(post) {
return t + '\n\n' + url;
}
function igText(post) {
return post.title + '\n\n' + (post.excerpt || '') + '\n\nRead it: linkspin-test.saasy.top/blog/' + post.slug + '\n\n#LinkSpin #advertising #teambuilding #polygon #crypto';
return post.title + '\n\n' + (post.excerpt || '') + '\n\nRead it: ' + SITE_HOST + '/blog/' + post.slug + '\n\n#LinkSpin #advertising #teambuilding #polygon #crypto';
}
// returns { x: {ok, id|error}, instagram: {...} }; never throws, never posts twice for one slug
async function publish(post, opts) {