Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ jobs:
cp -av target/${{ matrix.target }}/release/zola .
OUTPUT_DIR="$(find target -path '*/zola-*/out' -type d)"
cp -av "$OUTPUT_DIR"/* artifacts
tar -czf ${{ github.event.repository.name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz zola artifacts LICENSE
tar -czf ${{ github.event.repository.name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz zola artifacts LICENSE LICENSE-MIT
if: ${{ ! startsWith(matrix.os, 'windows') }}

- name: Archive (Windows)
run: |
mkdir -p artifacts
cp target/${{ matrix.target }}/release/zola.exe .
Compress-Archive zola.exe,LICENSE ${{ github.event.repository.name }}-${{ github.ref_name }}-${{ matrix.target }}.zip
Compress-Archive zola.exe,LICENSE,LICENSE-MIT ${{ github.event.repository.name }}-${{ github.ref_name }}-${{ matrix.target }}.zip
if: ${{ startsWith(matrix.os, 'windows') }}

- name: Attest Build Provenance
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ If you have Tera syntax in your content, you will need to wrap it in `{% raw %}.

### Breaking
Syntect has been replaced with [Giallo](https://github.com/getzola/giallo) and all the highlighting options
of the `markdown` section in the config file have been moved/changed in `[markdown.highlighting].
of the `markdown` section in the config file have been moved/changed in `[markdown.highlighting]`.

The themes are different so you will need to find something you like from <https://textmate-grammars-themes.netlify.app/>.

Expand Down
143 changes: 140 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Vincent Prouillet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ in the [docs/content](docs/content) folder of this repository or visit the [Zola
This tool and its template engine [tera](https://keats.github.io/tera/) were born from an intense dislike of the (insane) Golang template engine and therefore of
Hugo that I was using before for 6+ sites.

# List of features
## List of features

- [Single binary](https://www.getzola.org/documentation/getting-started/cli-usage/)
- [Syntax highlighting](https://www.getzola.org/documentation/content/syntax-highlighting/)
Expand All @@ -31,3 +31,12 @@ Hugo that I was using before for 6+ sites.
- [Search with no servers or any third parties involved](https://www.getzola.org/documentation/content/search/)
- [Live reload](https://www.getzola.org/documentation/getting-started/cli-usage/#serve)
- Deploy on many platforms easily: [Netlify](https://www.getzola.org/documentation/deployment/netlify/), [Vercel](https://www.getzola.org/documentation/deployment/vercel/), [Cloudflare Pages](https://www.getzola.org/documentation/deployment/cloudflare-pages/), etc

## License

This project contains code under multiple licenses.

Code introduced after version 0.22 is licensed under the EUPL-1.2.
Code that existed prior to commit 3c9131db0d203640b6d5619ca1f75ce1e0d49d8f remains licensed under the MIT License, including in later versions of the project.

See LICENSE and LICENSE-MIT for details.
41 changes: 41 additions & 0 deletions components/config/src/config/image_compression.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum ImageFormat {
Jpeg,
Webp,
Avif,
}

impl ImageFormat {
pub fn file_extension(&self) -> &str {
match self {
ImageFormat::Jpeg => "jpg",
ImageFormat::Webp => "webp",
ImageFormat::Avif => "avif",
}
}
}

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ImageCompression {
/// Glob of files to run the compression on.
pub glob: String,
/// The codec to encode files to.
pub format: ImageFormat,
/// Target SSIM score.
#[serde(default = "default_ssim")]
pub target_ssim: f64,
/// Number of iterations to try and reach target SSIM.
#[serde(default = "default_iterations")]
pub max_iterations: u8,
}

fn default_ssim() -> f64 {
0.8295
}

fn default_iterations() -> u8 {
5
}
Loading