Change imagemagick optional to depend on one variable (#745)

This commit is contained in:
Rohan Deb Sarkar 2022-07-08 13:09:31 +05:30 committed by GitHub
parent 510587c34f
commit 3672e8d2b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -240,10 +240,8 @@ filtered_bibtex_keywords: [abbr, abstract, arxiv, bibtex_show, html, pdf, select
# Responsive WebP Images
# -----------------------------------------------------------------------------
enable_responsive_images: true # enables responsive images for your site (recomended, see https://github.com/alshedivat/al-folio/issues/537)
imagemagick:
enabled: true # make it 'false' if not using responsive images
enabled: false # enables responsive images for your site (recomended, see https://github.com/alshedivat/al-folio/issues/537)
widths:
- 480
- 800

View File

@ -3,7 +3,7 @@
<figure>
<picture>
{% if site.enable_responsive_images %}
{% if site.imagemagick.enabled %}
{% for i in site.imagemagick.widths -%}
<source media="(max-width: {{ i }}px)" srcset="{{ path | relative_url }}-{{ i }}.webp" />
{% endfor -%}