【发布时间】:2015-04-09 21:45:13
【问题描述】:
我已经按照http://docs.getpelican.com/en/3.5.0/quickstart.html#installation 中的说明在虚拟环境中安装了 Pelican。运行make html,然后运行make serve 确实会在localhost:8000 上产生预期的结果:内容和主题按预期呈现。但是,本地服务器发出警告:
WARNING:root:Unable to find file /favicon.ico/index.html or variations.
我运行make s3_upload 有和没有--guess-mime-type 选项。无论哪种情况,我都确保我的 s3 存储桶中的 css 文件具有正确的 mime 类型(文本/纯文本) CSS 文件必须具有 text/css 作为 mime 类型 :
Done: Processed 1 article(s), 0 draft(s) and 0 page(s) in 0.35 seconds.
s3cmd sync /home/theuser/virtualenvs/pelican/theblog/output/ s3://theuser.com --acl-public --delete-removed --guess-mime-type
文件确实上传到 s3,但博客未正确呈现(显然 css 指令无法识别)。我没有在我的测试 Markdown 文档中添加任何内联 css。
为什么博客不能从 s3 正确渲染?我应该在哪里寻找错误日志?谢谢。
编辑:
我通过http://jigsaw.w3.org/css-validator/ 运行博客,得到“恭喜,未发现错误”和“此文档验证为 CSS 级别 3”。
假设博客的 URI 是 www.theuser.com,我也尝试将 pelicanconf.py 的 SITEURL 设置为
SITEURL = 'http://s3.amazonaws.com/theuser.com'
SITEURL = 'http://theuser.com'
【问题讨论】:
标签: css amazon-s3 favicon pelican