elegant: Accordion is not working in production
When I deploy my blog on GitHub, the Collapsible Comments cannot uncollapse which is available in localhost.
Here is my blog address: https://cmcai0104.github.io
And deploy code:
pelican content -s publishconf.py
ghp-import output -b master
git push origin master
And this is my pelicanconf.py document:
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = u'CaiChunming'
SITENAME = u"CMCai's Blog"
SITEURL = 'https://cmcai0104.github.io'
#PATH = 'content'
DATE_FORMATS = {'zh':'%b %d, %Y'}
TIMEZONE = 'Asia/Shanghai'
DEFAULT_LANG = u'zh'
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
#AUTHOR_FEED_ATOM = None
#AUTHOR_FEED_RSS = None
# Social widget
SOCIAL = (('Twitter','https://twitter.com/CaiChunming0104'),
('Github','https://github.com/cmcai0104'),('Email','mailto:hzxsccm678335@163.com'),)
DEFAULT_PAGINATION = 10
# Uncomment following line if you want document-relative URLs when developing
#RELATIVE_URLS = True
#MD_EXTENSIONS = ['codehilite(css_class=highlight)','extra','toc(permalnk=true)']
MARKDOWN = {
'extension_configs': {
'markdown.extensions.codehilite': {'css_class': 'highlight'},
'markdown.extensions.extra': {},
'markdown.extensions.meta': {},
'markdown.extensions.toc': {'permalink':'true'},
},
'output_format': 'html5',
'extensions' : ['extra']
}
MARKUP = ('md', 'ipynb')
PLUGIN_PATHS = [ './pelican-plugins/' ]
PLUGINS = ['ipynb.markup', 'extract_toc', 'tipue_search','sitemap','liquid_tags.img','neighbors','latex','related_posts','assets','series','share_post'
#,'multi_part'
]
SITEMAP = {
'format': 'xml',
'priorities': {
'articles': 0.5,
'indexes': 0.5,
'pages': 0.5
},
'changefreqs': {
'articles': 'monthly',
'indexes': 'daily',
'pages': 'monthly'
}
}
TYPOGRIFY = True
THEME = './pelican-themes/pelican-elegant'
DEFAULT_PAGINATION = False
DIRECT_TEMPLATES = (('index', 'tags', 'categories','archives', 'search', '404'))
STATIC_PATHS = ['theme/images', 'images'] #图片放在content/theme/images
TAG_SAVE_AS = ''
CATEGORY_SAVE_AS = ''
AUTHOR_SAVE_AS = ''
USE_SHORTCUT_ICONS = True
# Defaults
DEFAULT_CATEGORY = 'Miscellaneous'
USE_FOLDER_AS_CATEGORY = False
ARTICLE_URL = u'{slug}'
PAGE_URL = u'{slug}'
PAGE_SAVE_AS = u'{slug}.html'
# Elegant Labels
SOCIAL_PROFILE_LABEL = u'Stay in Touch'
RELATED_POSTS_LABEL = 'Keep Reading'
SHARE_POST_INTRO = 'Like this post? Share on:'
COMMENTS_INTRO = u'So what do you think? Did I miss something? Is any part unclear? Leave your comments below.'
DISQUS_SITENAME = u'cmcai0104'
TWITTER_USERNAME = u'CaiChunming'
FEATURED_IMAGE = './content/theme/images/apple-touch-icon-152x152.png'
# Landing Page
LANDING_PAGE_ABOUT = ({'title':'Welcome to my field', 'details':"""本人主要关注>概率统计及随机分析相关内容。对于量化金融、数据科学等方面有过相关的科研经历,也参
与过图像处理等科研项目。目前主要从事数据科学领域相关工作。\n 写此博客仅仅是对自>己学习的一个记录。若有任何问题欢迎联系我: hzxsccm678335@163.com 。\n 希望通过此>博客对学过的知识进行总结梳理。望多多给予宝贵意见,谢谢🙏!!"""})
PROJECTS = [
#{ 'name': 'Logpad + Duration',
# 'url': 'https://github.com/talha131/logpad-plus-duration#logpad--duration',
# 'description': 'Vim plugin to emulate Windows Notepad logging feature,'
# ' and log duration of each entry'},
{'name': 'Elegant Theme for Pelican',
'url': 'http://oncrashreboot.com/pelican-elegant',
'description': 'A clean and distraction free theme, with search and a'
' lot more unique features, using Jinja2 and Bootstrap'}
]
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (11 by maintainers)
That is correct @cmcai0104 . The mixed content HTTP/HTTPS on the jQuery include is a problem. This is here: https://github.com/Pelican-Elegant/elegant/blob/d01538eb61cffb4e356d40888391620423585aad/templates/base.html#L95
This is fixed in PR #131
@talha131 @iranzo
Thank you! It is available!
I forget to change the themes location in pelicanconf.py
Remove
httpsfrom the URL. So the final URL is//code.jquery.com/jquery.min.js