Update informations
This commit is contained in:
parent
5445a8a8f7
commit
9b29253a72
2
Gemfile
2
Gemfile
@ -1,4 +1,4 @@
|
|||||||
# 2023-11-11
|
# 2023-11-12
|
||||||
|
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
|
26
README.md
26
README.md
@ -1,3 +1,9 @@
|
|||||||
|
# Changes from original
|
||||||
|
|
||||||
|
* Version bump to **1.1.1**
|
||||||
|
* Keep only **x64** binaries
|
||||||
|
* Updated **gemspec**
|
||||||
|
|
||||||
# WebP Generator for Jekyll (Extended)
|
# WebP Generator for Jekyll (Extended)
|
||||||
WebP Image Generator for Jekyll Sites can automatically generate WebP images for all images on your static site and serve them when possible. View on [rubygems.org](https://rubygems.org/gems/jekyll-webp).
|
WebP Image Generator for Jekyll Sites can automatically generate WebP images for all images on your static site and serve them when possible. View on [rubygems.org](https://rubygems.org/gems/jekyll-webp).
|
||||||
|
|
||||||
@ -39,7 +45,7 @@ The plugin can be configured in the site's `_config.yml` file by including the `
|
|||||||
# The values here represent the defaults if nothing is set
|
# The values here represent the defaults if nothing is set
|
||||||
webp:
|
webp:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
# The quality of the webp conversion 0 to 100 (where 100 is least lossy)
|
# The quality of the webp conversion 0 to 100 (where 100 is least lossy)
|
||||||
quality: 75
|
quality: 75
|
||||||
|
|
||||||
@ -53,7 +59,7 @@ webp:
|
|||||||
# add ".gif" to the format list to generate webp for animated gifs as well
|
# add ".gif" to the format list to generate webp for animated gifs as well
|
||||||
formats: [".jpeg", ".jpg", ".png", ".tiff"]
|
formats: [".jpeg", ".jpg", ".png", ".tiff"]
|
||||||
|
|
||||||
# File extensions for animated gif files
|
# File extensions for animated gif files
|
||||||
gifs: [".gif"]
|
gifs: [".gif"]
|
||||||
|
|
||||||
# Set to true to always regenerate existing webp files
|
# Set to true to always regenerate existing webp files
|
||||||
@ -71,27 +77,27 @@ webp:
|
|||||||
# append '.webp' to filename after original extension rather than replacing it.
|
# append '.webp' to filename after original extension rather than replacing it.
|
||||||
# Default transforms `image.png` to `image.webp`, while changing to true transforms `image.png` to `image.png.webp`
|
# Default transforms `image.png` to `image.webp`, while changing to true transforms `image.png` to `image.png.webp`
|
||||||
append_ext: false
|
append_ext: false
|
||||||
|
|
||||||
##### Extended Features start
|
##### Extended Features start
|
||||||
# Use a different output subdirectory
|
# Use a different output subdirectory
|
||||||
# e.g. value of "/optimized" will create files at "/source/optimized" instead of "/source"
|
# e.g. value of "/optimized" will create files at "/source/optimized" instead of "/source"
|
||||||
output_img_sub_dir: "/optimized" # default ""
|
output_img_sub_dir: "/optimized" # default ""
|
||||||
|
|
||||||
# Generate thumbnails
|
# Generate thumbnails
|
||||||
thumbs: true
|
thumbs: true
|
||||||
|
|
||||||
# Thumbnails sub directory
|
# Thumbnails sub directory
|
||||||
thumbs_dir: "/thumbs"
|
thumbs_dir: "/thumbs"
|
||||||
|
|
||||||
# generate .5x images
|
# generate .5x images
|
||||||
generate_50p: true
|
generate_50p: true
|
||||||
|
|
||||||
##### Extended Features end
|
##### Extended Features end
|
||||||
############################################################
|
############################################################
|
||||||
```
|
```
|
||||||
|
|
||||||
## Simplest use: HTML
|
## Simplest use: HTML
|
||||||
In case you don't have control over your webserver then using the `<picture>` element and specifying all image formats available is the best option. This way the browser will decide which format to use based on its own capabilities.
|
In case you don't have control over your webserver then using the `<picture>` element and specifying all image formats available is the best option. This way the browser will decide which format to use based on its own capabilities.
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
<picture>
|
<picture>
|
||||||
@ -101,17 +107,17 @@ In case you don't have control over your webserver then using the `<picture>` el
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Advanced use: Webserver Configuration
|
## Advanced use: Webserver Configuration
|
||||||
If you can, then configuring your webserver to serve your new _.webp_ files to clients that support the format is probably the least problematic approach. This way you don't need to make any changes to your HTML files as your webserver will automatically serve WebP images when the client supports them.
|
If you can, then configuring your webserver to serve your new _.webp_ files to clients that support the format is probably the least problematic approach. This way you don't need to make any changes to your HTML files as your webserver will automatically serve WebP images when the client supports them.
|
||||||
|
|
||||||
Below is an example for a .htaccess configuration section in an Apache web-server. It will redirect users to webp images whenever possible.
|
Below is an example for a .htaccess configuration section in an Apache web-server. It will redirect users to webp images whenever possible.
|
||||||
|
|
||||||
```
|
```
|
||||||
####################
|
####################
|
||||||
# Attempt to redirect images to WebP if one exists
|
# Attempt to redirect images to WebP if one exists
|
||||||
# and the client supports the file format
|
# and the client supports the file format
|
||||||
####################
|
####################
|
||||||
# check if browser accepts webp
|
# check if browser accepts webp
|
||||||
RewriteCond %{HTTP_ACCEPT} image/webp
|
RewriteCond %{HTTP_ACCEPT} image/webp
|
||||||
|
|
||||||
# check if file is jpg or png
|
# check if file is jpg or png
|
||||||
RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png)$
|
RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png)$
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# 2023-11-11
|
# 2023-11-12
|
||||||
|
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
require_relative 'lib/jekyll-webp/version'
|
require_relative 'lib/jekyll-webp/version'
|
||||||
@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
|
|||||||
#spec.add_development_dependency "jekyll", ">= 3.0"
|
#spec.add_development_dependency "jekyll", ">= 3.0"
|
||||||
#spec.add_development_dependency "bundler", ">= 1.5"
|
#spec.add_development_dependency "bundler", ">= 1.5"
|
||||||
#spec.add_development_dependency "rake", ">= 1.5"
|
#spec.add_development_dependency "rake", ">= 1.5"
|
||||||
|
|
||||||
spec.add_development_dependency "minitest", '~> 5.4', '>= 5.4.3'
|
spec.add_development_dependency "minitest", '~> 5.4', '>= 5.4.3'
|
||||||
spec.add_runtime_dependency 'fastimage', '~> 2.0', '>= 2.0.0'
|
spec.add_runtime_dependency 'fastimage', '~> 2.0', '>= 2.0.0'
|
||||||
spec.add_development_dependency 'jekyll', '~> 3.0'
|
spec.add_development_dependency 'jekyll', '~> 3.0'
|
||||||
|
Loading…
Reference in New Issue
Block a user