How to Create Your First PHP Twig Static Website under 2 Minutes with Statie
As you can see, Static websites are on the rise in PHP and they were never used more than now. It's time to make creating a new static website simple for everyone.
Until today, to create and understand static website basics, you had to learn:
- Statie - part 1: How to run it Locally
- Statie - part 2: How to add Contact Page With Data
- Statie - part 3: How to Add Reusable Parts of Code
- Statie - part 4: How to Create The Simplest Blog
Don't read it! It's an utter waste of time.
In recent years, there is a trend towards embodied knowledge:
- Do you understand semver and compare package dependencies? - No, you use Composer.
- Do you test your code against every PHP type? - No, you use PHPStan.
- Do you type manually method names or class names? - No, you use PHPStorm (or any other IDE).
- Do you upgrade your code manually? - No, you use Rector.
In other words, the knowledge is shifting from human brain storage to tool's abilities.
Not the smart knowledge that helps us create algorithms, but the dummy knowledge like "what is the 3rd most largest river in the USA" that I can Google in 2-3 seconds (depending on internet connection in the train). We don't become retarded, we become more powerful to use our brains for what they're best at.
composer require symplify/statie
Statie 5.3 brings 1 new command:
See how it works:
Do you prefer Latte over Twig?
vendor/bin/statie init --templating latte
Explore the files to find hints on how to use templates, even if you never used Twig or Latte ever before ( ← embodied knowledge).
Great job! You're up and running locally.
Do you want to finish the Travis → Github Pages deployment? Just follow the official documentation.