4.9 KiB
kewt
Pronounced "cute"
Go to the website
kewt is a minimalist ssg inspired by werc and kew
It's meant to be a static site generator, like kew but use only default (POSIX) tooling, like werc (and definitely unlike kew)
Features
- No dependencies
- Supports many embed types
- Automatic css variable replacement for older browsers
- Automatic inlining and embedding of many filetypes with
\![link]or\ - Inline html support
- MFM
$fontand\<plain>tags - Admonition support (that's what the blocks like the warning block below are called)
- RSS/Feed generation and Sitemap support
- Post creation via
--post
If you want to force a file to be inlined, use \!![] instead of \![]
Installation
You can clone the repository to use kewt.sh directly, or you can download the standalone executable, which bundles all dependencies into a single file:
curl -L -o kewt https://git.krzak.org/N0VA/kewt/releases/download/latest/kewt
chmod +x kewt
On Arch Linux, kewt is available on the AUR:
- kewt-bin — prebuilt standalone binary from the latest release
- kewt-git — built from the latest git source
Usage
./kewt.sh --help
./kewt.sh --new [title]
./kewt.sh --post
./kewt.sh --from <src> --to <out>
./kewt.sh [src] [out]
--new [title] creates a new site directory with a copied site.conf and a default index.md.
--post creates a new empty markdown file in the configured posts_dir with the current date and time as the name.
site.conf
title = "kewt"
style = "kewt"
dir_indexes = true
single_file_index = true
flatten = false
order = ""
home_name = "Home"
show_home_in_nav = true
nav_links = ""
nav_extra = ""
footer = "made with <a href="https://kewt.krzak.org">kewt</a>"
logo = ""
display_logo = false
display_title = true
logo_as_favicon = true
favicon = ""
generate_page_title = true
error_page = "not_found.html"
versioning = false
base_url = ""
generate_feed = false
feed_file = "rss.xml"
posts_dir = ""
titlesite titlestylestyle file name from./styles(without.css)dir_indexesgenerate directory index pages when missingindex.mdsingle_file_indexif a directory has one markdown file and noindex.md, use that file asindex.htmlflattenflatten sidebar directory levelsordercomma separated file/directory name list to order the sidebar (alphabetical by default)home_nametext for the home link in navigation (default: "Home")show_home_in_navshow home link in navigation (default: true)nav_linkscomma separated extra nav links, as bare URLs or Markdown links like[Label](https://example.com)nav_extraraw HTML appended inside the<nav>after the generated link listfooterfooter html/text shown at the bottom of pageslogologo image path (used in header if enabled)display_logoshow logo in headerdisplay_titleshow title text in headerlogo_as_faviconuselogoas faviconfaviconexplicit favicon path (used whenlogo_as_faviconis false or no logo is set)generate_page_titleautomatically generate title text from the first markdown heading or filename (default: true)error_pagefilename for the generated 404 error page (default: "not_found.html", empty to disable)versioningappend a version query parameter (?v=timestamp) to css asset urls to bypass cache (default: false)base_urlabsolute URL of the site, used for sitemap and RSS feed generationgenerate_feedenable RSS feed generation (requiresbase_url)feed_filefilename for the generated RSS feed (default: "rss.xml")posts_dirdirectory name containing posts (e.g., "posts"). Enables reverse-chronological sorting, title headings in indexes, and automatic backlinks.
Ignores
.kewtignore: Files/directories to ignore. If empty, the whole directory gets ignored.kewthide: Files/directories to hide from navigation but still process. Same empty rules as with ignore.kewtpreserve: Files/directories to copy but not convert markdown to html. Same empty rules again
Embeds
\![link]:- local image/audio/video files are embedded as media tags
- local text/code files are inlined directly
- global image/audio/video links are embedded as media tags
- other global links are embedded as
<iframe>
\works the same, withaltused for images\!![]and\!force inline local file contents
Credits
Warning
Most of this was coded at night, while sleepy and a bit sick, and after walking for about 4 hours around a forest, so...