mkdocs-theme_dir-example
mkdocs-theme_dir-example copied to clipboard
Not working with mkdocs v 1.0.4
I am looking at being able to insert lightboxes and found your solution. However, it doesn't seem to be working with the latest mkdocs. I wonder if something might have changed with the way libraries and styles are linked in this?
{% extends "base.html" %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{ base_url }}/css/ekko-lightbox.min.css">
{% endblock styles %}
{% block libs %}
{{ super() }}
<script src="{{ base_url }}/js/ekko-lightbox.min.js"></script>
{% endblock libs %}
{% block scripts %}
{{ super() }}
<script>
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});
</script>
{% endblock scripts %}