Change imagemagick optional to depend on one variable (#745)
This commit is contained in:
parent
510587c34f
commit
3672e8d2b1
@ -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
|
||||
|
@ -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 -%}
|
||||
|
Loading…
Reference in New Issue
Block a user