diff --git a/src/generator/generator.py b/src/generator/generator.py index 51acf31..5486557 100644 --- a/src/generator/generator.py +++ b/src/generator/generator.py @@ -6,6 +6,7 @@ import base64 import hashlib import hmac import json +import re import time import structlog @@ -264,6 +265,9 @@ class GhostPublisher: clean = _strip_researchowl_header(markdown_content) html = _md.markdown(clean, extensions=["extra"]) + # Ghost añade el título automáticamente — eliminar el primer

para evitar duplicado + html = re.sub(r"]*>.*?

", "", html, count=1, flags=re.DOTALL).lstrip() + logger.info("Ghost publish_draft", html_length=len(html), html_preview=html[:200])