diff --git a/md2img/SKILL.md b/md2img/SKILL.md index f6800ff..8bc5d28 100644 --- a/md2img/SKILL.md +++ b/md2img/SKILL.md @@ -15,7 +15,7 @@ Render Markdown documents into high-quality PNG images with full support for Mer - **LaTeX math**: inline `$...$` and block `$$...$$` / `\[...\]` (via KaTeX) - **GFM syntax**: tables, task lists, strikethrough, code blocks - **Code highlighting**: via highlight.js CSS -- **Dark/Light theme**: auto-detects system preference, or override with `--dark`/`--light` +- **Dark/Light theme**: override with `--dark` or `--light` flag - **Paper sizes**: A4 (default) or Letter, 2x DPI for crisp output - **Cross-platform**: Windows (Chrome/Edge) and Linux (Chrome/Chromium) @@ -72,14 +72,12 @@ npx puppeteer browsers install chrome # Option 2: Install system Chromium # Ubuntu/Debian: -sudo apt install -y chromium-browser -# CentOS/RHEL: -sudo yum install -y chromium +sudo apt install -y chromium # Alpine: apk add chromium # Option 3: Set CHROME_PATH env variable -export CHROME_PATH=/usr/bin/chromium-browser +export CHROME_PATH=/usr/bin/chromium ``` **Linux headless prerequisites:** @@ -136,7 +134,7 @@ WORKDIR /app COPY scripts/package.json scripts/render.js ./ RUN npm install --production -ENTRYPOINT ["node", "render.js"] +CMD ["node", "render.js"] ``` ## Technical Details diff --git a/md2img/scripts/package.json b/md2img/scripts/package.json index 314e92e..2184958 100644 --- a/md2img/scripts/package.json +++ b/md2img/scripts/package.json @@ -4,15 +4,11 @@ "description": "Render Markdown with Mermaid & LaTeX to PNG (cross-platform)", "scripts": { "render": "node render.js", - "setup:linux": "npm install && npx puppeteer browsers install chrome", - "setup:fonts": "bash scripts/setup-linux-fonts.sh" + "setup:linux": "npm install && npx puppeteer browsers install chrome" }, "dependencies": { "katex": "^0.16.9", "marked": "^12.0.0", - "mermaid": "^10.9.0", "puppeteer-core": "^22.15.0" - }, - "optionalDependencies": {}, - "_linuxSetup": "On Linux headless servers without Chrome/Chromium, run: npm install puppeteer && npx puppeteer browsers install chrome" + } }