Follow Us

Download

It's a good idea to read the docs before downloading. mkws@4.0.3.tgz contains the amd64 Linux binaries.

Deploy to Netlify Deploy to Vercel

mkws(1)How Tos

A collection of How Tos for building sites with mkws(1)

How To Add a Navigation Menu

In order to add a navigation menu to your website, all you have to do is edit the ./share/l.upphtml file and add your navigation code there. Open up ./share/l.upphtml in your favorite text editor and add the following lines right below the body tag:

<header>
    <nav>
            <ul>
                    <li><a href=/>Home</a></li>
                    <li><a href=doc.html>Docs</a></li>
                    <li><a href=src.html>Sources</a></li>
                    <li><a href=contact.html>Contact</a></li>
            </ul>
    </nav>
</header>

Edit to match your website.

Then, regenerate your site using the mkws command:

./bin/mkws https://example.com

How To Add Custom Titles (or meta tags) For Each Page

As you can see, using ./share/l.upphtml to generate all our pages, means we have only one title tag for each page, hence all of our generated pages will have the same title. If we would prefer specific titles for each page, we would have to edit ./share/l.upphtml like in the following example:

<head>
#!
case "$1" in
./index.upphtml)
#!
<title>My Website</title>
<meta name=description content='Latest news about my website'>
#!
;;
./doc.upphtml)
#!
<title>Documentation</title>
<meta name=description content='Documentation for my website'>
#!
;;
./src.upphtml)
#!
<title>Sources</title>
<meta name=description content='Sources for my website'>
#!
;;
./contact.upphtml)
#!
<title>Contact</title>
<meta name=description content='Contact for my website'>
#!
;;
esac
#!
</head>

How To Render Markdown

Rendering Markdown is not at hard at all. Our favorite CLI tool for rendering Markdown is smu(1). You'll have to download it and install it on your system either via source or your operating systems's package manager. In order to use it, just add:

#!
	smu <file>
#!

to any of your *.upphtml files or create a new *.upphtml containing just the above code.

Future versions of mkws(1) may allow rendering Markdown directly from source, without creating an extra *.upphtml file.

Mentions

Share