How to set up Weibian [0007]

Weibian is implemented in Rust. To set up Weibian on your local machine, you can either install using cargo:

cargo install --locked --git https://github.com/hanwenguo/weibian.git
cargo install --locked --git https://github.com/hanwenguo/weibian.git

Or download the prebuilt binary from the releases page.

Weibian uses a simple project structure to organize your notes and resources. Say you have a directory called notes/ to store all your notes. Usually, you would want to have a structure like this:

notes/
├── .wb/ # Weibian configuration and templates
│ ├── config.toml # Configuration file (optional)
│ ├── templates/ # HTML templates
├── public/ # Resource files to be copied to output directory
│ └── ...
├── dist/ # Default output directory
│ └── ...
└── typ/ # Note files in Typst format
└── ...
notes/
├── .wb/ # Weibian configuration and templates
│ ├── config.toml # Configuration file (optional)
│ ├── templates/ # HTML templates
├── public/ # Resource files to be copied to output directory
│ └── ...
├── dist/ # Default output directory
│ └── ...
└── typ/ # Note files in Typst format
└── ...

Most of the above directories is the default configuration, which can be overridden by passing command line arguments when running Weibian. The .wb directory is necessary for now, since it keeps the HTML template files and configuration file (if any). You must create the .wb directory manually for now; in the future, Weibian may provide a command to initialize a project structure automatically.