Simplified the post JS file.

This commit is contained in:
Cotes Chung 2020-06-01 22:40:10 +08:00
parent 032f5c7f83
commit 75c57d1725
5 changed files with 5 additions and 22 deletions

View file

@ -12,11 +12,7 @@
{% elsif page.layout == 'post' %} {% elsif page.layout == 'post' %}
{% if site.toc and page.toc %}
<script src="{{ '/assets/js/post-toc.min.js' | relative_url }}" async></script>
{% else %}
<script src="{{ '/assets/js/post.min.js' | relative_url }}" async></script> <script src="{{ '/assets/js/post.min.js' | relative_url }}" async></script>
{% endif %}
{% if page.math %} {% if page.math %}
<!-- MathJax --> <!-- MathJax -->

View file

@ -26,7 +26,6 @@ const include = [
'{{ "/assets/js/home.min.js" | relative_url }}', '{{ "/assets/js/home.min.js" | relative_url }}',
'{{ "/assets/js/page.min.js" | relative_url }}', '{{ "/assets/js/page.min.js" | relative_url }}',
'{{ "/assets/js/post.min.js" | relative_url }}', '{{ "/assets/js/post.min.js" | relative_url }}',
'{{ "/assets/js/post-toc.min.js" | relative_url }}',
/*--- HTML ---*/ /*--- HTML ---*/

View file

@ -1,16 +0,0 @@
---
layout: compress
# JS for layout post (with ToC).
# Chirpy v2.3
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2020 Cotes Chung
# MIT License
---
{% include_relative _home-post.js %}
{% include_relative lib/_bootstrap-toc.min.js %}
{% include_relative _utils/toc.js %}

View file

@ -9,3 +9,7 @@ layout: compress
--- ---
{% include_relative _home-post.js %} {% include_relative _home-post.js %}
{% include_relative lib/_bootstrap-toc.min.js %}
{% include_relative _utils/toc-filter.js %}