Compress all .png-s via optipng

less size - less traffic.
This commit is contained in:
Alexander A. Klimov 2023-04-17 11:36:54 +02:00
parent 8ebf07d93d
commit 09ba3c5a50
1 changed files with 6 additions and 0 deletions

View File

@ -261,3 +261,9 @@ mkdocs['nav'].push(*subproject_navigation) if subproject_navigation
File.write('mkdocs.yml', mkdocs.to_yaml)
%x(mkdocs build)
Dir.chdir(mkdocs['site_dir'])
Dir.glob('**/*.png').each do|f|
system("optipng #{f}") or exit!
end