about summary refs log tree commit diff
path: root/README.md
blob: c2c54a9b126188f884f946a8d3220e0d6109ea03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Vokobe

A minimal static site generator tailored to my needs.

CI: [https://hydra.emile.space/project/vokobe](https://hydra.emile.space/project/vokobe)

## Build

```bash
; cargo build --release
```
    
## Usage/Examples

```bash
; ./target/release/vokobe --help
vokobe 0.1.0
A static site generator

USAGE:
    vokobe [FLAGS] <in-path> <out-path> <site-name>

FLAGS:
    -a, --analytics    Activate sending analytics to stats.emile.space
    -h, --help         Prints help information
    -V, --version      Prints version information

ARGS:
    <in-path>      Input path
    <out-path>     Output path
    <site-name>    Site name (e.g. emile.space)
```


## Deployment

The following subsections contain some example for small shell scripts that might be useful for Deployment.

### build.sh

Remove the output dir, build it from scratch and update the perms.

I'm actually considering rebuilding vokobe with incremental builds in mind, as it can take a bit to create some really large projects.

```bash
rm -rf out/
vokobe -a ./in ./out emile.space
chmod -R +r out/
```

### sync.sh

Syncronize the generated output to the remote host for hosting it.

```bash
rsync -avz --delete <out-path>/* <user>@<host>:<path>
```

### publish.sh

Build and Syncronize.

```bash
./build.sh
./sync.sh
```

### host.sh

Host the local version

```bash
python3 -m http.server 8081 -d <outpath>/ -b 0.0.0.0
```

### watchbuild.sh

rebuild on changes

```bash
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p fd entr

while sleep 0.5; do
  fd . in | entr -d ./build.sh
done
```

### local.sh

run a script updating it on changes and one hosting the output.

```bash
sh ./watchbuild.sh &
sh ./host.sh
```


## Contributing

Send patches!