Hugo增量构建。有没有未记录的开关?

huangapple go评论92阅读模式
英文:

Hugo incremental builds . Is there an undocumented switch somewhere?

问题

我正在评估用于生成静态网站的Hugo,该网站可能每天生成约20篇文章。因此,在一年内,将有7000多篇用Markdown编写的文章需要构建并部署到我的生产服务器上。

我最初使用的是Jekyll,但即使对于少量页面,构建速度也非常慢,而且我无法理解一个看似基本的需求,即增量构建-仅构建和生成已更改的内容-在Jekyll中仍然不受支持... #SMH。

所以我想知道Hugo是否支持增量构建?

我在gohugo.io的文档中没有看到任何相关内容,也没有在hugo help命令行帮助中找到相关信息。

但是Hugo似乎具备我所寻找的其他所有功能,并且对于一小批文章的构建速度非常快,所以我真的很想给它一个机会。

另外,它使用的语言<kbd>GO</kbd>是由我一直以来最喜欢的黑客之一Ken Thompson共同编写的。

英文:

I am evaluating Hugo for generating my static site that will potentially generate about 20 posts a day. So in about a year, there will be 7000+ posts written in markdown, that will need to be build and deployed to my production server.

I initially started with Jekyll, but the builds even for small number of pages is terribly slow, and I can't, for the life of me, understand how a seemingly basic requirement like incremental builds - building and generating only content that has changed -- is still not supported in Jekyll... #SMH.

So I would like to know if Hugo has incremental builds?

I didn't see anything in the documentation over at gohugo.io,or in the hugo help commandline help.

But Hugo seems to have everything else I am looking for, and the builds on a small batch of posts is blazing fast, so I would really like to give it a chance.

Plus the language that it's written in, <kbd>GO</kbd>, was co-authored by 1 of my all-time favorite hackers -- Ken Thompson.

答案1

得分: 3

Hugo目前没有增量构建功能。即将发布的Hugo 0.16版本将在服务器监视模式下进行更智能的构建(即它将检测您所更改的内容并仅读取该部分,测试表明在常见情况下可以提高约15%的性能),但构建仍将包括所有内容。

这个问题最终会得到解决,但以简单的方式解决是一个困难的问题...不过Hugo在其所做的事情上非常非常快速。

英文:

Hugo currently has no incremental builds. The upcoming Hugo 0.16 will be smarter about building in server watch mode (i.e. it will detect what you change and only read that, testing indicates a ~15% improvement in the common case), but the builds will still be everything.

It will eventually happen, but it is a hard problem to solve in a simple way... But Hugo is very, very fast at what it does.

huangapple
  • 本文由 发表于 2016年1月11日 12:59:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/34714442.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定