Skip to content
A simple Static Site Generator using PHP
PHP HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
posts
src
templates
.gitignore
README.md
composer.json
composer.lock
config.yaml
index.php

README.md

php-ssg

A simple Static Site Generator using PHP

Disclaimer

This is not a well-supported Static Site Generator. It is a weekend project to experiment with an interesting approach to build static websites using PHP. Feel free to fork and experiment as well.

Installation

You need to have composer installed. Follow these instructions to install it.

git clone https://github.com/filkaris/php-ssg
cd php-ssg
composer install

Configuration

Edit these values in config.yaml

config:
  title: "My Awesome Blog"
  subtitle: "Filippos Karailanidis"

Usage

To write a new post, create a markdown file inside posts/

vim posts/my-new-post.md

Fill in important metadata on top of the file

---
title: My First Post
date: Fri 12 Jul 2019 06:21:09 PM EEST
summary: "(The summary of said first post)"
---

Run the local server

composer server

Visit http://localhost:8080

Build

To build everything into a static website in the dist/ folder:

composer build

Deploy the dist/ folder anywhere online

You can’t perform that action at this time.