aboutsummaryrefslogtreecommitdiffstats
path: root/man/ssg-serve.1
diff options
context:
space:
mode:
Diffstat (limited to 'man/ssg-serve.1')
-rw-r--r--man/ssg-serve.191
1 files changed, 48 insertions, 43 deletions
diff --git a/man/ssg-serve.1 b/man/ssg-serve.1
index ede5977..5d1ffd5 100644
--- a/man/ssg-serve.1
+++ b/man/ssg-serve.1
@@ -1,45 +1,50 @@
-.TH SSG-SERVE 1 "2026-01-01" "ssg" "General Commands Manual"
-.SH NAME
-ssg-serve \- serve the site locally
-.SH SYNOPSIS
-.B ssg serve
-.RI [ options ]
-.SH DESCRIPTION
-Start a local HTTP server to preview the built site.
-.SH OPTIONS
-.TP
-.BI \-dir " dir"
-Directory to serve. Default: dist
-.TP
-.BI \-addr " address"
-Address to listen on. Default: :8080
-.SH EXAMPLES
-Serve the default output directory:
-.PP
-.RS
-.nf
-$ ssg serve
-.fi
-.RE
-.PP
+.Dd January 2, 2026
+.Dt SSG-SERVE 1
+.Os
+.Sh NAME
+.Nm ssg-serve
+.Nd serve the built static site locally
+.Sh SYNOPSIS
+.Nm ssg serve
+.Op Fl h | -help
+.Op Fl d | -dir Ar dir
+.Op Fl p | -port Ar port
+.Sh DESCRIPTION
+.Nm
+starts a local HTTP server at
+.Lk http://localhost:8080
+to preview the built site.
+.Pp
+It is assumed that you have run
+.Xr ssg-build 1
+first. If not, the output directory may not exist and while the HTTP
+server will start up, any request to the server will result in a 404
+Not Found.
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl h , Fl -help
+Print brief usage information.
+.It Fl d Ar dir , Fl -dir Ar dir
+Relative path to a directory to serve. Default: dist
+.It Fl p Ar port , Fl -port Ar port
+Port to listen on. Default: 8080
+.El
+.Sh EXIT STATUS
+.Nm
+exits 0 on success, and >0 if an error occurs.
+.Sh EXAMPLES
+Serve the default output directory on the default port:
+.Dl $ ssg serve
+.Pp
Serve on a different port:
-.PP
-.RS
-.nf
-$ ssg serve -addr=:3000
-.fi
-.RE
-.PP
+.Dl $ ssg serve --port 9000
+.Pp
+Serve on a different output directory:
+.Dl $ ssg serve --dir build/
+.Pp
Build and serve:
-.PP
-.RS
-.nf
-$ ssg build && ssg serve
-.fi
-.RE
-.SH SEE ALSO
-.BR ssg-build (1)
-.SH SSG
-Part of the
-.BR ssg (1)
-suite.
+.Dl $ ssg build && ssg serve
+.Pp
+.Sh SEE ALSO
+.Xr ssg 1 ,
+.Xr ssg-build 1