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:
- How to install and configure StaticForge
- Creating content with Markdown
- Using frontmatter metadata
- Organizing content with categories
- Adding tags to your posts
- Customizing templates
Prerequisites
Before you begin, make sure you have:
- PHP 8.5 or higher installed
- Composer for dependency management
- Basic knowledge of Markdown
- A text editor of your choice
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
- Explore the Configuration Guide
- Learn about custom features
- Check out more examples
Happy building! 🚀