pelican博客_是的,此博客现在由Pelican提供支持

pelican博客

As an open source “Plone guy”, I’m always prepared to defend and explain my choice to not use Plone for blogging.

作为一个开源的“克隆人”,我总是准备捍卫并解释不使用Plone撰写博客的选择。

As an open source “Plone guy”, I’m always prepared to defend and explain my choice to not use Plone for blogging. A couple years ago, I started using WordPress in order to learn its feature set. I enjoyed my time with it, but after moving to wordpress.com for “trouble free” hosting, I found I couldn’t control my category feeds the way I wanted; the honeymoon was over.

作为一个开源的“克隆人”,我总是准备捍卫并解释使用Plone撰写博客的选择。 几年前,我开始使用WordPress来学习其功能集。 我很享受自己的时间,但是在转到wordpress.com进行“无故障”托管后,我发现我无法按自己的方式控制类别供稿; 蜜月结束了。

This was a giant let down, because I was hoping to avoid putting any time in to my blogging infrastructure. For weeks I did nothing. I poked at various options: Pelican, Plone, Tumblr, others. Eventually, I found my way back to Pelican and now I’m happy again.

这真是令人失望,因为我希望避免花任何时间来建立我的博客基础架构。 几个星期我什么都没做。 我戳了各种选择:鹈鹕,克隆,Tumblr等。 最终,我找到了回到鹈鹕的路,现在我又很高兴。

alternate text

Pelican is a static blog generator, as you may have heard. So one big advantage is:

您可能已经听说过,Pelican是静态的博客生成器。 因此, 一大优势是:

  • You can host it for free, or close to free on any number of free or cheap static website hosting services! (I’m using GitHub Pages)
  • 您可以免费托管它,也可以在任意数量的免费或廉价静态网站托管服务中免费托管它! (我正在使用GitHub Pages)

其他优点 (Other advantages)

  • It does feeds right (I need 3 “full body” feeds for: Mozilla, Plone, Python) [1].
  • It’s fun to configure (edit pelicanconf.py or publishconf.py).
  • The “cool kids” use it: e.g. Tarek Ziadé, Kenneth Reitz, Daniel Greenfeld, many others.
  • It grows with you: this is huge. You can start using it and feel comfortable right away, but there is always more to learn. This is how all software should be. Unfortunately, it’s tough to get it right (I think this is formally called UX).
  • 它确实正确地进行了供稿(我需要3个“全身”供稿:Mozilla,Plone,Python) [1]
  • 配置很有趣(编辑pelicanconf.py或publishconf.py)。
  • “好孩子”使用它:例如塔雷克·齐亚德(TarekZiadé),肯尼斯·雷茨(Kenneth Reitz),丹尼尔·格林菲尔德(Daniel Greenfeld)等。
  • 它与您一同成长:这是巨大的。 您可以立即开始使用它,并立即感到舒适,但是总有更多东西需要学习。 这就是所有软件的样子。 不幸的是,很难做到正确(我认为这正式称为UX)。

缺点 (Some disadvantages)

  • Don’t like typing in the terminal? Pelican is not for you.
  • No “nested” entries e.g. 2012/09/21/entry.html. I don’t know if there is a formal name for this feature, but I miss it (if for no other reason than “cool URLS never change” i.e. I’ve broken links with this move.)
  • The pelican-import has some bugs, so I’m doing a lot of manual cleanup (I don’t mind this though.)
  • Tags are categories and categories are tags (or something). I had to convert all my categories to tags, and then turn on tag feeds and turn off category feeds. Category feeds are on by default and tag feeds are off by default. Also ATOM is on and RSS is off, if that is of interest to you. (Since this is really just configuration change and not a disadvantage per sé, it probably belongs more in the next section where I discuss my setup.)
  • 不喜欢在终端上输入? 鹈鹕不适合你。
  • 没有“嵌套”条目,例如2012/09/21 / entry.html。 我不知道此功能是否有正式名称,但我想念它(如果仅出于“酷网址永不更改”的其他原因,即我已经取消了此操作的链接。)
  • 鹈鹕导入有一些错误,因此我要进行大量手动清理(尽管我不介意。)
  • 标签是类别,类别是标签(或其他东西)。 我必须将所有类别转换为标签,然后打开标签供稿并关闭类别供稿。 类别供稿默认情况下处于启用状态,而标记供稿则默认情况下处于关闭状态。 如果您感兴趣的话,还可以打开ATOM并关闭RSS。 (由于这实际上只是配置更改,而不是每个方面的缺点,因此它可能在我讨论设置的下一部分中会更多。)

If you are curious about my setup, here are the details.

如果您对我的设置感到好奇,请查看以下详细信息。

建立 (Setup)

Getting started with Pelican was easy, basically:

基本上,Pelican入门很容易:

$ virtualenv .
$ bin/pip install pelican BeautifulSoup Markdown
$ bin/pelican-quickstart
$ virtualenv .
$ bin/pip install pelican BeautifulSoup Markdown
$ bin/pelican-quickstart

At this point, after I answer the quickstart questions I:

此时,在我回答了快速入门问题之后,我:

Now the content is ready to host (which for me just involves a git push).

现在,内容已准备好托管(对我而言,这仅涉及git push)。

调整 (Tweaks)

A few things were tricky.

有些事情很棘手。

  • I wanted to host my articles at the top level of the repo for serving on GitHub Pages, so I modified the Makefile to make it so [2].
  • Categories control what links are available in the header, so I disabled them all but one called “Blog”. Not ideal, but it works.
  • The “social” links, and my disqus and analytics API keys were all a pleasure to configure.
  • 我想将我的文章托管在可在GitHub Pages上服务的仓库的顶层,因此我修改了Makefile使其成为[2]
  • 类别控制标题中可用的链接,因此我禁用了所有链接,只有一个称为“博客”。 不理想,但是可以。
  • “社交”链接以及我的Disqus和Analytics API密钥都非常易于配置。

工作流程 (Workflow)

Now I write articles in restructured text in the content/ directory and publish them like so:

现在,我在content /目录中以重组文本编写文章,并像这样发布它们:

$ make publish; git commit -a -m "Publish"; git push
$ make publish; git commit -a -m "Publish"; git push

All the details are here if you’d like to take a look:

如果您想看一下,所有详细信息都在这里:

Comments from more knowledgable Pelican users welcome. Like this article? Tip me on Gittip!

欢迎更多有经验的Pelican用户发表评论。 喜欢这篇文章吗? 在Gittip上给我提示!

[1][1] This is actually my first “test” post with Pelican so I will get a chance to see how the feeds perform. But they looked good in testing. 这实际上是我在Pelican的第一个“测试”帖子,所以我将有机会看到提要的表现。 但是他们在测试中看起来不错。
[2][2] I think I broke “make html”, actually. Primarily I just needed to make it not “clean” the entire repo. 我想我实际上打破了“ make html”。 首先,我只需要使其不“干净”整个仓库即可。

翻译自: https://www.pybloggers.com/2012/09/yup-this-blog-is-now-powered-by-pelican/

pelican博客

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值