WebKit is a lightweight and fast .NET tool for building static websites, blogs, and documentation from Markdown. It works as a cross-platform CLI (dotnet tool) designed for developers who want an easy and flexible site generator. With WebKit, you can turn Markdown into HTML, generate static sites, and create modern Jamstack-style projects without complex setups. Perfect for personal blogs, project documentation, and fast content-driven websites. Key features: * Cross-platform .NET CLI tool (`dotnet tool install`) * Markdown to HTML conversion * Static site and blog generator * Lightweight, fast, and developer-friendly * Ideal for Jamstack workflows and documentation sites
$ dotnet add package Boson.WebKitWebKit is a hybrid Markdown + HTML site engine written in C#.
It transforms simple .md pages into clean, responsive websites — with built-in layouts, dark/light mode, and expression support.
webkit.jsondotnet tool install -g Boson.WebKit
webkit init -n MySite
cd MySite
webkit build
webkit serve
Open http://localhost:3000 🎉
webkit.json
{
"Properties": {
"Name": "MySite",
"Author": "CodingBoson"
}
}
Access with expressions:
# Welcome to {{ .Name }} by {{ .Author }}
MySite/
├─ build/ # Generated output
├─ Resources/ # All resources live here
│ ├─ Pages/ # Markdown + hybrid HTML pages
│ ├─ Shared/ # Reusable components
│ ├─ Static/ # CSS, JS, images
│ └─ Layout.html # Global layout
├─ .gitignore
├─ README.md
└─ webkit.json # Site config
webkit init <Name> # Create new site
webkit build # Build static site
webkit serve # Run local dev server
webkit clean # Clear build output
The Layout.html in Resources/ defines the global wrapper for your pages.
Every page gets rendered inside this layout.
Example:
<!DOCTYPE html>
<html>
<head>
<title>{{ .Title }}</title>
<link rel="stylesheet" href="/webkit.css">
</head>
<body>
{{ .NavBar }}
<main>
{{ .Content }}
</main>
<footer>
<p>© {{ .Name }} by {{ .Author }}</p>
</footer>
</body>
</html>
In WebKit, shared components are just resources inside Resources/Shared/.
To use them:
Resources/Shared/ (e.g. NavBar.html)webkit.jsonResources/Shared/NavBar.html
<nav>
<a href="/">Home</a>
<a href="/About.html">About</a>
</nav>
webkit.json
{
"Properties": {
"Name": "MySite",
"Author": "CodingBoson",
// First, define a property in the `webkit.json` that references the shared HTML/markdown file. "NavBar": "@Shared/NavBar.html"
"NavBar": "@Shared/NavBar.html"
}
}
Layout.html
<body>
{{ .NavBar }}
<main>{{ .Content }}</main>
</body>
Shared/ specially. It’s just a folder convention..Name, .Author, or .NavBar, it’s the same expression system.This makes WebKit:
# Expressions
WebKit supports **expressions** inside Markdown and HTML.
They are written with double curly braces:
```markdown
{{ .Property }}
A Getter inserts the value of a property.
Example:
Welcome to {{ .Name }} by {{ .Author }}
With this config:
{
"Properties": {
"Name": "MySite",
"Author": "CodingBoson"
}
}
Result:
Welcome to MySite by CodingBoson
Properties in webkit.json can point to other resources, like files in Resources/Shared/.
{
"Properties": {
"NavBar": "@Shared/NavBar.html"
}
}
Now you can use:
{{ .NavBar }}
WebKit will inline the content of Resources/Shared/NavBar.html.
A SetterExpression allows you to define or override a property inside a page.
Syntax:
{{ .Property = value }}
Example:
{{ .Title = .Name Home }}
# Welcome to {{ .Name }}
Here:
.Title is set to "MySite Home"Layout.html (e.g., inside <title>)Setters can concatenate multiple values:
{{ .Title = .Name " - " .Author }}
With:
{
"Properties": {
"Name": "MySite",
"Author": "CodingBoson"
}
}
Result:
<title>MySite - CodingBoson</title>
When WebKit resolves an expression:
webkit.json Properties@Shared/...), load its contentThis makes expressions predictable:
To write an expression literally (without evaluating it), escape with \\:
\\{{ .Author }}
Result:
{{ .Author }}
Expressions are the glue of WebKit:
👉 No custom DSL. 👉 No templates-within-templates. 👉 Just properties + resources, flowing through the build pipeline.
GPL-3.0 © BosonWare Technologies