bserver Documentation

bserver is a YAML-driven web server that generates HTML pages from structured definitions. Write YAML, get HTML.

Key Features

How It Works

Every page starts from html.yaml, which references head and body. The body references header, main, and footer. Your page defines main to set its content. Names are resolved by searching for matching YAML files, starting in the current directory and walking upward.

Quick Example

A minimal page needs just an index.yaml file:

main:
  - h1: "Hello World"
  - p: "Welcome to my site."

This produces a complete HTML page with doctype, head, body, navbar, and footer - all from a few lines of YAML.

Installation

Requires Go 1.24 or later. Clone the repository, build, and install as a service:

git clone https://github.com/stgnet/bserver.git
cd bserver
go build -o bserver
sudo ./install-service.sh

This compiles bserver and installs it as a service using systemd (Linux) or launchd (macOS). The service starts automatically and is enabled on boot.

To update and restart after pulling new changes:

git pull
go build -o bserver
sudo ./install-service.sh restart

To uninstall the service:

sudo ./install-service.sh remove

Documentation

Use the navigation above to explore, or choose a topic:

Getting Started Content Definitions Format Definitions Built-in Components Server-Side Scripts Advanced Features