Website: Fix optimization of social preview images

This commit is contained in:
Kovid Goyal 2023-04-21 14:19:36 +05:30
parent 07bcc5ba61
commit ccdb951716
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -154,7 +154,7 @@ def run_website(args: Any) -> None:
f.write(version) f.write(version)
shutil.copy2(os.path.join(docs_dir, 'installer.sh'), publish_dir) shutil.copy2(os.path.join(docs_dir, 'installer.sh'), publish_dir)
os.chdir(os.path.dirname(publish_dir)) os.chdir(os.path.dirname(publish_dir))
subprocess.check_call(['optipng', '-o7', 'kitty/_images/social_previews/*.png']) subprocess.check_call(['optipng', '-o7'] + glob.glob('kitty/_images/social_previews/*.png'))
subprocess.check_call(['git', 'add', 'kitty']) subprocess.check_call(['git', 'add', 'kitty'])
subprocess.check_call(['git', 'commit', '-m', 'kitty website updates']) subprocess.check_call(['git', 'commit', '-m', 'kitty website updates'])
subprocess.check_call(['git', 'push']) subprocess.check_call(['git', 'push'])