倒腾Pelican - Collapse does not work
It has been 1485 days since the last update, the content of the article may be outdated.
Issue
This happens with the file elegant/templates/base.html
, which rules the element of every pages
at around line 97 , there is a quote:
html
<script src="http://code.jquery.com/jquery.min.js"></script> |
it seems the http
request is nolonger credited in this case, and a potential consequence is that:
The following collapse funtion in elegant/templates/category.html
reports an error "$" undefined
,
the collapse effect in Categories
page does not work.
html
<script language="javascript" type="text/javascript"> |
Solution
just modify the file elegant/templates/base.html
Method 1. Remove ‘http:’
remove prefix in the js/html template files. “http://“ -> “//“
i.e. change
html
<script src="http://code.jquery.com/jquery.min.js"></script> |
to
html
<script src="//code.jquery.com/jquery.min.js"></script> |
this bring in a warning massage (press F12
in your browser,see console
):
warning massage
but this works well, I stopt debugging.
This solution comes from a smilar github issue #127 of netflow, see pditommaso’s comment on 6 Apr 2016.
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment