Stack POL Pro pages (Marty 2026-11-09): a Pro member's page shows their own LinkSpin Banner Spins in the ad spots (a spot with no fitting size keeps the network zone), their spin links, a purple Polygon QR to the page (/qr/<username>.svg, qrcode module) and a "Want a personalized page like this?" panel (join under the member, or Unlock Pro in IAP). Every page opened with ?ref=<Pro member> credits them on every call to action (join links, game links, program pages, internal links carry the ref) and shows their banners; no ref or a non-Pro ref = the standard network pages and zones. Blog posts now carry an ad spot after the third paragraph, and personalized posts end with the member's links and the Pro panel. Member pages also get a network spot and the latest blog posts. Indexer reads pro[] from IAP stack-optin.json and adds each Pro member's active spins and spin links (matched by username in LinkSpin).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-09 15:31:39 -06:00
parent e53565051b
commit 05f3514b9e
9 changed files with 431 additions and 21 deletions
+6 -4
View File
@@ -5,7 +5,7 @@
'use strict';
const fs = require('fs');
const path = require('path');
const { SITE, esc, head, tail, ZONES, spot } = require('./layout');
const { SITE, esc, head, tail, ZONES, spot, memberLinks, proCta } = require('./layout');
const AUTHOR = 'Marty Bostick';
const PER_PAGE = 9;
const DIR = path.join(__dirname, 'content', 'blog');
@@ -78,7 +78,7 @@ function renderIndex(page, tag) {
function related(p) {
return listPublished().filter(x => x.slug !== p.slug).map(x => ({ x, s: x.tags.filter(t => p.tags.includes(t)).length })).sort((a, b) => b.s - a.s || b.x.publishedAt - a.x.publishedAt).slice(0, 3).map(r => r.x);
}
function renderPost(p) {
function renderPost(p, pc) {
const url = SITE + '/blog/' + p.slug;
const ld = [{ '@context': 'https://schema.org', '@type': 'BlogPosting', headline: p.title, description: p.excerpt, image: p.cover ? (p.cover.startsWith('http') ? p.cover : SITE + p.cover) : SITE + '/og-stackpol-1200x630.jpg',
datePublished: new Date(p.publishedAt).toISOString(), dateModified: new Date(p.updated).toISOString(), wordCount: words(p.body).split(' ').length, keywords: p.tags.join(', '),
@@ -89,9 +89,11 @@ function renderPost(p) {
h += '<div class="bl"><p class="crumb"><a href="/">Stack POL</a> / <a href="/blog">Blog</a>' + (p.tags[0] ? ' / <a href="/blog/tag/' + encodeURIComponent(p.tags[0]) + '">' + esc(p.tags[0]) + '</a>' : '') + '</p>';
h += '<h1>' + esc(p.title) + '</h1><p class="meta">By ' + AUTHOR + ' · ' + fmtDate(p.publishedAt) + (p.updated > p.publishedAt + 864e5 ? ' · updated ' + fmtDate(p.updated) : '') + ' · ' + readMinutes(p.body) + ' min read</p>';
if (p.cover) h += '<img class="cover" src="' + esc(p.cover) + '" alt="' + esc(p.coverAlt) + '" width="1200" height="630">';
h += '<article>' + p.body;
// an ad spot inside the article (Marty 2026-11-09): after the third paragraph of a long post; a Pro member's banner when personalized
let body = p.body; const paras = body.split('</p>'); if (paras.length > 6) body = paras.slice(0, 3).join('</p>') + '</p>' + spot(ZONES.blogBox, ZONES.strip) + paras.slice(3).join('</p>');
h += '<article>' + body;
if (p.faq.length) h += '<h2>Questions people ask</h2>' + p.faq.map(q => '<h3>' + esc(q.q) + '</h3><p>' + esc(q.a) + '</p>').join('');
h += '</article>' + spot(ZONES.blogBox, ZONES.blogBox);
h += '</article>' + (pc && pc.st.pro ? memberLinks(pc.who, pc.st) : '') + spot(ZONES.blogBox, ZONES.blogBox) + (pc && pc.st.pro ? proCta(pc.who) : '');
if (p.tags.length) h += '<p class="tags" style="margin-top:22px">' + p.tags.map(t => '<a href="/blog/tag/' + encodeURIComponent(t) + '">' + esc(t) + '</a>').join('') + '</p>';
h += '<p class="share" style="margin-top:18px"><a href="https://x.com/intent/tweet?url=' + encodeURIComponent(url) + '&text=' + encodeURIComponent(p.title) + '" target="_blank" rel="noopener">Share on X</a><a href="https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(url) + '" target="_blank" rel="noopener">Share on Facebook</a><a href="https://t.me/share/url?url=' + encodeURIComponent(url) + '&text=' + encodeURIComponent(p.title) + '" target="_blank" rel="noopener">Telegram</a></p>';
h += '<div class="author"><span class="av">M</span><div><b>' + AUTHOR + '</b><span>Founder of InstantAdPay, LinkSpin and the Crypto Team Build Network. Twenty-plus years of internet marketing, and a habit of writing down what actually worked.</span></div></div>';