Getting Started with StaticForge

Welcome to this comprehensive tutorial on building static sites with StaticForge, a powerful PHP-based static site generator.

What You'll Learn

In this tutorial, you'll learn:

Prerequisites

Before you begin, make sure you have:

Installation

First, install StaticForge using Composer:

composer create-project staticforge/staticforge my-site
cd my-site

Configuration

Copy the example environment file:

cp .env.example .env

Edit .env to configure your site:

CONTENT_PATH=content/
OUTPUT_PATH=public/
TEMPLATE_NAME=staticforce

Creating Content

Create your first content file using the CLI:

php vendor/bin/staticforge.php make:content "Hello World"

This creates content/hello-world.md with the necessary frontmatter. Open it and add your content:

---
title: "Hello World"
date: "2026-02-12"
---

# Hello World!

This is my first post with StaticForge.

Generating Your Site

Run the render command:

php bin/staticforge.php site:render

Your site is now in the public/ directory!

Next Steps

Happy building! 🚀