inits http ssg with mkws

This commit is contained in:
2026-05-12 20:56:32 +01:00
parent 512f130117
commit eb48cdb9a3
17 changed files with 1042 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
.Dd Sep 4, 2020
.Dt lmt
.Os
.Sh NAME
.Nm lmt
.Nd last modification time
.Sh SYNOPSIS
.Nm lmt
.Op Fl f Ar format
.Ar file ...
.Sh DESCRIPTION
The
.Nm
utility prints the last modification time for the given
.Ar file
to standard output.
The information displayed is obtained by calling
.Xr lstat 2
with the given
argument and evaluating the returned structure.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl f Ar format
The format in which to display the time.
The format string may contain any of the conversion specifications
described in the
.Xr strftime 3
manual page, as well as any arbitrary text.
A newline
.Pq Ql \en
character is always output after the characters specified by
the format string.
The format string for the default display is:
.Bd -literal -offset indent
%a %b %e %H:%M:%S %Z %Y
.Ed
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
Print last modification time for
.Pa file1
to standard output:
.Pp
.Dl $ lmt file1
.Pp
Print last modification time for
.Pa file1
to standard output in ISO 8601 format:
.Pp
.Dl $ lmt -f "%Y-%m-%dT%H:%M:%S%z" file1
.Sh SEE ALSO
.Xr stat 1
.Xr strftime 3
+91
View File
@@ -0,0 +1,91 @@
.Dd Dec 13, 2019
.Dt mkws 1
.Os
.Sh NAME
.Nm mkws
.Nd make web site
.Sh SYNOPSIS
.Nm
.Ar url
.Op path
.Sh DESCRIPTION
The
.Nm
utility uses
.Xr pp 1
and the theme files in the
.Ev MKWSTHEMEPATH
directory
to preprocess all files in
.Op path
in order to produce a static web site in the current directory. If no
.Op path
is specified, the current directory is used instead.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Ar url
The url of the web site. It is used for generating
.Pa sitemap.xml
.
.It Op path
The path where the unpreprocessed files are located. If no
.Op path
is specified, the current directory is used instead.
.El
.Sh ENVIRONMENT
.Bl -tag -width MKWSTHEMEDIR
.It Ev MKWSTHEMEDIR
The directory containing the theme files. See the
.Em FILES
section for the minimum required files for a theme. If no
.Ev MKWSTHEMEDIR
variable is set
.Pa [path]/share
wil be used.
.It Ev LANG
The language for the website. It will be parsed to fill in the
.Em lang
attribute of the
.Em html
element and then
.Em charset
.Em meta
element.
.El
.Sh FILES
.Bl -tag -width "/tmp/vi.recover
.It Pa $MKWSTHEMEDIR/l.upphtml
The layout file of the website. It contains the
.Em DOCTYPE ,
.Em html ,
.Em head ,
.Em title ,
.Em meta
,
.Em link
,
.Em body
elements.
.It Pa $MKWSTHEMEDIR/sitemap.xml
The
.Pa sitemap.txt
template.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
Make https://example.com web site using the unpreprocessed files in the
current directory
.Pp
.Dl $ mkws https://example.com
.Pp
Make https://example.com web site using the unpreprocessed files in the
.Ar ~/src/ws
directory
.Pp
.Dl $ mkws https://example.com ~/src/ws
.Sh SEE ALSO
.Xr sh 1
.Xr pp 1
.Xr locale 1
+46
View File
@@ -0,0 +1,46 @@
.Dd Apr 25, 2019
.Dt pp 1
.Os
.Sh NAME
.Nm pp
.Nd preprocessor
.Sh SYNOPSIS
.Nm pp
.Op Fl d
.Ar file
.Op args ...
.Sh DESCRIPTION
The
.Nm
utility processes
.Ar file
to produce output that is used as input to another
program.
.Pp
It executes code enclosed in
.Dq #!\en
delimiters using
.Xr sh 1 .
.Op args ...
are passed to the embbeded script and are available
via the usual
.Em $1, $2, ...
positional parameters.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl d
.Nm
will dump the generated
.Xr sh 1
code instead of executing it. This is useful for debugging.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
Preprocess file with arguments:
.Pp
.Dl $ pp file.upphtml a b
.Pp
.Sh SEE ALSO
.Xr sh 1