blob: 83e09ee948c4b09fe7374e9b3921da0fc8ca2711 (
plain) (
blame)
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
|
.Dd January 2, 2026
.Dt SSG-BUILD 1
.Os
.Sh NAME
.Nm ssg-build
.Nd build the site
.Sh SYNOPSIS
.Nm ssg build
.Op Fl h | -help
.Op Fl d | -data Ar dir
.Op Fl t | -templates Ar dir
.Op Fl s | -static Ar dir
.Op Fl o | -out Ar dir
.Op Fl q | -quiet
.Sh DESCRIPTION
.Nm
builds the static site by rendering HTML templates with the provided data into
the output directory and copying static files to the output directory.
.Pp
Templates are processed using Go's
.Lk https://pkg.go.dev/html/template html/template
package. See
.Xr ssg-templates 5
for template syntax and available functions.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl h , Fl -help
Print brief usage information.
.It Fl d Ar dir , Fl -data Ar dir
Data directory containing JSON files. Default: data
.It Fl t Ar dir , Fl -templates Ar dir
Templates directory containing HTML files. Default: templates
.It Fl s Ar dir , Fl -static Ar dir
Static files directory. Default: static
.It Fl o Ar dir , Fl -out Ar dir
Output directory. Default: dist
.It Fl q , Fl -quiet
Quiet mode. Only show errors.
.El
.Sh EXIT STATUS
.Nm
exits 0 on success, and >0 if an error occurs.
.Sh EXAMPLES
Build a site:
.Dl $ ssg build
.Pp
Build with custom directories:
.Dl $ ssg build --static assets --data content --templates layouts --out public
.Pp
Build with regular output silenced:
.Dl $ ssg build --quiet
.Pp
.Sh SEE ALSO
.Xr ssg 1 ,
.Xr ssg-serve 1 ,
.Xr ssg-templates 5
|