Pages

Thursday, 19 March 2020

一个基于rust的静态博客程序-zola

登陆linux vps.首先安装rust环境,然后,
git clone https://github.com/getzola/zola
cd zola
cargo build --release
完成后,可执行文件zola会出现在当前目录下的target/release目录。
target/release/zola -h
cd target/release
./zola init zola-site (此命令会在当前目录下,生成zola-site目录)
cd zola-site
root@racknerd-626f077:~/zola/target/release/zola-site# ls
config.toml  content  sass  static  templates  themes
root@racknerd-626f077:~/zola/target/release/zola-site# ../zola build
Building site...
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 0 pages (0 orphan) and 0 sections
Done in 29ms.
root@racknerd-626f077:~/zola/target/release/zola-site# ls
config.toml  content  public  sass  static  templates  themes
root@racknerd-626f077:~/zola/target/release/zola-site#
root@racknerd-626f077:~/zola/target/release/zola-site# ls public
404.html            index.html  search_index.en.js
elasticlunr.min.js  robots.txt  sitemap.xml
root@racknerd-626f077:~/zola/target/release/zola-site# cd public
root@racknerd-626f077:~/zola/target/release/zola-site/public# python3 -m http.server 1234


项目地址:https://github.com/getzola/zola
https://www.getzola.org/documentation/getting-started/installation/
------------------------------------------------------

配置太繁琐,不建议使用此程序。