import fs from 'fs'; import path from 'path'; import { marked } from 'marked'; import { fileURLToPath } from 'url'; import { serializeJsonLd } from './json-ld.mjs'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const POSTS_DIR = path.resolve(__dirname, '../blog/posts'); const BLOG_DIR = path.resolve(__dirname, '../blog'); const SITE_URL = 'https://www.bentopdf.com'; const AUTHOR = { name: 'Alam', url: `${SITE_URL}/blog/author-alam`, image: `${SITE_URL}/images/author-alam.jpg`, profiles: [ 'https://github.com/alam00000', 'https://www.linkedin.com/in/abdullah-alam01/', 'https://x.com/alamdraws', ], }; const LINK_CLASS = 'text-indigo-300 hover:text-indigo-400'; function escapeHtml(value) { return value .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"'); } function styleBody(html) { return html .replace(/

/g, '

') .replace(/

/g, '

') .replace(/

/g, '

') .replace( /

    /g, '
      ' ) .replace( /