# Getting Started

This guide will help you create your first bok site.

# Prerequisites

You need Bun installed:

curl -fsSL https://bun.sh/install | bash

# Installation

# From Source

git clone https://github.com/alajmo/bok
cd bok
bun install

# Global Install

After cloning, you can install bok globally:

make install

This creates a bok command you can run from anywhere.

# Create a New Site

# Interactive Mode

Run the init command and follow the prompts:

bok init

You'll be asked to:

  1. Choose extend (use existing theme) or create (copy theme files)
  2. Select a theme: basic or book

# Non-Interactive Mode

# Extend the book theme
bok init --mode extend --theme book

# Project Structure

After initialization, your project looks like this:

my-site/
├── config.ts        # Site configuration
└── content/
    ├── toc.md       # Table of contents (page order)
    ├── index.md     # Home page
    └── ...          # Your markdown pages

# Development Workflow

# Start the Dev Server

bok serve config.ts

This will:

  • Build your site to the output directory
  • Start a local server at http://localhost:5000
  • Watch for file changes and rebuild automatically
  • Reload your browser when files change

# Build for Production

bok build config.ts

The generated site will be in the site/ directory (or whatever you configured as paths.output).

# Adding Pages

  1. Create a new .md file in content/:
# My New Page

This is my new page content.
  1. Add it to content/toc.md:
- [My New Page](my-new-page.md)
  1. Save and watch the browser reload with your new page.

# Next Steps