Screenshot Directory Priority Implementation | Generated by AI

Home 2026.05

Done. Here is a summary of the changes:

Priority for screenshot save directory:

  1. SCREENSHOT_DIR from .env (global config) – checked first
  2. [dir] CLI argument – fallback if no env config
  3. . (current dir) for macOS, assets/screenshots for Linux – final default

Files changed:

To use it, set SCREENSHOT_DIR in your .env, e.g.:

SCREENSHOT_DIR=/Users/lzwjava/projects/jekyll-ai-blog/assets/screenshots

If empty or unset, the old behavior is preserved (. for macOS, assets/screenshots for Linux, or whatever you pass as [dir]).


Generated by AI. Curating and sharing still takes effort. If you find it useful, feel free to donate. WeChat: @lzwjava · X: @lzwjava · Say hi 👋

Back Donate