搭建基于rust的静态博客程序rsw

$ git clone https://github.com/tjz101/rsw
$ cd rsw
$ cargo build --release (在当前目录下,会生成target/release/目录)
$ ls target/release/
build/  examples/     librsw.d     rsw.d     rsw.pdb
deps/   incremental/  librsw.rlib  rsw.exe*
$ target/release/rsw.exe -h
RustWriter 0.1.4
dev-tang <dev-tang@outlook.com>
Simple, free and happy

USAGE:
    rsw.exe [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    build    build project
    help     Prints this message or the help of the given subcommand(s)
    new      new project
$ target/release/rsw.exe new rsw-site (此命令会在当前目录下,生成rsw-site目录)
$ cd rsw-site
$ ~/rsw/target/release/rsw.exe build (这个就是生成/更新静态网站的根目录的命令。此命令会在当前目录下,生成build目录)
$ ls build
index.html
$ cd src
$ nano hf.md
$ cat hf.md
显示:
---
title: 快乐的节日
author: RustWriter
template: index
---

此处写正文或html codes.

$ cd ~/rsw/rsw-site/
$ ~/rsw/target/release/rsw.exe build

不过生成的~/rsw/rsw-site/目录的结构太简单了,依据它搭建出来的静态网站上面并不显示已发表的帖子。
$ cd ..

~/rsw$ git clone https://github.com/maoyutofu/rsw-example rsw-site2
cd rsw-site2

$ ~/rsw/target/release/rsw.exe build
create build/css
public/css/index.css -> build/css/index.css
public/css/post.css -> build/css/post.css
thread 'main' panicked at src/main.rs:21:50:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "系统找不到指定的文件。" }

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

from 

https://gitee.com/dev-tang/rsw