pages/_includes/scripts/misc.liquid
George ef847825fd
Support for diff2html (#2133)
Added support to display diff code in a prettier way with
[diff2html](https://diff2html.xyz/).


![image](https://github.com/alshedivat/al-folio/assets/31376482/5f93b09c-3850-499a-999b-cb0ae13fddae)

It displays code like [in this
example](https://diff2html.xyz/demo.html).

---------

Signed-off-by: George Araújo <george.gcac@gmail.com>
2024-01-28 12:45:20 -03:00

34 lines
1.3 KiB
Plaintext

{% if site.enable_tooltips %}
<!-- Enable Tooltips -->
<script type="text/javascript">
$(function () {
$('[data-toggle="tooltip"]').tooltip();
});
</script>
{% endif %}
{% 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 %}
{% if page.toc and page.toc.sidebar %}
<!-- Sidebar Table of Contents -->
<script defer src="{{ '/assets/js/bootstrap-toc.min.js' | relative_url | bust_file_cache }}"></script>
{% endif %}
<!-- Bootstrap Table -->
{% if page.pretty_table %}
<!-- Bootstrap Table doesn't go well with diff2html -->
<script defer src="https://unpkg.com/bootstrap-table@{{ site.bootstrap-table.version }}/dist/bootstrap-table.min.js"></script>
{% endif %}
<!-- Load Common JS -->
<script src="{{ '/assets/js/no_defer.js' | relative_url | bust_file_cache }}"></script>
<script defer src="{{ '/assets/js/common.js' | relative_url | bust_file_cache }}"></script>
<script defer src="{{ '/assets/js/copy_code.js' | relative_url | bust_file_cache }}" type="text/javascript"></script>