6个不是Jekyll的静态博客生成器

In a previous article, I compared WordPress, the world’s most popular blogging platform, with Jekyll, a less-conventional approach to blogging whereby you create all of your content inside local text files before running a command to generate a purely static version of your blog. Jekyll has a range of benefits:

上一篇文章中 ,我将WordPress(世界上最受欢迎的博客平台)与Jekyll (一种不太常规的博客方法)进行了比较,该方法是在运行命令以生成纯静态版本的Blog之前在本地文本文件中创建所有内容。 。 Jekyll有一系列好处:

  1. You have far more control over every aspect of your blog.

    您对博客的各个方面都有更多的控制权。
  2. Since there’s no database involved, the performance is unbeatable.

    由于不涉及数据库,因此性能无与伦比。
  3. Many find blogging from their desktop to be more intuitive.

    许多人发现从他们的桌面写博客更加直观。

But while Jekyll is by far the most popular static blog generator, and it’s the one I recommend for first-timers, there are many to choose from.

但是,尽管Jekyll是迄今为止最受欢迎的静态博客生成器,并且它是我向初学者推荐的静态博客生成器,但是有很多选择。

Let’s talk about some of the most interesting alternatives.

让我们讨论一些最有趣的替代方法。

1. 中间人 (1. Middleman)

middleman

Jekyll has become increasingly flexible with each release but, at its core, it encourages bloggers to follow a precise set of conventions. This is a big part of its user friendliness but some might find it limiting.

Jekyll的每个发行版都变得越来越灵活,但从本质上讲,它鼓励博客作者遵循一系列精确的约定。 这是其用户友好性的重要组成部分,但有些人可能会发现它是有限的。

If, after playing around with Jekyll, you find yourself wishing that it had feature X or Y, check out Middleman. It’s built upon the same language — Ruby — but, right out of the box, it’s far more flexible.

在与Jekyll玩耍之后,如果您发现自己希望它具有X或Y特征,请查看Middleman。 它是基于相同的语言Ruby构建的,但是,开箱即用,它更加灵活。

Here are a few reasons to love Middleman:

爱上Middleman的原因如下:

  1. While there’s a “Blog” module, you’re not confined to sticking with the basic structure of a blog. You can build much more complex websites.

    尽管有一个“博客”模块,但您并不局限于坚持博客的基本结构。 您可以建立更复杂的网站。
  2. There are plenty of great plugins available, like sitemap generation, image optimization, local gzipping, and all sorts of deployment solutions.

    有很多很棒的插件可用,例如站点地图生成,图像优化,本地gzip压缩以及各种部署解决方案。
  3. An incredible amount of functionality and flexibility can be found within the main configuration file.

    在主配置文件中可以找到数量众多的功能和灵活性。

But since Middleman can do a lot more, it’s also trickier to get a handle on, compared to Jekyll. It’s not overtly difficult, but you will have to spare a little extra time and attention to manipulating it to your will.

但是,由于Middleman可以做更多的事情,因此与Jekyll相比,要掌握它还比较棘手。 这并不是很困难,但是您将不得不花费一些额外的时间和精力来按自己的意愿进行操作。

2. 雨果 (2. Hugo)

hugo

A common problem amongst static blog generators is the time it takes to actually generate the static files. Because while dynamic blogs are generated on the fly, a static blog is generated all at once. For a small blog, this is fine. The bigger a blog becomes though, the more frustrating it can become.

静态博客生成器中的一个普遍问题是实际生成静态文件所花费的时间。 因为在动态生成动态博客的同时,静态博客却是一次生成的。 对于小型博客,这很好。 博客越大,越令人沮丧。

Some generators, like Middleman, offer incremental generation. This stops the entire blog from being generated every time. Instead, only the parts that have changed are generated. (Unfortunately, Jekyll doesn’t have this intelligence.)

一些发电机,例如Middleman,提供增量发电。 这将阻止每次生成整个博客。 而是仅生成已更改的零件。 (不幸的是,杰基尔没有这种智慧。)

If you’re looking for sheer performance though, Hugo is your best bet. It’s no slouch in terms of features, but its biggest draw is that it’s built with Go — a language famous for its speed. If I were starting a blog with a frequent publishing schedule and the expectation of thousands of pages, I’d choose Hugo.

如果您正在寻找纯粹的表现,Hugo是您最好的选择。 就功能而言,这并不算懈怠,但它最大的吸引力在于它是用Go(一种以其速度而闻名的语言)构建的。 如果我要开始发布时间安排频繁且期望有数千页的博客,那么我会选择Hugo。

3. Hexo (3. Hexo)

hexo

When I’m not writing for SitePoint, I’m working on a blog about the Meteor JavaScript framework, and when putting together that blog, I decided it would be nice to maintain a consistent tool-chain. If I was to be writing code with JavaScript, and writing about JavaScript, then perhaps I should generate my blog with a JavaScript-based tool?

当我不为SitePoint撰写文章时,我正在写有关Meteor JavaScript框架的博客 ,而当将该博客放在一起时,我认为保持一致的工具链会很好。 如果要使用JavaScript编写代码并编写有关 JavaScript的文章,那么也许应该使用基于JavaScript的工具来生成博客?

Ultimately, the Ruby-based Middleman generator proved to be the better fit, but of the JavaScript-based options, Hexo was a strong contender. It’s quite fast (although not as fast as Hugo) and a great choice for fans of JavaScript.

最终,基于Ruby的Middleman生成器被证明是更好的选择,但是在基于JavaScript的选项中,Hexo是一个有力的竞争者。 它的速度相当快(尽管不如Hugo快),并且是JavaScript爱好者的绝佳选择。

4. 鹈鹕 (4. Pelican)

pelican

I’m a Ruby enthusiast, so tools like Jekyll and Middleman are attractive to me. If, however, you’re a Python aficionado, then your preferences are well-catered for in the form of Pelican — the most popular static blog generator built with Python and the third most popular overall.

我是Ruby的狂热者,因此Jekyll和Middleman等工具对我很有吸引力。 但是,如果您是Python的狂热者,则可以通过Pelican的形式对自己的偏好进行适当的分类,Pelican是使用Python构建的最受欢迎的静态博客生成器,并且排名第三。

It comes with all the standard features:

它具有所有标准功能:

  • Generation of Markdown-based blog articles and pages.

    基于Markdown的博客文章和页面的生成。
  • Syntax highlighting for code snippets inside your posts.

    在您的帖子中突出显示代码段的语法。
  • Automatic creation of an RSS feed.

    自动创建RSS feed。

But because of my leanings toward Jekyll, the only significant reason I’d recommend Pelican is for people who already develop with Python.

但是由于我倾向于Jekyll,所以我推荐Pelican的唯一重要原因是针对已经使用Python开发的人。

5. 金属匠 (5. Metalsmith)

metalsmith

Metalsmith is easily the “weirdest” blog generator on this list but I mean that as a compliment. Here’s a basic idea of how it works:

Metalsmith很容易成为该列表上“最奇怪”的博客生成器,但我的意思是夸奖。 这是其工作原理的基本概念:

  1. The core of Metalsmith itself manipulates files within a folder.

    Metalsmith的核心本身就是处理文件夹中的文件。
  2. Various plugins are used to define how these files are manipulated.

    使用各种插件来定义如何操纵这些文件。
  3. Plugins can be chained together to create different results.

    插件可以链接在一起以创建不同的结果。

Since it’s a little tricky to explain without a number of examples, looking through the official website is the best way to “get” how cool this approach is. It won’t be what everyone needs, but it’s certainly clever.

由于在没有大量示例的情况下进行解释有点棘手,因此浏览官方网站是“弄清”这种方法有多酷的最佳方法。 这不是每个人都需要的,但是肯定很聪明。

6. Octopress (6. Octopress)

Octopress

Okay, to suggest that Octopress is distinct from Jekyll is a little disingenuous. In reality, Octopress is based on Jekyll. Out of the box, it simply has a range of extra functionality and a different default theme.

好吧,建议Octopress与Jekyll不同是有点不诚实的。 实际上,Octopress基于Jekyll。 开箱即用,它仅具有一系列附加功能和不同的默认主题。

Personally, I prefer working from scratch with vanilla Jekyll. That way, my blog will have nothing more than exactly what it needs. If you’re looking for a quick-start option though, Octopress has you covered.

就个人而言,我更喜欢从头开始与香草Jekyll合作。 这样,我的博客将无所不包。 但是,如果您正在寻找快速入门选项,Octopress可以满足您的要求。

结论 (Conclusion)

Obviously, people looking for a static blog generator are not starved for choice. This isn’t even an exhaustive list, either. There’s dozens of other options I haven’t covered. These six, however, are the most interesting to me, and they’re a great place to start. Feel free to make your own suggestions in the comments though. I’m always curious to play around with other software.

显然,寻找静态博客生成器的人不会选择饥饿。 这也不是一个详尽的清单。 我还没有涉及很多其他选择 。 但是,这六个对我来说是最有趣的,它们是一个很好的起点。 随意在评论中提出您自己的建议。 我总是好奇与其他软件一起玩。

翻译自: https://www.sitepoint.com/6-static-blog-generators-arent-jekyll/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值