This directory contains code snippet images used in pgflow Twitter/X posts.
Images are named after their corresponding markdown files:
tweet-filename.png- Generated fromtweet-filename.md
These images are referenced in tweet markdown files using the image_url frontmatter field:
---
link: "https://pgflow.dev/example/"
source_code_for_image: |
// Code snippet here
language_for_image: "js"
image_url: "https://pgflow-dev.github.io/twitter-images/tweet-filename.png"
---Images are automatically generated using the Silicon tool via:
bin/gen-image-from-tweet-md path/to/tweet.mdThis script:
- Extracts code from the tweet's frontmatter
- Generates a PNG image with syntax highlighting
- Saves a copy in this directory
- Updates the tweet's frontmatter with the correct GitHub Pages URL
After generating new images:
- Commit and push this repository
- Images will be available at
https://pgflow-dev.github.io/twitter-images/filename.png
All images are generated with:
- Dracula theme for syntax highlighting
- No window controls
- Language-specific syntax highlighting based on the
language_for_imagefield