如何加快Jekyll/Octopress的生成速度? [英] How to speed up Jekyll/Octopress generation?

查看:53
本文介绍了如何加快Jekyll/Octopress的生成速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Octopress作为我的博客引擎.这是完美的.但是,如果有很多帖子,例如400多个帖子,那么生成速度就太慢了.

I'm using Octopress as my blog engine. It's perfect. But if there are many posts, for example 400+ posts, the speed of generation is soooo slow.

那么,有什么方法可以加快Jekyll/Octopress的生成速度吗?

So, is there any way to speed up Jekyll/Octopress generation?

谢谢.

推荐答案

很显然,如果您只撰写一篇文章,则无需等待整个网站生成.您正在寻找的是rakeisolate [partial_post_name]任务.
使用rake isolate,您可以仅隔离"正在处理的帖子,然后将所有其他帖子移至source/_stash文件夹. partial_post_name参数只是帖子的文件名中的一些单词.例如,如果我想将帖子与前面的示例隔离开,则可以使用

Obviously if you are just working on one post, there is no need to wait for the entire site to generate. What you are looking for is the rake isolate[partial_post_name] task.
Using rake isolate, you can "isolate" only that post you are working on and move all the others to the source/_stash folder. The partial_post_name parameter is just some words in the file name for the post. For example, if I want to isolate the post from the earlier example, I would use

rake isolate[plain-english]  

这会将所有其他帖子移动到source/_stash,并且仅将2011-09-29-just-type-the-title-of-the-post-here-in-plain-english.markdown帖子保留在source/_posts中.您也可以在运行rake preview时执行此操作.它只会检测出巨大​​的变化,并从那时起仅重新生成一个帖子.

This will move all the other posts to source/_stash and only keep the 2011-09-29-just-type-the-title-of-the-post-here-in-plain-english.markdown post in source/_posts. You can also do this while you are running rake preview. It will just detect a massive change and only regenerate that one post from then on.

@Pavan Podila
更多信息:加快Octopress网站生成的提示

by @Pavan Podila
More Info: Tips for Speeding Up Octopress Site Generation

2013.01.08更新:
十六进制-一种快速,简单的&由Node.js提供支持的强大博客框架.
功能:速度超快-生成静态文件一目了然

2013.01.08 update:
Hexo--A fast, simple & powerful blog framework, powered by Node.js.
Features:Incredibly fast - generate static files in a glance

2013.6.20更新:
gor -用Go语言编写的静态网站和博客生成器引擎
gor有以下令人敬畏的好处: 1.速度-在wendal.net上编译我近200个博客时不到1秒.2.简单-编译后仅生成一个可执行文件,没有其他依赖项

2013.6.20 update:
gor -- A static websites and blog generator engine written in Go
gor has following awesome benefits: 1. Speed -- Less than 1 second when compiling all my near 200 blogs on wendal.net 2. Simple -- Only one single executable file generated after compiling, no other dependence

这篇关于如何加快Jekyll/Octopress的生成速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆