Hello,
For a personal blog project I’m using a hugo theme. However I would like to add the ability to click on an image to display it in full size using, for example, lightbox2 via :
<link href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.3/css/lightbox.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.3/js/lightbox.min.js"></script>
{{ range .Resources.ByType "image" }}
<a href="{{ .RelPermalink }}" data-lightbox="gallery">
<img src="{{ .RelPermalink }}" alt="{{ .Title }}" style="width: 300px; height: auto;">
</a>
{{ end }}
However, if I add layouts/partials/head.html
and layouts/_default/single.html
files, my theme is rewritten.
How can I avoid this?
Thanks in advance for your answers