AutomationFlowsGeneral › Automate Site Refresh with Reputation Engine

Automate Site Refresh with Reputation Engine

Original n8n title: Reputation Engine — Site Refresh

Reputation Engine — Site Refresh. Uses httpRequest, executeWorkflowTrigger. Event-driven trigger; 35 nodes.

Event trigger★★★★★ complexity35 nodesHTTP RequestExecute Workflow Trigger
General Trigger: Event Nodes: 35 Complexity: ★★★★★ Added:

This workflow follows the Execute Workflow Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "eYS8hc6xHbSEDpMu",
  "name": "Reputation Engine \u2014 Site Refresh",
  "description": null,
  "active": true,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -3344,
        304
      ],
      "id": "0fb84a62-a1b3-4772-a58d-0a8bd11594ff",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "parameters": {
        "jsCode": "const html = $json.rendered_html || '';\nconst release_id = `rel_${Date.now()}`;\n\nreturn [\n  {\n    json: {\n      site_id: $json.site_id,\n      domain: $json.domain,\n      deployPath: $json.deployPath,\n      verifyUrl: $json.verifyUrl,\n      release_id,\n      files: [\n        {\n          path: 'index.html',\n          content: html,\n        },\n        {\n          path: 'styles.css',\n          content: $json.styles_css || '',\n        },\n      ],\n    },\n  },\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        720,
        336
      ],
      "id": "7958a708-bb8a-4b57-8621-a045aa267167",
      "name": "Build Deploy Payload"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://host.docker.internal:9911/deploy",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_DEPLOY_SERVICE_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json) }}",
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": true,
              "responseFormat": "text"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        896,
        352
      ],
      "id": "c05d553d-c115-4340-9202-18e2e5b19345",
      "name": "Deploy Site"
    },
    {
      "parameters": {
        "url": "={{ $json.verifyUrl }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "text/html"
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": true,
              "responseFormat": "text"
            }
          },
          "allowUnauthorizedCerts": true
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        1120,
        416
      ],
      "id": "a945c1fd-cfe1-46f8-b694-b183cee32706",
      "name": "Verify Homepage"
    },
    {
      "parameters": {
        "jsCode": "return items;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        448,
        304
      ],
      "id": "151547a3-ac7d-43ee-88aa-29f62a387439",
      "name": "Approval Gate"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://host.docker.internal:18789/v1/responses",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_OPENCLAW_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "x-openclaw-agent-id",
              "value": "={{$json.openclawAgentId}}"
            }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "JSON",
        "body": "={{$json.openclaw_request_body}}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        -1424,
        160
      ],
      "id": "1de329fe-3f57-4512-b1df-10f2b89853ee",
      "name": "OpenClaw Generate Content"
    },
    {
      "parameters": {
        "jsCode": "const output = $json.output || [];\nlet text = '';\n\nfor (const block of output) {\n  const content = block.content || [];\n  for (const part of content) {\n    if (part.text) text += part.text + '\\n';\n  }\n}\n\nif (!text.trim()) {\n  throw new Error('No text returned from OpenClaw');\n}\n\ntext = text\n  .replace(/^```yaml\\s*$/gm, '')\n  .replace(/^```\\s*$/gm, '');\n\nconst match = text.match(/^[\\t ]*site:[\\s\\S]*$/m);\n\nif (!match) {\n  throw new Error('No YAML starting with site: found');\n}\n\nreturn [{\n  json: {\n    ...$json,\n    generated_yaml: match[0].trim()\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -880,
        304
      ],
      "id": "8e767aa5-9feb-42ba-aca2-99cb3cd9ec84",
      "name": "Extract + Clean YAML"
    },
    {
      "parameters": {
        "jsCode": "const yaml = $json.generated_yaml;\n\nif (!yaml.includes('site:')) {\n  throw new Error('Missing site root');\n}\n\n\nif (yaml.includes('```')) {\n  throw new Error('Markdown detected');\n}\n\nif (/<[^>]+>/.test(yaml)) {\n  throw new Error('HTML detected');\n}\n\nreturn [{\n  json: {\n    ...$json,\n    generated_yaml: yaml\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -656,
        304
      ],
      "id": "465fe5af-c408-4787-b013-bab7605adefe",
      "name": "Validate YAML (light)"
    },
    {
      "parameters": {
        "jsCode": "const site = $json.site || {};\nconst template = $json.template || '';\nconst release_id = $json.release_id || '';\n\nif (!template) {\n  throw new Error('Missing template');\n}\n\nconst safe = (v) => (v === undefined || v === null ? '' : String(v));\n\nlet html = template;\n\n// simple token replacements\nconst replacements = {\n  '{{ site.title }}': safe(site.title),\n  '{{ site.meta_description }}': safe(site.meta_description),\n  '{{ site.canonical_url }}': safe(site.canonical_url),\n  '{{ site.display_name }}': safe(site.display_name),\n  '{{ site.contact_email }}': safe(site.contact_email),\n\n  '{{ site.hero.eyebrow }}': safe(site.hero?.eyebrow),\n  '{{ site.hero.headline }}': safe(site.hero?.headline),\n  '{{ site.hero.lead }}': safe(site.hero?.lead),\n  '{{ site.hero.primary_cta_href }}': safe(site.hero?.primary_cta_href),\n  '{{ site.hero.primary_cta_text }}': safe(site.hero?.primary_cta_text),\n  '{{ site.hero.secondary_cta_href }}': safe(site.hero?.secondary_cta_href),\n  '{{ site.hero.secondary_cta_text }}': safe(site.hero?.secondary_cta_text),\n  '{{ site.hero.headshot_src }}': safe(site.hero?.headshot_src),\n  '{{ site.hero.headshot_alt }}': safe(site.hero?.headshot_alt),\n\n  '{{ site.about.eyebrow }}': safe(site.about?.eyebrow),\n  '{{ site.about.heading }}': safe(site.about?.heading),\n  '{{ site.about.paragraphs[0] }}': safe(site.about?.paragraphs?.[0]),\n  '{{ site.about.paragraphs[1] }}': safe(site.about?.paragraphs?.[1]),\n\n  '{{ site.focus.eyebrow }}': safe(site.focus?.eyebrow),\n  '{{ site.focus.heading }}': safe(site.focus?.heading),\n  '{{ site.focus.cards[0].title }}': safe(site.focus?.cards?.[0]?.title),\n  '{{ site.focus.cards[0].body }}': safe(site.focus?.cards?.[0]?.body),\n  '{{ site.focus.cards[1].title }}': safe(site.focus?.cards?.[1]?.title),\n  '{{ site.focus.cards[1].body }}': safe(site.focus?.cards?.[1]?.body),\n  '{{ site.focus.cards[2].title }}': safe(site.focus?.cards?.[2]?.title),\n  '{{ site.focus.cards[2].body }}': safe(site.focus?.cards?.[2]?.body),\n\n  '{{ site.background.eyebrow }}': safe(site.background?.eyebrow),\n  '{{ site.background.heading }}': safe(site.background?.heading),\n  '{{ site.background.paragraphs[0] }}': safe(site.background?.paragraphs?.[0]),\n  '{{ site.background.paragraphs[1] }}': safe(site.background?.paragraphs?.[1]),\n\n  '{{ site.writing.eyebrow }}': safe(site.writing?.eyebrow),\n  '{{ site.writing.heading }}': safe(site.writing?.heading),\n  '{{ site.writing.cards[0].title }}': safe(site.writing?.cards?.[0]?.title),\n  '{{ site.writing.cards[0].body }}': safe(site.writing?.cards?.[0]?.body),\n  '{{ site.writing.cards[1].title }}': safe(site.writing?.cards?.[1]?.title),\n  '{{ site.writing.cards[1].body }}': safe(site.writing?.cards?.[1]?.body),\n  '{{ site.writing.cards[2].title }}': safe(site.writing?.cards?.[2]?.title),\n  '{{ site.writing.cards[2].body }}': safe(site.writing?.cards?.[2]?.body),\n\n  '{{ site.network.eyebrow }}': safe(site.network?.eyebrow),\n  '{{ site.network.heading }}': safe(site.network?.heading),\n  '{{ site.network.body }}': safe(site.network?.body),\n\n  '{{ site.footer.heading }}': safe(site.footer?.heading),\n  '{{ site.footer.body }}': safe(site.footer?.body),\n};\n\nfor (const [token, value] of Object.entries(replacements)) {\n  html = html.split(token).join(value);\n}\n\n// inject release marker\nif (html.includes('</head>')) {\n  html = html.replace(\n    '</head>',\n    `  <meta name=\"x-release-id\" content=\"${safe(release_id)}\">\\n</head>`\n  );\n}\n\nif (html.includes('</body>')) {\n  html = html.replace(\n    '</body>',\n    `<!-- release: ${safe(release_id)} -->\\n</body>`\n  );\n}\n\nreturn [\n  {\n    json: {\n      ...$json,\n      rendered_html: html\n    }\n  }\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        0,
        304
      ],
      "id": "12c0c522-86a3-4a0e-8234-cabe91cf6013",
      "name": "Render"
    },
    {
      "parameters": {
        "jsCode": "const html = $json.rendered_html || '';\n\nif (!html) {\n  throw new Error('QA FAIL: rendered_html missing');\n}\n\nif (/undefined/i.test(html)) {\n  throw new Error('QA FAIL: \"undefined\" detected \u2192 missing field in render');\n}\n\nif (!/<link rel=\"canonical\" href=\"https:\\/\\/[^\"]+/.test(html)) {\n  throw new Error('QA FAIL: canonical tag missing');\n}\n\nif (/<meta[^>]+name=[\"']robots[\"'][^>]+content=[\"'][^\"']*noindex/i.test(html)) {\n  throw new Error('QA FAIL: noindex detected in rendered HTML');\n}\n\nif (!/<a [^>]*href=[\"']https:\\/\\/sinabarimd\\.com[^\"']*[\"']/i.test(html)) {\n  throw new Error('QA FAIL: no outbound link to sinabarimd.com \u2014 internal link rule violated');\n}\n\nif (!/<script type=[\"']application\\/ld\\+json[\"']/i.test(html)) {\n  throw new Error('QA FAIL: Person schema (JSON-LD) missing');\n}\n\nreturn $input.all();\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        224,
        304
      ],
      "id": "570fce38-a54e-408a-9b45-88cd0e10dc9b",
      "name": "QA"
    },
    {
      "parameters": {
        "jsCode": "const yaml = ($json.generated_yaml || '').replace(/\\r/g, '');\n\nfunction fail(msg) {\n  throw new Error(`YAML parse failed: ${msg}`);\n}\n\nif (!yaml || typeof yaml !== 'string') {\n  fail('generated_yaml missing');\n}\n\nconst lines = yaml.split('\\n');\n\nfunction unquote(s) {\n  const t = String(s).trim();\n  if ((t.startsWith('\"') && t.endsWith('\"')) || (t.startsWith(\"'\") && t.endsWith(\"'\"))) {\n    return t.slice(1, -1);\n  }\n  return t;\n}\n\nfunction topField(name) {\n  const prefix = `  ${name}:`;\n  const line = lines.find(l => l.startsWith(prefix));\n  if (!line) fail(`missing top field: ${name}`);\n  return unquote(line.slice(prefix.length).trim());\n}\n\nfunction sectionLines(name) {\n  const start = lines.findIndex(l => l === `  ${name}:`);\n  if (start === -1) fail(`missing section: ${name}`);\n  let end = lines.length;\n  for (let i = start + 1; i < lines.length; i++) {\n    if (/^  [A-Za-z_][A-Za-z0-9_]*:\\s*$/.test(lines[i])) {\n      end = i;\n      break;\n    }\n  }\n  return lines.slice(start + 1, end);\n}\n\nfunction sectionField(sectionName, fieldName) {\n  const prefix = `    ${fieldName}:`;\n  const line = sectionLines(sectionName).find(l => l.startsWith(prefix));\n  if (!line) fail(`missing ${sectionName}.${fieldName}`);\n  return unquote(line.slice(prefix.length).trim());\n}\n\nfunction paragraphs(sectionName) {\n  const sec = sectionLines(sectionName);\n  const start = sec.findIndex(l => l.trim() === 'paragraphs:');\n  if (start === -1) fail(`missing ${sectionName}.paragraphs`);\n  const out = [];\n  for (let i = start + 1; i < sec.length; i++) {\n    const line = sec[i];\n    if (/^\\s{6}-\\s+/.test(line)) {\n      out.push(unquote(line.replace(/^\\s{6}-\\s+/, '')));\n    } else if (/^\\s{4}[A-Za-z_]/.test(line)) {\n      break;\n    }\n  }\n  if (out.length < 2) fail(`${sectionName} needs at least 2 paragraphs`);\n  return out;\n}\n\nfunction cards(sectionName) {\n  const sec = sectionLines(sectionName);\n  const start = sec.findIndex(l => l.trim() === 'cards:');\n  if (start === -1) fail(`missing ${sectionName}.cards`);\n  const out = [];\n  let current = null;\n\n  for (let i = start + 1; i < sec.length; i++) {\n    const line = sec[i];\n\n    if (/^\\s{6}-\\s+title:\\s+/.test(line)) {\n      if (current) out.push(current);\n      current = {\n        title: unquote(line.replace(/^\\s{6}-\\s+title:\\s+/, '')),\n        body: ''\n      };\n    } else if (/^\\s{8}body:\\s+/.test(line)) {\n      if (!current) fail(`${sectionName} body before title`);\n      current.body = unquote(line.replace(/^\\s{8}body:\\s+/, ''));\n    } else if (/^\\s{4}[A-Za-z_]/.test(line)) {\n      break;\n    }\n  }\n\n  if (current) out.push(current);\n  if (out.length < 3) fail(`${sectionName} needs at least 3 cards`);\n  return out;\n}\n\nconst site = {\n  slug: topField('slug'),\n  canonical_url: topField('canonical_url'),\n  display_name: topField('display_name'),\n  title: topField('title'),\n  meta_description: topField('meta_description'),\n  contact_email: topField('contact_email'),\n  hero: {\n    eyebrow: sectionField('hero', 'eyebrow'),\n    headline: sectionField('hero', 'headline'),\n    lead: sectionField('hero', 'lead'),\n    primary_cta_text: sectionField('hero', 'primary_cta_text'),\n    primary_cta_href: sectionField('hero', 'primary_cta_href'),\n    secondary_cta_text: sectionField('hero', 'secondary_cta_text'),\n    secondary_cta_href: sectionField('hero', 'secondary_cta_href'),\n    headshot_src: sectionField('hero', 'headshot_src'),\n    headshot_alt: sectionField('hero', 'headshot_alt'),\n  },\n  about: {\n    eyebrow: sectionField('about', 'eyebrow'),\n    heading: sectionField('about', 'heading'),\n    paragraphs: paragraphs('about'),\n  },\n  focus: {\n    eyebrow: sectionField('focus', 'eyebrow'),\n    heading: sectionField('focus', 'heading'),\n    cards: cards('focus'),\n  },\n  background: {\n    eyebrow: sectionField('background', 'eyebrow'),\n    heading: sectionField('background', 'heading'),\n    paragraphs: paragraphs('background'),\n  },\n  writing: {\n    eyebrow: sectionField('writing', 'eyebrow'),\n    heading: sectionField('writing', 'heading'),\n    cards: cards('writing'),\n  },\n  network: {\n    eyebrow: sectionField('network', 'eyebrow'),\n    heading: sectionField('network', 'heading'),\n    body: sectionField('network', 'body'),\n  },\n  footer: {\n    heading: sectionField('footer', 'heading'),\n    body: sectionField('footer', 'body'),\n  }\n};\n\n// enforce config-controlled fields if present upstream\nsite.slug = $json.slug || site.slug;\nsite.canonical_url = $json.canonical_url || site.canonical_url;\nsite.display_name = $json.display_name || site.display_name;\nsite.contact_email = $json.contact_email || site.contact_email;\n\n// \ud83d\udd12 CRITICAL: lock headshot\nsite.hero = site.hero || {};\nsite.hero.headshot_src = $json.headshot_src || site.hero.headshot_src;\nsite.hero.headshot_alt = $json.headshot_alt || site.hero.headshot_alt;\nreturn [{\n  json: {\n    ...$json,\n    site,\n    generated_yaml: yaml\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -448,
        304
      ],
      "id": "5d8ba5d4-80b8-447f-b8f4-1077724f26c3",
      "name": "Parse YAML to Site Object"
    },
    {
      "parameters": {
        "jsCode": "const site_id = $json.site_id || 'sinabarimd';\n\nconst templates = {\n  sinabarimd: { html: `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>{{ site.title }}</title>\n  <meta name=\"description\" content=\"{{ site.meta_description }}\" />\n  <link rel=\"canonical\" href=\"{{ site.canonical_url }}\" />\n  <link rel=\"stylesheet\" href=\"styles.css\" />\n</head>\n<body>\n\n  <header class=\"site-header\">\n    <div class=\"wrap nav-wrap\">\n      <a class=\"wordmark\" href=\"/\">{{ site.display_name }}</a>\n      <nav>\n        <a href=\"#work\">Work</a>\n        <a href=\"#background\">Background</a>\n        <a href=\"#writing\">Writing</a>\n        <a href=\"#contact\">Contact</a>\n      </nav>\n    </div>\n  </header>\n\n  <main>\n\n    <!-- HERO: name + positioning -->\n    <section class=\"hero\">\n      <div class=\"wrap hero-wrap\">\n        <div class=\"hero-text\">\n          <p class=\"label\">{{ site.hero.eyebrow }}</p>\n          <h1>{{ site.hero.headline }}</h1>\n          <p class=\"lead\">{{ site.hero.lead }}</p>\n          <div class=\"hero-actions\">\n            <a class=\"btn-primary\" href=\"{{ site.hero.primary_cta_href }}\">{{ site.hero.primary_cta_text }}</a>\n            <a class=\"btn-ghost\" href=\"{{ site.hero.secondary_cta_href }}\">{{ site.hero.secondary_cta_text }}</a>\n          </div>\n        </div>\n        <figure class=\"hero-portrait\">\n          <img src=\"{{ site.hero.headshot_src }}\" alt=\"{{ site.hero.headshot_alt }}\" />\n        </figure>\n      </div>\n    </section>\n\n    <!-- ABOUT -->\n    <section id=\"about\" class=\"section\">\n      <div class=\"wrap\">\n        <p class=\"label\">{{ site.about.eyebrow }}</p>\n        <h2>{{ site.about.heading }}</h2>\n        <div class=\"prose-cols\">\n          <p>{{ site.about.paragraphs[0] }}</p>\n          <p>{{ site.about.paragraphs[1] }}</p>\n        </div>\n      </div>\n    </section>\n\n    <!-- CURRENT WORK -->\n    <section id=\"work\" class=\"section section-tinted\">\n      <div class=\"wrap\">\n        <p class=\"label\">{{ site.focus.eyebrow }}</p>\n        <h2>{{ site.focus.heading }}</h2>\n        <div class=\"feature-grid\">\n          <div class=\"feature-card\">\n            <h3>{{ site.focus.cards[0].title }}</h3>\n            <p>{{ site.focus.cards[0].body }}</p>\n          </div>\n          <div class=\"feature-card\">\n            <h3>{{ site.focus.cards[1].title }}</h3>\n            <p>{{ site.focus.cards[1].body }}</p>\n          </div>\n          <div class=\"feature-card\">\n            <h3>{{ site.focus.cards[2].title }}</h3>\n            <p>{{ site.focus.cards[2].body }}</p>\n          </div>\n        </div>\n      </div>\n    </section>\n\n    <!-- BACKGROUND -->\n    <section id=\"background\" class=\"section\">\n      <div class=\"wrap\">\n        <p class=\"label\">{{ site.background.eyebrow }}</p>\n        <h2>{{ site.background.heading }}</h2>\n        <div class=\"prose-cols\">\n          <p>{{ site.background.paragraphs[0] }}</p>\n          <p>{{ site.background.paragraphs[1] }}</p>\n        </div>\n      </div>\n    </section>\n\n    <!-- WRITING & MEDIA -->\n    <section id=\"writing\" class=\"section section-tinted\">\n      <div class=\"wrap\">\n        <p class=\"label\">{{ site.writing.eyebrow }}</p>\n        <h2>{{ site.writing.heading }}</h2>\n        <div class=\"writing-list\">\n          <div class=\"writing-item\">\n            <h3>{{ site.writing.cards[0].title }}</h3>\n            <p>{{ site.writing.cards[0].body }}</p>\n          </div>\n          <div class=\"writing-item\">\n            <h3>{{ site.writing.cards[1].title }}</h3>\n            <p>{{ site.writing.cards[1].body }}</p>\n          </div>\n          <div class=\"writing-item\">\n            <h3>{{ site.writing.cards[2].title }}</h3>\n            <p>{{ site.writing.cards[2].body }}</p>\n          </div>\n        </div>\n      </div>\n    </section>\n\n    <!-- NETWORK CALLOUT -->\n    <section class=\"section\">\n      <div class=\"wrap\">\n        <div class=\"callout-block\">\n          <p class=\"label\">{{ site.network.eyebrow }}</p>\n          <h2>{{ site.network.heading }}</h2>\n          <p>{{ site.network.body }}</p>\n        </div>\n      </div>\n    </section>\n\n  </main>\n\n  <footer id=\"contact\" class=\"site-footer\">\n    <div class=\"wrap footer-wrap\">\n      <div>\n        <p class=\"wordmark\">{{ site.display_name }}</p>\n        <p class=\"footer-sub\">{{ site.footer.body }}</p>\n      </div>\n      <div class=\"footer-links\">\n        <a href=\"mailto:{{ site.contact_email }}\">{{ site.contact_email }}</a>\n        <a href=\"{{ site.canonical_url }}\">{{ site.canonical_url }}</a>\n      </div>\n    </div>\n  </footer>\n\n</body>\n</html>`, css: `*{box-sizing:border-box;margin:0;padding:0}\n:root{\n  --ink:#111318;--muted:#525866;--accent:#0f3f6e;--border:#dde0da;\n  --bg:#fafaf8;--card:#ffffff;--max:1100px;\n  --shadow:0 8px 32px rgba(15,30,60,.07);--r:18px;\n}\nhtml{scroll-behavior:smooth}\nbody{font-family:Inter,ui-sans-serif,system-ui,sans-serif;background:var(--bg);color:var(--ink);line-height:1.65}\na{color:var(--accent);text-decoration:none}\na:hover{text-decoration:underline}\n.wrap{width:min(calc(100% - 2.5rem),var(--max));margin:0 auto}\n\n/* NAV */\n.site-header{position:sticky;top:0;z-index:10;background:rgba(250,250,248,.9);\n  backdrop-filter:blur(12px);border-bottom:1px solid var(--border)}\n.nav-wrap{display:flex;align-items:center;justify-content:space-between;min-height:68px;gap:1rem}\n.wordmark{font-weight:700;font-size:1.05rem;color:var(--ink);letter-spacing:-.02em}\nnav{display:flex;gap:1.5rem}\nnav a{color:var(--muted);font-size:.9rem;font-weight:500}\n\n/* HERO */\n.hero{padding:7rem 0 5rem}\n.hero-wrap{display:grid;grid-template-columns:1.4fr .6fr;gap:2.5rem;align-items:center}\n.label{font-size:.72rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;\n  color:var(--accent);margin-bottom:.9rem}\nh1{font-size:clamp(2.8rem,5.5vw,4.8rem);letter-spacing:-.04em;line-height:1.05;\n  margin-bottom:1.1rem;font-weight:800}\nh2{font-size:clamp(1.7rem,2.8vw,2.5rem);letter-spacing:-.03em;line-height:1.1;margin-bottom:.8rem}\nh3{font-size:1.05rem;letter-spacing:-.01em;margin-bottom:.45rem;font-weight:700}\n.lead{font-size:1.12rem;color:var(--muted);max-width:40rem;line-height:1.7}\n.hero-actions{display:flex;gap:1rem;flex-wrap:wrap;margin-top:2.2rem}\n.btn-primary,.btn-ghost{\n  display:inline-flex;align-items:center;min-height:46px;padding:.7rem 1.4rem;\n  border-radius:999px;font-weight:600;font-size:.95rem;transition:opacity .15s}\n.btn-primary{background:var(--accent);color:#fff;box-shadow:var(--shadow)}\n.btn-ghost{background:var(--card);color:var(--ink);border:1px solid var(--border);box-shadow:var(--shadow)}\n.btn-primary:hover,.btn-ghost:hover{opacity:.85;text-decoration:none}\n.hero-portrait img{width:100%;max-height:420px;object-fit:cover;object-position:top;border-radius:var(--r);box-shadow:var(--shadow);display:block}\n\n/* SECTIONS */\n.section{padding:5rem 0}\n.section-tinted{background:rgba(235,236,230,.5);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}\n.prose-cols{display:grid;grid-template-columns:1fr 1fr;gap:2rem;margin-top:1.5rem}\n.prose-cols p{color:var(--muted);line-height:1.75}\n\n/* FEATURE GRID */\n.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;margin-top:1.75rem}\n.feature-card{background:var(--card);border:1px solid var(--border);border-radius:var(--r);\n  padding:1.6rem;box-shadow:var(--shadow)}\n.feature-card p{color:var(--muted);margin-top:.4rem;font-size:.95rem;line-height:1.7}\n\n/* WRITING LIST */\n.writing-list{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;margin-top:1.75rem}\n.writing-item{padding:1.4rem;border-left:3px solid var(--accent)}\n.writing-item p{color:var(--muted);margin-top:.4rem;font-size:.93rem}\n\n/* CALLOUT */\n.callout-block{background:var(--accent);color:#fff;border-radius:var(--r);padding:2.5rem;\n  box-shadow:var(--shadow)}\n.callout-block .label{color:rgba(255,255,255,.7)}\n.callout-block h2{color:#fff;margin-bottom:.75rem}\n.callout-block p{color:rgba(255,255,255,.85);max-width:56rem}\n\n/* FOOTER */\n.site-footer{background:#111318;padding:3rem 0}\n.footer-wrap{display:flex;justify-content:space-between;align-items:flex-start;gap:2rem;flex-wrap:wrap}\n.footer-wrap .wordmark{color:#fff;margin-bottom:.5rem;font-size:1rem}\n.footer-sub{color:rgba(255,255,255,.5);font-size:.88rem;max-width:32rem}\n.footer-links{display:flex;flex-direction:column;gap:.5rem}\n.footer-links a{color:#8baec8;font-size:.9rem}\n\n@media(max-width:860px){\n  .hero-wrap,.prose-cols,.feature-grid,.writing-list{grid-template-columns:1fr}\n  .hero{padding:4rem 0 3rem}\n}` },\n  sinabari_net: { html: `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>{{ site.title }}</title>\n  <meta name=\"description\" content=\"{{ site.meta_description }}\" />\n  <link rel=\"canonical\" href=\"{{ site.canonical_url }}\" />\n  <link rel=\"stylesheet\" href=\"styles.css\" />\n</head>\n<body>\n\n  <!-- MASTHEAD -->\n  <header class=\"masthead\">\n    <div class=\"wrap\">\n      <div class=\"pub-name\">{{ site.display_name }}</div>\n      <div class=\"pub-tagline\">{{ site.hero.eyebrow }}</div>\n    </div>\n    <div class=\"masthead-rule\"></div>\n  </header>\n\n  <nav class=\"topic-nav\">\n    <div class=\"wrap topic-nav-inner\">\n      <a href=\"#featured\">Featured</a>\n      <a href=\"#topics\">Topics</a>\n      <a href=\"#perspective\">Perspective</a>\n      <a href=\"#about\">About</a>\n    </div>\n  </nav>\n\n  <main>\n\n    <!-- FEATURED PIECE -->\n    <section id=\"featured\" class=\"featured-section\">\n      <div class=\"wrap\">\n        <div class=\"featured-inner\">\n          <div class=\"featured-meta\">\n            <span class=\"category-tag\">{{ site.focus.eyebrow }}</span>\n          </div>\n          <h1 class=\"featured-headline\">{{ site.hero.headline }}</h1>\n          <p class=\"featured-deck\">{{ site.hero.lead }}</p>\n          <div class=\"byline-row\">\n            <span class=\"byline-name\">By <a href=\"https://sinabarimd.com/about\" rel=\"author\">Sina Bari, MD</a></span>\n            <span class=\"byline-sep\">\u00b7</span>\n            <span class=\"byline-role\">VP, Healthcare &amp; Life Sciences AI</span>\n          </div>\n          <div class=\"featured-body\">\n            <p>{{ site.about.paragraphs[0] }}</p>\n            <p>{{ site.about.paragraphs[1] }}</p>\n          </div>\n          <a class=\"read-more\" href=\"{{ site.hero.primary_cta_href }}\">{{ site.hero.primary_cta_text }} \u2192</a>\n        </div>\n      </div>\n    </section>\n\n    <div class=\"section-divider\"><div class=\"wrap\"><hr /></div></div>\n\n    <!-- TOPIC PILLARS -->\n    <section id=\"topics\" class=\"section\">\n      <div class=\"wrap\">\n        <h2 class=\"section-label\">{{ site.focus.heading }}</h2>\n        <div class=\"pillar-grid\">\n          <div class=\"pillar\">\n            <h3>{{ site.focus.cards[0].title }}</h3>\n            <p>{{ site.focus.cards[0].body }}</p>\n          </div>\n          <div class=\"pillar\">\n            <h3>{{ site.focus.cards[1].title }}</h3>\n            <p>{{ site.focus.cards[1].body }}</p>\n          </div>\n          <div class=\"pillar\">\n            <h3>{{ site.focus.cards[2].title }}</h3>\n            <p>{{ site.focus.cards[2].body }}</p>\n          </div>\n        </div>\n      </div>\n    </section>\n\n    <!-- PERSPECTIVE / BACKGROUND -->\n    <section id=\"perspective\" class=\"section section-ruled\">\n      <div class=\"wrap two-col-editorial\">\n        <div class=\"editorial-main\">\n          <p class=\"kicker\">{{ site.background.eyebrow }}</p>\n          <h2>{{ site.background.heading }}</h2>\n          <p>{{ site.background.paragraphs[0] }}</p>\n          <p>{{ site.background.paragraphs[1] }}</p>\n        </div>\n        <aside class=\"editorial-sidebar\">\n          <p class=\"sidebar-label\">{{ site.writing.eyebrow }}</p>\n          <ul class=\"sidebar-list\">\n            <li><span>{{ site.writing.cards[0].title }}</span><p>{{ site.writing.cards[0].body }}</p></li>\n            <li><span>{{ site.writing.cards[1].title }}</span><p>{{ site.writing.cards[1].body }}</p></li>\n            <li><span>{{ site.writing.cards[2].title }}</span><p>{{ site.writing.cards[2].body }}</p></li>\n          </ul>\n        </aside>\n      </div>\n    </section>\n\n    <!-- ABOUT THE AUTHOR -->\n    <section id=\"about\" class=\"section\">\n      <div class=\"wrap\">\n        <div class=\"author-panel\">\n          <p class=\"kicker\">About the Author</p>\n          <h2>{{ site.network.heading }}</h2>\n          <p>{{ site.network.body }}</p>\n          <a class=\"profile-link\" href=\"https://sinabarimd.com\">Full profile at sinabarimd.com \u2192</a>\n        </div>\n      </div>\n    </section>\n\n  </main>\n\n  <footer class=\"site-footer\">\n    <div class=\"wrap footer-inner\">\n      <div>\n        <p class=\"pub-name-sm\">{{ site.display_name }}</p>\n        <p class=\"footer-note\">{{ site.footer.body }}</p>\n      </div>\n      <div class=\"footer-right\">\n        <a href=\"mailto:{{ site.contact_email }}\">{{ site.contact_email }}</a>\n        <a href=\"{{ site.canonical_url }}\">{{ site.canonical_url }}</a>\n      </div>\n    </div>\n  </footer>\n\n</body>\n</html>`, css: `*{box-sizing:border-box;margin:0;padding:0}\n:root{\n  --ink:#1a1c22;--muted:#52576a;--accent:#1a4a7a;--border:#cdd0cc;\n  --bg:#f8f8f5;--card:#ffffff;--max:1080px;\n  --serif:'Georgia',serif;--sans:Inter,ui-sans-serif,system-ui,sans-serif;\n}\nhtml{scroll-behavior:smooth}\nbody{font-family:var(--sans);background:var(--bg);color:var(--ink);line-height:1.7}\na{color:var(--accent);text-decoration:none}\na:hover{text-decoration:underline}\n.wrap{width:min(calc(100% - 2.5rem),var(--max));margin:0 auto}\n\n/* MASTHEAD */\n.masthead{padding:2rem 0 1.2rem;text-align:center;background:var(--bg)}\n.pub-name{font-family:var(--serif);font-size:clamp(1.8rem,4vw,3rem);\n  font-weight:400;letter-spacing:-.02em;color:var(--ink)}\n.pub-tagline{font-size:.78rem;letter-spacing:.18em;text-transform:uppercase;\n  color:var(--muted);margin-top:.4rem}\n.masthead-rule{border-top:3px solid var(--ink);border-bottom:1px solid var(--ink);\n  height:5px;margin-top:1.2rem}\n\n/* TOPIC NAV */\n.topic-nav{background:var(--bg);border-bottom:1px solid var(--border);\n  position:sticky;top:0;z-index:10}\n.topic-nav-inner{display:flex;gap:2rem;min-height:44px;align-items:center}\n.topic-nav a{font-size:.85rem;font-weight:600;color:var(--muted);\n  letter-spacing:.04em;text-transform:uppercase}\n.topic-nav a:hover{color:var(--ink)}\n\n/* FEATURED */\n.featured-section{padding:3.5rem 0 2.5rem;background:#fff;\n  border-bottom:1px solid var(--border)}\n.featured-inner{max-width:740px}\n.category-tag{display:inline-block;font-size:.72rem;font-weight:700;\n  letter-spacing:.14em;text-transform:uppercase;color:var(--accent);\n  border:1px solid var(--accent);padding:.2rem .55rem;border-radius:3px;margin-bottom:1rem}\n.featured-headline{font-family:var(--serif);font-size:clamp(2rem,4vw,3.2rem);\n  font-weight:400;line-height:1.2;letter-spacing:-.02em;margin-bottom:.8rem}\n.featured-deck{font-size:1.15rem;color:var(--muted);line-height:1.65;margin-bottom:1.2rem}\n.byline-row{display:flex;align-items:center;gap:.6rem;font-size:.88rem;\n  color:var(--muted);margin-bottom:1.5rem;padding-bottom:1.2rem;border-bottom:1px solid var(--border)}\n.byline-name a{color:var(--ink);font-weight:600}\n.byline-sep{color:var(--border)}\n.featured-body p{color:var(--muted);line-height:1.8;margin-bottom:1rem;max-width:680px}\n.read-more{display:inline-block;margin-top:1rem;font-weight:700;font-size:.9rem;\n  color:var(--accent);letter-spacing:.02em}\n\n/* DIVIDER */\n.section-divider hr{border:none;border-top:1px solid var(--border);margin:0}\n\n/* SECTIONS */\n.section{padding:3.5rem 0}\n.section-ruled{background:rgba(230,232,228,.4);border-top:1px solid var(--border);\n  border-bottom:1px solid var(--border)}\n.section-label{font-size:.75rem;font-weight:700;letter-spacing:.16em;\n  text-transform:uppercase;color:var(--muted);margin-bottom:1.5rem}\n.kicker{font-size:.72rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;\n  color:var(--accent);margin-bottom:.7rem}\n\n/* PILLARS */\n.pillar-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0;\n  border:1px solid var(--border);border-radius:8px;overflow:hidden}\n.pillar{padding:1.6rem;border-right:1px solid var(--border);background:#fff}\n.pillar:last-child{border-right:none}\n.pillar h3{font-family:var(--serif);font-size:1.15rem;font-weight:400;\n  letter-spacing:-.01em;margin-bottom:.5rem;color:var(--ink)}\n.pillar p{color:var(--muted);font-size:.9rem;line-height:1.65}\n\n/* EDITORIAL TWO COL */\n.two-col-editorial{display:grid;grid-template-columns:1.6fr 1fr;gap:3rem;align-items:start}\n.editorial-main h2{font-family:var(--serif);font-size:clamp(1.5rem,2.5vw,2rem);\n  font-weight:400;margin-bottom:1rem}\n.editorial-main p{color:var(--muted);line-height:1.8;margin-bottom:1rem}\n.editorial-sidebar{border-left:2px solid var(--border);padding-left:2rem}\n.sidebar-label{font-size:.72rem;font-weight:700;letter-spacing:.14em;\n  text-transform:uppercase;color:var(--muted);margin-bottom:1rem}\n.sidebar-list{list-style:none}\n.sidebar-list li{padding:.9rem 0;border-bottom:1px solid var(--border)}\n.sidebar-list li:last-child{border-bottom:none}\n.sidebar-list span{font-weight:600;font-size:.93rem;color:var(--ink)}\n.sidebar-list p{color:var(--muted);font-size:.86rem;margin-top:.3rem;line-height:1.5}\n\n/* AUTHOR PANEL */\n.author-panel{background:#fff;border:1px solid var(--border);border-radius:8px;\n  padding:2rem;max-width:680px}\n.author-panel h2{font-family:var(--serif);font-size:1.6rem;font-weight:400;margin-bottom:.8rem}\n.author-panel p{color:var(--muted);line-height:1.75;margin-bottom:1rem}\n.profile-link{font-weight:700;font-size:.9rem;color:var(--accent)}\n\n/* FOOTER */\n.site-footer{background:#1a1c22;padding:2.5rem 0}\n.footer-inner{display:flex;justify-content:space-between;gap:2rem;flex-wrap:wrap;align-items:flex-start}\n.pub-name-sm{color:#fff;font-family:var(--serif);font-size:1.1rem;margin-bottom:.4rem}\n.footer-note{color:rgba(255,255,255,.5);font-size:.85rem;max-width:36rem}\n.footer-right{display:flex;flex-direction:column;gap:.4rem}\n.footer-right a{color:#7da8cc;font-size:.88rem}\n\n@media(max-width:820px){\n  .pillar-grid,.two-col-editorial{grid-template-columns:1fr}\n  .pillar{border-right:none;border-bottom:1px solid var(--border)}\n  .editorial-sidebar{border-left:none;padding-left:0;border-top:2px solid var(--border);padding-top:1.5rem}\n}` },\n  sinabariplasticsurgery: { html: `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>{{ site.title }}</title>\n  <meta name=\"description\" content=\"{{ site.meta_description }}\" />\n  <link rel=\"canonical\" href=\"{{ site.canonical_url }}\" />\n  <link rel=\"stylesheet\" href=\"styles.css\" />\n</head>\n<body>\n\n  <header class=\"site-header\">\n    <div class=\"wrap header-inner\">\n      <div class=\"brand-block\">\n        <div class=\"brand-name\">Honest Aesthetics</div>\n        <div class=\"brand-sub\">A surgeon's unfiltered take on beauty, trends, and what actually works</div>\n      </div>\n    </div>\n    <div class=\"header-stripe\"></div>\n  </header>\n\n  <nav class=\"section-nav\">\n    <div class=\"wrap section-nav-inner\">\n      <a href=\"#featured\">Featured</a>\n      <a href=\"#topics\">Topics</a>\n      <a href=\"#reality-check\">Reality Check</a>\n      <a href=\"#about\">About</a>\n    </div>\n  </nav>\n\n  <main>\n\n    <!-- SURGEON'S OPENER -->\n    <section class=\"opener-section\">\n      <div class=\"wrap\">\n        <div class=\"opener-inner\">\n          <p class=\"opener-kicker\">{{ site.hero.eyebrow }}</p>\n          <p class=\"opener-quote\">\"{{ site.hero.lead }}\"</p>\n          <p class=\"opener-attr\">\u2014 Dr. Sina Bari, MD, Stanford-trained plastic surgeon</p>\n        </div>\n      </div>\n    </section>\n\n    <!-- FEATURED PIECE -->\n    <section id=\"featured\" class=\"section\">\n      <div class=\"wrap\">\n        <div class=\"featured-layout\">\n          <div class=\"featured-content\">\n            <p class=\"topic-pill\">{{ site.about.eyebrow }}</p>\n            <h1>{{ site.hero.headline }}</h1>\n            <p class=\"featured-intro\">{{ site.about.paragraphs[0] }}</p>\n            <p class=\"featured-body\">{{ site.about.paragraphs[1] }}</p>\n            <a class=\"cta-link\" href=\"{{ site.hero.primary_cta_href }}\">{{ site.hero.primary_cta_text }} \u2192</a>\n          </div>\n          <aside class=\"featured-aside\">\n            <div class=\"aside-card\">\n              <p class=\"aside-label\">What this site is about</p>\n              <p>{{ site.network.body }}</p>\n              <hr class=\"aside-rule\" />\n              <p class=\"aside-label\">Written by</p>\n              <p><strong>Dr. Sina Bari, MD</strong><br/>\n              Board-eligible plastic &amp; reconstructive surgeon.<br/>\n              <a href=\"https://sinabarimd.com/about\">Full profile \u2192</a></p>\n            </div>\n          </aside>\n        </div>\n      </div>\n    </section>\n\n    <!-- TOPIC INDEX -->\n    <section id=\"topics\" class=\"section section-warm\">\n      <div class=\"wrap\">\n        <h2 class=\"section-heading\">{{ site.focus.heading }}</h2>\n        <p class=\"section-sub\">{{ site.focus.eyebrow }}</p>\n        <div class=\"topic-grid\">\n          <div class=\"topic-card\">\n            <div class=\"topic-icon\">01</div>\n            <h3>{{ site.focus.cards[0].title }}</h3>\n            <p>{{ site.focus.cards[0].body }}</p>\n          </div>\n          <div class=\"topic-card\">\n            <div class=\"topic-icon\">02</div>\n            <h3>{{ site.focus.cards[1].title }}</h3>\n            <p>{{ site.focus.cards[1].body }}</p>\n          </div>\n          <div class=\"topic-card\">\n            <div class=\"topic-icon\">03</div>\n            <h3>{{ site.focus.cards[2].title }}</h3>\n            <p>{{ site.focus.cards[2].body }}</p>\n          </div>\n        </div>\n      </div>\n    </section>\n\n    <!-- REALITY CHECK -->\n    <section id=\"reality-check\" class=\"section\">\n      <div class=\"wrap\">\n        <h2 class=\"section-heading\">{{ site.background.heading }}</h2>\n        <p class=\"section-sub\">{{ site.background.eyebrow }}</p>\n        <div class=\"reality-grid\">\n          <div class=\"reality-col\">\n            <p>{{ site.background.paragraphs[0] }}</p>\n          </div>\n          <div class=\"reality-col\">\n            <p>{{ site.background.paragraphs[1] }}</p>\n          </div>\n        </div>\n      </div>\n    </section>\n\n    <!-- RECENT ENTRIES -->\n    <section class=\"section section-warm\">\n      <div class=\"wrap\">\n        <h2 class=\"section-heading\">{{ site.writing.heading }}</h2>\n        <p class=\"section-sub\">{{ site.writing.eyebrow }}</p>\n        <div class=\"entry-list\">\n          <div class=\"entry-item\">\n            <h3>{{ site.writing.cards[0].title }}</h3>\n            <p>{{ site.writing.cards[0].body }}</p>\n          </div>\n          <div class=\"entry-item\">\n            <h3>{{ site.writing.cards[1].title }}</h3>\n            <p>{{ site.writing.cards[1].body }}</p>\n          </div>\n          <div class=\"entry-item\">\n            <h3>{{ site.writing.cards[2].title }}</h3>\n            <p>{{ site.writing.cards[2].body }}</p>\n          </div>\n        </div>\n      </div>\n    </section>\n\n    <!-- DISCLAIMER -->\n    <section id=\"about\" class=\"section disclaimer-section\">\n      <div class=\"wrap\">\n        <p class=\"disclaimer-label\">Educational purposes only</p>\n        <p class=\"disclaimer-text\">{{ site.footer.body }} Content reflects the author's clinical perspective and is not a substitute for personalized medical advice. Consult a board-certified physician for any medical decisions.</p>\n        <p class=\"disclaimer-attr\">Curated by <a href=\"https://sinabarimd.com\">Dr. Sina Bari, MD</a> \u2014 Stanford-trained plastic &amp; reconstructive surgeon</p>\n      </div>\n    </section>\n\n  </main>\n\n  <footer class=\"site-footer\">\n    <div class=\"wrap footer-inner\">\n      <div>\n        <p class=\"footer-brand\">Honest Aesthetics</p>\n        <p class=\"footer-note\">by Dr. Sina Bari, MD \u00b7 <a href=\"https://sinabarimd.com\">sinabarimd.com</a></p>\n      </div>\n      <div>\n        <a class=\"footer-contact\" href=\"mailto:{{ site.contact_email }}\">{{ site.contact_email }}</a>\n      </div>\n    </div>\n  </footer>\n\n</body>\n</html>`, css: `*{box-sizing:border-box;margin:0;padding:0}\n:root{\n  --ink:#1c1a18;--muted:#5a5650;--accent:#7a3b1e;--warm:#c4603a;\n  --border:#ddd5c8;--bg:#faf7f3;--card:#fff;--warm-bg:#f5ede3;\n  --max:1080px;--serif:'Georgia',serif;--sans:Inter,ui-sans-serif,system-ui,sans-serif;\n  --shadow:0 6px 24px rgba(60,30,10,.08);--r:12px;\n}\nhtml{scroll-behavior:smooth}\nbody{font-family:var(--sans);background:var(--bg);color:var(--ink);line-height:1.7}\na{color:var(--accent);text-decoration:none}\na:hover{text-decoration:underline}\n.wrap{width:min(calc(100% - 2.5rem),var(--max));margin:0 auto}\n\n/* HEADER */\n.site-header{background:var(--ink);padding:2rem 0 1.5rem}\n.brand-name{font-family:var(--serif);font-size:clamp(1.8rem,4vw,2.8rem);\n  color:#fff;font-weight:400;letter-spacing:-.02em}\n.brand-sub{color:rgba(255,255,255,.6);font-size:.88rem;margin-top:.35rem;\n  max-width:44rem;line-height:1.5}\n.header-stripe{height:5px;background:linear-gradient(90deg,var(--warm),var(--accent))}\n\n/* SECTION NAV */\n.section-nav{background:var(--bg);border-bottom:1px solid var(--border);\n  position:sticky;top:0;z-index:10}\n.section-nav-inner{display:flex;gap:2rem;min-height:44px;align-items:center}\n.section-nav a{font-size:.83rem;font-weight:600;color:var(--muted);\n  letter-spacing:.05em;text-transform:uppercase}\n.section-nav a:hover{color:var(--ink)}\n\n/* OPENER */\n.opener-section{background:var(--warm-bg);border-bottom:1px solid var(--border);padding:2rem 0}\n.opener-inner{max-width:660px}\n.opener-kicker{font-size:.72rem;font-weight:700;letter-spacing:.16em;\n  text-transform:uppercase;color:var(--accent);margin-bottom:.7rem}\n.opener-quote{font-family:var(--serif);font-size:clamp(1.2rem,2.5vw,1.7rem);\n  font-style:italic;color:var(--ink);line-height:1.5;margin-bottom:.7rem}\n.opener-attr{font-size:.83rem;color:var(--muted)}\n\n/* SECTION */\n.section{padding:4rem 0}\n.section-warm{background:var(--warm-bg);border-top:1px solid var(--border);\n  border-bottom:1px solid var(--border)}\n.section-heading{font-family:var(--serif);font-size:clamp(1.5rem,2.8vw,2.2rem);\n  font-weight:400;letter-spacing:-.02em;margin-bottom:.35rem}\n.section-sub{font-size:.75rem;font-weight:700;letter-spacing:.14em;\n  text-transform:uppercase;color:var(--accent);margin-bottom:2rem}\n\n/* FEATURED LAYOUT */\n.featured-layout{display:grid;grid-template-columns:1.5fr .9fr;gap:3rem;align-items:start}\n.topic-pill{display:inline-block;background:var(--accent);color:#fff;\n  font-size:.7rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;\n  padding:.2rem .6rem;border-radius:3px;margin-bottom:1rem}\nh1{font-family:var(--serif);font-size:clamp(2rem,3.5vw,3rem);font-weight:400;\n  line-height:1.2;letter-spacing:-.02em;margin-bottom:1rem}\nh2{font-size:clamp(1.3rem,2vw,1.8rem)}\nh3{font-size:1rem;font-weight:700;letter-spacing:-.01em;margin-bottom:.4rem}\n.featured-intro{font-size:1.1rem;color:var(--muted);line-height:1.75;margin-bottom:.9rem}\n.featured-body{color:var(--muted);line-height:1.8;margin-bottom:1.2rem}\n.cta-link{font-weight:700;font-size:.9rem;color:var(--accent)}\n\n.aside-card{background:var(--card);border:1px solid var(--border);\n  border-radius:var(--r);padding:1.5rem;box-shadow:var(--shadow)}\n.aside-label{font-size:.72rem;font-weight:700;letter-spacing:.12em;\n  text-transform:uppercase;color:var(--muted);margin-bottom:.5rem}\n.aside-card p{font-size:.9rem;color:var(--muted);line-height:1.65;margin-bottom:.8rem}\n.aside-rule{border:none;border-top:1px solid var(--border);margin:.8rem 0}\n.aside-card a{color:var(--accent);font-weight:600;font-size:.88rem}\n\n/* TOPIC GRID */\n.topic-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;margin-top:.5rem}\n.topic-card{background:var(--card);border:1px solid var(--border);\n  border-radius:var(--r);padding:1.5rem;box-shadow:var(--shadow)}\n.topic-icon{font-size:.72rem;font-weight:700;letter-spacing:.1em;\n  color:var(--warm);margin-bottom:.7rem}\n.topic-card h3{margin-bottom:.4rem}\n.topic-card p{color:var(--muted);font-size:.88rem;line-height:1.65}\n\n/* REALITY CHECK */\n.reality-grid{display:grid;grid-template-columns:1fr 1fr;gap:2rem;margin-top:.5rem}\n.reality-col p{color:var(--muted);line-height:1.8}\n\n/* ENTRY LIST */\n.entry-list{display:flex;flex-direction:column;gap:0;margin-top:.5rem}\n.entry-item{padding:1.3rem 0;border-bottom:1px solid var(--border)}\n.entry-item:last-child{border-bottom:none}\n.entry-item h3{margin-bottom:.3rem;font-size:1rem}\n.entry-item p{color:var(--muted);font-size:.9rem;line-height:1.6}\n\n/* DISCLAIMER */\n.disclaimer-section{background:#f0ece6;border-top:2px solid var(--border);padding:2.5rem 0}\n.disclaimer-label{font-size:.72rem;font-weight:700;letter-spacing:.14em;\n  text-transform:uppercase;color:var(--muted);margin-bottom:.6rem}\n.disclaimer-text{color:var(--muted);font-size:.88rem;line-height:1.7;\n  max-width:640px;margin-bottom:.8rem}\n.disclaimer-attr{font-size:.86rem;color:var(--muted)}\n.disclaimer-attr a{color:var(--accent);font-weight:600}\n\n/* FOOTER */\n.site-footer{background:var(--ink);padding:2rem 0}\n.footer-inner{display:flex;justify-content:space-between;align-items:center;\n  gap:2rem;flex-wrap:wrap}\n.footer-brand{font-family:var(--serif);font-size:1.1rem;color:#fff;font-weight:400}\n.footer-note{color:rgba(255,255,255,.5);font-size:.85rem;margin-top:.25rem}\n.footer-note a{color:rgba(255,255,255,.6)}\n.footer-contact{color:#c4a385;font-size:.88rem}\n\n@media(max-width:820px){\n  .featured-layout,.reality-grid,.topic-grid{grid-template-columns:1fr}\n  .opener-section{padding:1.5rem 0}\n}` },\n  drsinabari: { html: `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>{{ site.title }}</title>\n  <meta name=\"description\" content=\"{{ site.meta_description }}\" />\n  <link rel=\"canonical\" href=\"{{ site.canonical_url }}\" />\n  <link rel=\"stylesheet\" href=\"styles.css\" />\n</head>\n<body>\n\n  <!-- NAMEPLATE -->\n  <header class=\"nameplate\">\n    <div class=\"wrap nameplate-inner\">\n      <div class=\"nameplate-line\"></div>\n      <h1 class=\"nameplate-title\">{{ site.display_name }}</h1>\n      <p class=\"nameplate-descriptor\">{{ site.hero.eyebrow }}</p>\n      <div class=\"nameplate-line\"></div>\n    </div>\n  </header>\n\n  <main class=\"main-content\">\n    <div class=\"wrap content-wrap\">\n\n      <!-- EDITOR'S NOTE -->\n      <section class=\"editors-note\">\n        <p class=\"note-label\">Editor's Note</p>\n        <blockquote class=\"note-body\">\n          <p>{{ site.about.paragraphs[0] }}</p>\n          <p>{{ site.about.paragraphs[1] }}</p>\n        </blockquote>\n        <p class=\"note-attr\">\u2014 Dr. Sina Bari, MD</p>\n      </section>\n\n      <hr class=\"essay-rule\" />\n\n      <!-- LEAD ESSAY -->\n      <article class=\"lead-essay\">\n        <div class=\"essay-meta\">\n          <span class=\"essay-category\">{{ site.focus.eyebrow }}</span>\n        </div>\n        <h2 class=\"essay-title\">{{ site.hero.headline }}</h2>\n        <p class=\"essay-deck\">{{ site.hero.lead }}</p>\n        <div class=\"essay-byline\">\n          By <a href=\"https://sinabarimd.com/about\" rel=\"author\">Sina Bari, MD</a>\n        </div>\n        <div class=\"essay-body\">\n          <p>{{ site.focus.cards[0].body }}</p>\n          <h3>{{ site.focus.cards[1].title }}</h3>\n          <p>{{ site.focus.cards[1].body }}</p>\n          <h3>{{ site.focus.cards[2].title }}</h3>\n          <p>{{ site.focus.cards[2].body }}</p>\n        </div>\n      </article>\n\n      <hr class=\"essay-rule\" />\n\n      <!-- RECENT PIECES -->\n      <section class=\"recent-pieces\">\n        <h2 class=\"recent-heading\">{{ site.writing.heading }}</h2>\n        <div class=\"piece-stack\">\n          <div class=\"piece\">\n            <p class=\"piece-kicker\">{{ site.writing.eyebrow }}</p>\n            <h3 class=\"piece-title\">{{ site.writing.cards[0].title }}</h3>\n            <p class=\"piece-excerpt\">{{ site.writing.cards[0].body }}</p>\n          </div>\n          <div class=\"piece\">\n            <h3 class=\"piece-title\">{{ site.writing.cards[1].title }}</h3>\n            <p class=\"piece-excerpt\">{{ site.writing.cards[1].body }}</p>\n          </div>\n          <div class=\"piece\">\n            <h3 class=\"piece-title\">{{ site.writing.cards[2].title }}</h3>\n            <p class=\"piece-excerpt\">{{ site.writing.cards[2].body }}</p>\n          </div>\n        </div>\n      </section>\n\n      <hr class=\"essay-rule\" />\n\n      <!-- BACKGROUND / CONTEXT -->\n      <section class=\"background-section\">\n        <h2 class=\"section-hed\">{{ site.background.heading }}</h2>\n        <p class=\"section-kicker\">{{ site.background.eyebrow }}</p>\n        <p>{{ site.background.paragraphs[0] }}</p>\n        <p>{{ site.background.paragraphs[1] }}</p>\n      </section>\n\n      <hr class=\"essay-rule\" />\n\n      <!-- NETWORK NOTE -->\n      <section class=\"network-note\">\n        <p class=\"note-label\">{{ site.network.eyebrow }}</p>\n        <p class=\"network-body\">{{ site.network.body }}</p>\n        <a class=\"hub-link\" href=\"https://sinabarimd.com\">sinabarimd.com \u2192</a>\n      </section>\n\n    </div>\n  </main>\n\n  <footer class=\"site-footer\">\n    <div class=\"wrap footer-inner\">\n      <div class=\"nameplate-line footer-rule\"></div>\n      <div class=\"footer-content\">\n        <p class=\"footer-title\">{{ site.display_name }}</p>\n        <p class=\"footer-note\">{{ site.footer.body }}</p>\n        <p class=\"footer-links\">\n          <a href=\"mailto:{{ site.contact_email }}\">{{ site.contact_email }}</a>\n          &nbsp;\u00b7&nbsp;\n          <a href=\"https://sinabarimd.com\">sinabarimd.com</a>\n        </p>\n      </div>\n    </div>\n  </footer>\n\n</body>\n</html>`, css: `*{box-sizing:border-box;margin:0;padding:0}\n:root{\n  --ink:#1a1814;--muted:#5c584f;--accent:#2c4a2e;--border:#ccc8be;\n  --bg:#faf9f6;--max:720px;\n  --serif:'Georgia',serif;--sans:Inter,ui-sans-serif,system-ui,sans-serif;\n}\nhtml{scroll-behavior:smooth}\nbody{font-family:var(--sans);background:var(--bg);color:var(--ink);line-height:1.75}\na{color:var(--accent);text-decoration:none}\na:hover{text-decoration:underline}\n.wrap{width:min(calc(100% - 2.5rem),var(--max));margin:0 auto}\n\n/* NAMEPLATE */\n.nameplate{padding:2.5rem 0;text-align:center}\n.nameplate-inner{display:flex;flex-direction:column;align-items:center;gap:.9rem}\n.nameplate-line{width:100%;border-top:1px solid var(--ink)}\n.nameplate-title{font-family:var(--serif);font-size:clamp(2.2rem,5vw,3.8rem);\n  font-weight:400;letter-spacing:-.03em;color:var(--ink)}\n.nameplate-descriptor{font-size:.75rem;letter-spacing:.2em;text-transform:uppercase;\n  color:var(--muted)}\n\n/* MAIN */\n.main-content{padding:2rem 0 4rem}\n.content-wrap{display:flex;flex-direction:column;gap:0}\n\n/* EDITOR'S NOTE */\n.editors-note{padding:2.5rem 0}\n.note-label{font-size:.72rem;font-weight:700;letter-spacing:.16em;\n  text-transform:uppercase;color:var(--muted);margin-bottom:1rem}\n.note-body{border-left:3px solid var(--border);padding-left:1.5rem;margin:0}\n.note-body p{font-family:var(--serif);font-style:italic;font-size:1.05rem;\n  color:var(--muted);line-height:1.8;margin-bottom:.8rem}\n.note-body p:last-child{margin-bottom:0}\n.note-attr{margin-top:.9rem;font-size:.88rem;color:var(--muted);font-style:italic}\n\n/* RULE */\n.essay-rule{border:none;border-top:1px solid var(--border);margin:0}\n\n/* LEAD ESSAY */\n.lead-essay{padding:3rem 0}\n.essay-meta{margin-bottom:1rem}\n.essay-category{font-size:.72rem;font-weight:700;letter-spacing:.14em;\n  text-transform:uppercase;color:var(--accent)}\n.essay-title{font-family:var(--serif);font-size:clamp(1.8rem,3.5vw,2.8rem);\n  font-weight:400;line-height:1.2;letter-spacing:-.02em;margin-bottom:.75rem}\n.essay-deck{font-size:1.08rem;color:var(--muted);line-height:1.65;margin-bottom:1rem;\n  font-style:italic;font-family:var(--serif)}\n.essay-byline{font-size:.88rem;color:var(--muted);padding:.8rem 0;\n  border-top:1px solid var(--border);border-bottom:1px solid var(--border);\n  margin-bottom:1.8rem}\n.essay-byline a{color:var(--ink);font-weight:600}\n.essay-body p{color:var(--muted);line-height:1.85;margin-bottom:1.1rem;font-size:1rem}\n.essay-body h3{font-family:var(--serif);font-size:1.2rem;font-weight:400;\n  color:var(--ink);margin:1.8rem 0 .6rem;font-style:italic}\n\n/* RECENT PIECES */\n.recent-pieces{padding:3rem 0}\n.recent-heading{font-family:var(--serif);font-size:1.4rem;font-weight:400;\n  margin-bottom:1.5rem;color:var(--ink)}\n.piece-stack{display:flex;flex-direction:column;gap:0}\n.piece{padding:1.4rem 0;border-bottom:1px solid var(--border)}\n.piece:last-child{border-bottom:none}\n.piece-kicker{font-size:.7rem;font-weight:700;letter-spacing:.14em;\n  text-transform:uppercase;color:var(--accent);margin-bottom:.5rem}\n.piece-title{font-family:var(--serif);font-size:1.15rem;font-weight:400;\n  letter-spacing:-.01em;margin-bottom:.4rem}\n.piece-excerpt{color:var(--muted);font-size:.9rem;line-height:1.65}\n\n/* BACKGROUND */\n.background-section{padding:3rem 0}\n.section-hed{font-family:var(--serif);font-size:1.4rem;font-weight:400;margin-bottom:.3rem}\n.section-kicker{font-size:.72rem;font-weight:700;letter-spacing:.14em;\n  text-transform:uppercase;color:var(--muted);margin-bottom:1.2rem}\n.background-section p{color:var(--muted);line-height:1.8;margin-bottom:.9rem}\n\n/* NETWORK NOTE */\n.network-note{padding:2.5rem 0}\n.network-body{color:var(--muted);line-height:1.75;margin:.6rem 0 .9rem;max-width:600px}\n.hub-link{font-weight:700;font-size:.9rem;color:var(--accent)}\n\n/* FOOTER */\n.site-footer{border-top:1px solid var(--border);padding:2rem 0}\n.footer-rule{margin-bottom:1.5rem}\n.footer-title{font-family:var(--serif);font-size:1.1rem;color:var(--ink);margin-bottom:.4rem}\n.footer-note{color:var(--muted);font-size:.85rem;line-height:1.6;max-width:36rem;margin-bottom:.6rem}\n.footer-links{font-size:.85rem;color:var(--muted)}\n.footer-links a{color:var(--accent)}` },\n};\n\nconst t = templates[site_id] || templates.sinabarimd;\n\nreturn [{ json: { ...$json, template: t.html, styles_css: t.css } }];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -240,
        304
      ],
      "id": "07f77003-d0d3-4c02-94b8-06640ad70775",
      "name": "Load Template"
    },
    {
      "parameters": {
        "jsCode": "const profile = $json.profile || {};\nconst site = $json;\nconst list = (arr) => (arr && arr.length ? arr.map(x => `- ${x}`).join('\\n') : '- none');\n\n// \u2500\u2500 CONTENT AGENT MODE (Orchestrator dispatch with research brief) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nif ($json.research_brief || $json.variation_seed) {\n  const { seo_context, media_context, research_brief, variation_seed } = $json;\n\n  const mediaStr = (media_context || []).map(m =>\n    `- ${m.type.toUpperCase()}: \"${m.title}\" (${m.url}) \u2014 ${m.summary}`\n  ).join('\\n') || 'No recent media items.';\n\n  const researchStr = research_brief ? `\nAPPROVED TOPIC: ${research_brief.recommended_topic || research_brief.novel_angle || '(see brief)'}\nNOVEL ANGLE: ${research_brief.novel_angle || 'not specified'}\nAEO QUESTIONS TO ADDRESS:\n${(research_brief.aeo_questions || []).map(q => `  - ${q}`).join('\\n')}\nCITABLE SOURCES (use these only, do not fabricate):\n${(research_brief.citable_sources || []).map(s =>\n  `  - ${s.title} | ${s.publication} | ${s.date} | ${s.url}`\n).join('\\n')}\n` : 'No research brief provided \u2014 use site profile and media context only.';\n\n  const openingMap = {\n    narrative:        'Open with a brief narrative or personal observation relevant to the topic.',\n    question:         'Open with a specific, direct question that the content will answer.',\n    direct_statement: 'Open with a clear, confident factual or opinion statement.',\n    data_point:       'Open with a specific statistic or data point, cited from the sources provided.',\n  };\n  const seed = variation_seed || { opening_type: 'direct_statement', target_word_count: 500, heading_depth: 2 };\n\n  const prompt = `You are the Content Agent for the Reputation Engine.\nReturn only valid YAML.\nHard rules:\n- Never output the word \"undefined\"\n- Never leave any field empty\n- The first line must be exactly: site:\n- Do not output markdown, code fences, commentary, HTML, or any text before/after the YAML\n- Keep output role-pure for this site \u2014 do not cross topic boundaries\n- Respect forbidden topics exactly\n\nSite: ${site.domain} (site_id: ${site.site_id || site.slug})\nRole: ${profile.role || 'N/A'}\nAllowed topics: ${list(profile.allowed_topics)}\nForbidden topics: ${list(profile.forbidden_topics)}\nAuthor: Dr. Sina Bari, MD\nAuthor URL: https://sinabarimd.com/about\n\nVARIATION INSTRUCTIONS:\n- ${openingMap[seed.opening_type] || openingMap.direct_statement}\n- Target word count for article/insight content: approximately ${seed.target_word_count} words (\u00b115%)\n- Use ${seed.heading_depth} levels of heading hierarchy\n- Vary paragraph lengths \u2014 mix short and long\n\nCONTENT DIRECTION:\n${researchStr}\n\nMEDIA CONTEXT (reference where relevant, do not fabricate):\n${mediaStr}\n\nSEO CONTEXT:\n${seo_context || 'No SEO alerts this week.'}\n\nMANDATORY REQUIREMENTS:\n- Include at least one contextual link to https://sinabarimd.com (satellite sites only)\n- Include a 3-5 item FAQ section addressing the AEO questions above (in writing.cards or a standalone field)\n- Include the author byline: \"Dr. Sina Bari, MD\"\n- Do not fabricate citations \u2014 only reference sources listed above\n\nPreserve exactly:\n- site.slug: ${site.slug}\n- site.canonical_url: ${site.canonical_url}\n- site.display_name: ${site.display_name}\n- site.contact_email: ${site.contact_email}\n- site.hero.headshot_src: ${site.headshot_src}\n- site.hero.headshot_alt: ${site.headshot_alt}\n\nRequired YAML structure:\nsite:\n  slug: string\n  canonical_url: string\n  display_name: string\n  title: string\n  meta_description: string\n  contact_email: string\n  hero:\n    eyebrow: string\n    headline: string\n    lead: string\n    primary_cta_text: string\n    primary_cta_href: string\n    secondary_cta_text: string\n    secondary_cta_href: string\n    headshot_src: string\n    headshot_alt: string\n  about:\n    eyebrow: string\n    heading: string\n    paragraphs:\n      - string\n      - string\n  focus:\n    eyebrow: string\n    heading: string\n    cards:\n      - title: string\n        body: string\n      - title: string\n        body: string\n      - title
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

How this works

This workflow automates the refresh of your website's content and structure, ensuring updates are deployed swiftly and verified for quality, saving hours of manual oversight and reducing errors in live sites. It suits developers and content teams managing dynamic sites, particularly those integrated with custom APIs like OpenClaw for content generation. The key step involves building and sending a deploy payload via HTTP request, followed by verification of the homepage and an approval gate before generating and validating new YAML-based content.

Use this workflow when you need event-driven site updates triggered by manual execution, such as after content changes or periodic refreshes, to maintain a polished online presence without constant monitoring. Avoid it for static sites with infrequent updates or when real-time AI processing is required, as it lacks AI nodes and focuses on structured HTTP interactions. Common variations include adapting the approval gate for team reviews or extending YAML validation for stricter schema checks in larger deployments.

About this workflow

Reputation Engine — Site Refresh. Uses httpRequest, executeWorkflowTrigger. Event-driven trigger; 35 nodes.

Source: https://github.com/sinabarimd/reputation-engine/blob/main/workflows/site-refresh.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

PRECALL. Uses executeWorkflowTrigger, httpRequest. Event-driven trigger; 23 nodes.

Execute Workflow Trigger, HTTP Request
General

Search-Criteria. Uses noOp, stopAndError, itemLists, executeWorkflowTrigger. Event-driven trigger; 14 nodes.

Stop And Error, Item Lists, Execute Workflow Trigger +1
General

Analyze AI Overview. Uses executeWorkflowTrigger, httpRequest. Event-driven trigger; 10 nodes.

Execute Workflow Trigger, HTTP Request
General

Absen Otomatis. Uses ssh, executeWorkflowTrigger, scheduleTrigger, httpRequest. Event-driven trigger; 12 nodes.

Ssh, Execute Workflow Trigger, HTTP Request
General

Kb Tool Confluence Knowledge Base. Uses executeWorkflowTrigger, httpRequest, stickyNote. Event-driven trigger; 7 nodes.

Execute Workflow Trigger, HTTP Request