Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

Commit 9d02ce9

Browse files
committed
add readme
1 parent 1ac6690 commit 9d02ce9

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

twitter-images/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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

0 commit comments

Comments
 (0)