我正在使用鹈鹕静态网站生成器为我的博客,我使用正确,但奇怪的是我发现.md
文章没有编译,它给我抛出这些奇怪的错误。
我查看了我的文章页面,一切都很好,这是我的文章标题
Title: some title
slug: some-title
Date: 2016-11-19
Category: code
Tags: python, python
Authors: nix1947(Manoj)
我无法找到,为什么我收到此错误?
我查看了pelicanconf.py
文件,特别是日期部分,一切正常
这是我的pelicanconf.py文件的日期部分
DATE_FORMAT = { 'en': '%d %m %Y'}
DEFAULT_DATE_FORMAT = '%d %m %Y'
PDF_GENERATOR = False
REVERSE_CATEGORY_ORDER = True
ARTICLE_URL = '{date:%Y}/{date:%-m}/{date:%-d}/{slug}/'
ARTICLE_SAVE_AS = ARTICLE_URL + 'index.html'
当我尝试编写文章时,这些是鹈鹕抛出的一堆错误。
(nix1947blog)nix1947@nix1947:~/projects/nix1947blog/content/blog$
-> Modified: content. re-generating...
ERROR: Skipping blog/output/tags.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/categories.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/archives.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/Updating-linux-packages-from-particular-repositories.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/heroku-rails-cheatsheet.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/Data structures and algorithms using python.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/rails-5-cheatsheet.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/authors.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/index.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/Web-scraping-using-python-3.5.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/hello-world.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/installing-latex-in-linux.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/author/nix1947.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/author/nix1947manoj-gautam.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/category/sysadmin.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/category/code.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/category/documentation.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/ruby.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/linux.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/python.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/programming.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/documentation.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/system-admininstration.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/rails.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/publishing.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/blog.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/heroku.html: could not find information about 'NameError: date'
Done: Processed 6 articles, 0 drafts, 0 pages and 0 hidden pages in 0.32 seconds.
答案 0 :(得分:3)
您的.md
个文件没问题。您的.html
中的content
个文件出现了错误,这看起来像是之前pelican
次运行的输出:
ERROR: Skipping blog/output/tags.html: could not find information about 'NameError: date'
删除blog/output
文件夹中的content
文件夹,错误应该消失。
答案 1 :(得分:0)
要构建URL,它正在尝试访问日期字段,但您没有提到这些URL的日期,这就是出错的原因。
PS: 这应该是评论而不是答案,但我没有足够的声誉,所以在这里添加它。