Follow @mkws_sh

mkws(1)


Docs

  1. Requirements
  2. Installation
  3. Make web site
  4. Markdown
  5. Recommendations

Requirements

A UNIX like operating system is recommended like macOS, GNU/Linux or BSD variant. Also, familiarity with the command line is good to have. mksh(1) can also run on Windows via the Windows Susbystem for Linux .

Installation

You'll have to get the archive from https://mkws.sh/mkws@1.0.tgz. Once you have the archive, unarchive it and rename the newly created directory:


mkdir -p ~/src/
cd ~/src/
tar -xzfv ~/Downloads/mkws@1.0.tgz
mv ws.sh example.com

Make web site

Create an index.upphtml file, it will be preprocessed with pp(1), and run ./bin/mkws with the url of your web site:


cd example.com
cat <<EOF > index.upphtml
<p>
#!
echo hello, world
#!
</p>
EOF
./bin/mkws https://example.com

You can create more *.upphtml files to make additional pages. You can edit the ./share/l.upphtml file to create a set of navigation links.


<nav>
<ul>
	<li>
		<a href=/>Home</a>
	</li>
	<li>
		<a href=about.html>About</a>
	</li>
	<li>
		<a href=contact.html>Contact</a>
	</li>
</ul>
</nav>

Also, you can always modify your ./bin/mkws script, if it's the case.

Markdown

For Markdown, we recommend smu(1). Just:


#!
	smu file.md
#!

in your *.upphtml files.

Recommendations

You can use entr(1) to rebuild your web site, devd to preview and live reload, and the Nu Html Checker for validating your html files.

Also you can use, linters(5) to lint your files. We recommend creating a pre-commit file and put it in your PATH, preferably ~/bin.


#!/bin/sh

for f in *
do
t=$(file -bi "$f")
test ${t#text} == $t && continue
lis "$f"
lts "$f"
lml "$f"
lfn "$f"
ltn "$f"
done

Download

It's a good idea to read the docs before downloading.

mkws@1.0.tgz

The package contains an amd64 pp(1) statically compiled binary, the mkws sh(1) script and the base theme. OpenBSD only for now, GNU/ Linux coming soon.

You can also download the sources.