Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kushaldas/khata
Look at https://kushaldas.in for the result
https://github.com/kushaldas/khata
Last synced: about 1 month ago
JSON representation
Look at https://kushaldas.in for the result
- Host: GitHub
- URL: https://github.com/kushaldas/khata
- Owner: kushaldas
- License: gpl-3.0
- Created: 2019-08-09T17:04:05.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-09-10T16:13:02.000Z (about 2 years ago)
- Last Synced: 2024-05-01T15:27:02.116Z (6 months ago)
- Language: CSS
- Homepage:
- Size: 297 KB
- Stars: 8
- Watchers: 4
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Khata: The writing pad
This is the Rust implementation of
[Shonku](https://shonku.readthedocs.io/en/latest/) project.This is kind of stable, I am using it for long enough now for [my blog](https://kushaldas.in).
## Need nightly rust
```bash
rustup default nightly
```## To build from the source for normal systems
```bash
cargo build --features shadow --release
```The `shadow` feature will enable `-e/--exe` to get details about the executable.
But, in case you want to run it under [WASI](https://wasi.dev/), then build it using the following command.```bash
cargo build --target wasm32-wasi --release
```## How to use?
You will the following directory structure.
```text
|-> templates
|-> pages
|-> posts
|-> output
|
|-> posts
|-> pages
|-> categories
|-> assets
```You can make them all as
```bash
mkdir -p pages posts output/{posts,pages,categories}
cp -r assets output/
```## To use WASI
```bash
cp ./target/wasm32-wasi/release/khata.wasm ./
wasmtime --dir=. khata.wasm -- -h
```### Create a new blog post
```bash
./khata --new
wasmtime --dir=. khata.wasm -- --new
```### Build the posts after any change
```bash
./khata
wasmtime --dir=. khata.wasm
```To build the updated/new posts.
### To rebuild the whole site
```bash
./khata --rebuild
wasmtime --dir=. khata.wasm -- --rebuild```
To rebuild the whole site.
### To view the help
```bash
./khata -h
wasmtime --dir=. khata.wasm -- -h
```To view all the help options.
We have default templates and assets in the git repo.
### To view which binary you are using (when you enable shadow feature)
```bash
./khata -e
```