The static site generator and generated static site for MergePHP
This project's dependencies are installed with composer.
You must have PHP 8.3 running on your machine (or be willing to build in a container with 8.3 installed)
git clone https://www.github.com/mergephp/mergephp-website
cd mergephp-website
composer install
To generate a new meetup, run the following:
composer generate
You will be prompted for data for the meetup, then a new file will be placed in src/Meetup
.
Next, build the site by running
composer build
Important: You must run build every time you are changing meetup data or any files in the
public
or templates
directories. This will re-generate the docs
directory. Verboseness
can be controlled with -v
to -vvv
switches
To view the site:
composer serve
A server with the site will be available at http://localhost:8000/
Finally, you can commit all your changes, keeping everything in the same commit and squashing if necessary. Then, open a pull request with your changes.
If you are only modifying meetup data or any files in the public
or templates
directories
then the following is not necessary. However if you make changes to other files in src
:
First, check that your code meets the project's code style:
composer lint
If there are errors that can be fixed automatically, run
composer fix-lint-errors
Finally, run the tests:
composer test
The live copy of the site is here. It is under version control because GitHub pages serves the site directly from this folder. Do not add or modify any files in this directory by hand; any changes will be lost in the next build.
If you make changes to any files, the changes to the docs
directory must be in the same commit.
Note: dist
would be a better name for this folder, but due to GitHub limitations it must
be named docs.
Files that need to be available on the live site (for example images and stylesheets) are in this folder. Its entire contents be copied to the live site, retaining their exact paths.
This folder contains the source code to build the site as well as all the Meetup data.
This folder contains twig templates for layouts of various pages.
All unit tests are in this directory
Sculpin proved not to be customizable enough with regard to custom archive pages. No other static site generators offered a featureset comparable Sculpin or what has been built in this project.