Only in mkws/4.0.7/mkws: HOWTO
diff -urP mkws/4.0.7/mkws/README mkws/4.0.8/mkws/README
--- mkws/4.0.7/mkws/README Wed Jan 13 20:37:24 2021
+++ mkws/4.0.8/mkws/README Tue Mar 16 15:58:32 2021
@@ -5,8 +5,8 @@
## Requirements
-We provide statically compiled binaries for [Linux](mkws@4.0.7.tgz)
-or [OpenBSD](mkws-openbsd@4.0.7.tgz). It can also run on
+We provide statically compiled binaries for [Linux](mkws@4.0.8.tgz)
+or [OpenBSD](mkws-openbsd@4.0.8.tgz). It can also run on
[Windows](https://www.microsoft.com/windows) via the
[Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
for other UNIX like operating systems, you
@@ -15,10 +15,10 @@
## Install `mkws`
On a Linux machine, just download the archive from
-[https://mkws.sh/mkws@4.0.7.tgz](https://mkws.sh/mkws@4.0.7.tgz) or in
+[https://mkws.sh/mkws@4.0.8.tgz](https://mkws.sh/mkws@4.0.8.tgz) or in
the terminal, assuming `wget` is installed, type:
- wget -O - https://mkws.sh/mkws@4.0.7.tgz | tar -xzvf -
+ wget -O - https://mkws.sh/mkws@4.0.8.tgz | tar -xzvf -
## File Hierarchy
@@ -32,7 +32,7 @@
`-- share
|-- l.upphtml
|-- man
- | -- man1
+ | `-- man1
| |-- lmt.1
| |-- mkws.1
| `-- pp.1
@@ -156,6 +156,64 @@
</body>
</html>
+
+To create new pages, just add new `*.upphtml` files in the `.` root directory,
+`mkws` automatically scans for them. You can create an `aboutus.upphtml`
+or a `contact.upphtml` file for example to generate an `aboutus.html`
+or a `contact.html` page.
+
+For further customizations you can always modify your
+`./bin/mkws` or `./share/l.upphtml` files, in
+fact, it's recommended.</p>
+
+## Templates
+
+`mkws` uses `*.upphtml` files as templates which are processed via
+[`pp`](https://mkws.sh/pp.html), a preprocessor that allows embedding
+[`sh`](
+https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html)
+code in files of any type by nesting it inside the `#!\n` token, where
+`\n` is a new line.
+
+As an example, for the following code:
+
+ <ul>
+ #!
+ i=1
+ while test $i -le 10
+ do
+ if test $((i % 2)) -eq 0
+ then
+ #!
+ <li class=even>$i</li>
+ #!
+ else
+ #!
+ <li class=odd>$i</li>
+ #!
+ fi
+ i=$((i + 1))
+ done
+ #!
+ </ul>
+
+`pp` outputs:
+
+ <ul>
+ <li class=odd>1</li>
+ <li class=even>2</li>
+ <li class=odd>3</li>
+ <li class=even>4</li>
+ <li class=odd>5</li>
+ <li class=even>6</li>
+ <li class=odd>7</li>
+ <li class=even>8</li>
+ <li class=odd>9</li>
+ <li class=even>10</li>
+ </ul>
+
+This means you can script your templates in any way you prefer using
+preferably, standard `UNIX` tools for portability reasons.
## Note