This repository was archived by the owner on Dec 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ # Twitter Images for pgflow
2+
3+ This directory contains code snippet images used in pgflow Twitter/X posts.
4+
5+ ## Image Naming Convention
6+
7+ Images are named after their corresponding markdown files:
8+
9+ - ` tweet-filename.png ` - Generated from ` tweet-filename.md `
10+
11+ ## Usage in Tweets
12+
13+ These images are referenced in tweet markdown files using the ` image_url ` frontmatter field:
14+
15+ ``` yaml
16+ ---
17+ link : " https://pgflow.dev/example/"
18+ source_code_for_image : |
19+ // Code snippet here
20+ language_for_image : " js"
21+ image_url : " https://pgflow-dev.github.io/twitter-images/tweet-filename.png"
22+ ---
23+ ```
24+
25+ ## Image Generation
26+
27+ Images are automatically generated using the Silicon tool via:
28+
29+ ``` bash
30+ bin/gen-image-from-tweet-md path/to/tweet.md
31+ ```
32+
33+ This script:
34+ 1 . Extracts code from the tweet's frontmatter
35+ 2 . Generates a PNG image with syntax highlighting
36+ 3 . Saves a copy in this directory
37+ 4 . Updates the tweet's frontmatter with the correct GitHub Pages URL
38+
39+ ## Workflow
40+
41+ After generating new images:
42+ 1 . Commit and push this repository
43+ 2 . Images will be available at ` https://pgflow-dev.github.io/twitter-images/filename.png `
44+
45+ ## Image Format
46+
47+ All images are generated with:
48+ - Dracula theme for syntax highlighting
49+ - No window controls
50+ - Language-specific syntax highlighting based on the ` language_for_image ` field
You can’t perform that action at this time.
0 commit comments