用wget和rsync转换博客到静态页面

On 2011年04月28日, in tips, by netoearth

如果你有一个博客,你不再想保留的互动,你可以使用两个小命令行工具,wget和rsync的,可以轻松地转换成静态站点您的博客。

Wget is a handy little tool that we’ve featured before as a way to mirror an entire website, schedule downloads, automatically download music, and more. It’s available for Mac OS X, Windows, and Linux (usually installed already).

Rsync is another ancient utility for file mirroring (we’ve seen it handy for mirroring folders between a Mac and PC and syncing two iTunes libraries).

This tip from One Thing Well for converting a blog into a static site involves really only two commands. In wget:

wget -m -p -P ~/website example.com

And then later, after the download finishes, in rsync:

rsync -avz --delete ~/website/ me@example.com:path/to/website

You’ll want to replace the “example.com” and “me@example.com” to match your site. Photo remixed from an original by Jinho.Jung

Tagged with:  

Comments are closed.