我正在使用 Pelican 和Elegant主题来生成我的博客。但是,我不知道如何打开搜索功能。我已经添加了tipue_search
和sitemap
插件,但没有运气。我附上配置文件pelicanconf.py
以供参考。
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = u'abc'
SITENAME = u"abc"
DEFAULT_DATE = 'fs'
SITEURL = 'http://example.github.io'
TIMEZONE = 'Asian/Shanghai'
THEME = 'elegant'
DEFAULT_PAGINATION = 10
ARTICLE_URL = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/'
ARTICLE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/index.html'
YEAR_ARCHIVE_SAVE_AS = 'posts/{date:%Y}/index.html'
MONTH_ARCHIVE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/index.html'
# Uncomment following line if you want document-relative URLs when developing
# RELATIVE_URLS = True
PLUGIN_PATH = 'pelican-plugins'
PLUGINS = ["sitemap",
"tipue_search",
"render_math",
"summary",
"neighbors"]
SITEMAP = {
"format": "xml",
"priorities": {
"articles": 0.7,
"indexes": 0.5,
"pages": 0.3,
},
"changefreqs": {
"articles": "monthly",
"indexes": "daily",
"pages": "monthly",
}
}