Skip to content

Image zoomable in distill post template #1374

Answered by Charlie-XIAO
wuyoscar asked this question in Q&A
Discussion options

You must be logged in to vote

@wuyoscar @phber Adding {% include scripts/misc.html %} to _layouts/distill.html should solve this issue. Most other layouts specified layout: default in which misc.html is already included, so they work already.

To minimize the effect on the current distill layout, you can alternatively just do

    {%- if site.enable_medium_zoom %}
      <!-- Medium Zoom JS -->
      <script defer src="https://cdn.jsdelivr.net/npm/medium-zoom@{{ site.medium_zoom.version }}/dist/medium-zoom.min.js" integrity="{{ site.medium_zoom.integrity }}" crossorigin="anonymous"></script>
      <script defer src="{{ '/assets/js/zoom.js' | relative_url | bust_file_cache }}"></script>
    {%- endif -%}

Including the wh…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by george-gca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants