42 lines
1.9 KiB
Markdown
42 lines
1.9 KiB
Markdown
|
---
|
||
|
title: >-
|
||
|
Sculpin - the PHP static site generator
|
||
|
date: 2024-01-06
|
||
|
permalink: archive/2024/01/06/sculpin-the-php-static-site-generator
|
||
|
snippet: |
|
||
|
Do you use PHP? Sculpin is a static site generator written in PHP, and turns markdown files and Twig templates into static HTML
|
||
|
|
||
|
#php #phpc #sculpinphp @getsculpin
|
||
|
tags: []
|
||
|
---
|
||
|
|
||
|
If you use PHP and need to make a static website, [Sculpin](https://sculpin.io) is a great choice!
|
||
|
|
||
|
## What is it?
|
||
|
|
||
|
Built with PHP and using Symfony components, it converts Markdown files and Twig templates into static HTML that can be easily deployed and hosted.
|
||
|
|
||
|
Once generated, you can upload the files to a web host of your choice as the generated files are simple HTML, such as an S3 bucket with static hosting or GitHub Pages.
|
||
|
|
||
|
## Why do I use it?
|
||
|
|
||
|
As a PHP Developer, it's already familiar and I can immediately start instead of learning a new language or templating engine, which I'd need to do if I were to use a static site generator written in Ruby, JavaScript or Go.
|
||
|
|
||
|
If I need to extend it, I already can.
|
||
|
|
||
|
I already know how to write custom Twig extensions, for example, so I can do it in Sculpin in the same way. ([I made one][markdown extension] and open-sourced it)
|
||
|
|
||
|
I already know how to use PHPUnit to write tests.
|
||
|
|
||
|
## What do I use it for?
|
||
|
|
||
|
I use Sculpin for [this website](https://github.com/opdavies/oliverdavies.uk) and client projects that don't need the features of a CMS or framework with the ability to have reusable components and functionality provided by Twig (this works great with Tailwind CSS, too).
|
||
|
|
||
|
I used it to [learn Twig before Drupal 8 was released][talk1], back in 2015.
|
||
|
|
||
|
I've also given a talk on [building websites with Sculpin][talk2] which I may submit to some upcoming conferences.
|
||
|
|
||
|
[markdown extension]: https://github.com/opdavies/sculpin-twig-markdown-bundle
|
||
|
[talk1]: {{site.url}}/test-drive-twig-with-sculpin
|
||
|
[talk2]: {{site.url}}/building-static-websites-sculpin
|