statamic / ssg

The official Statamic Static Site Generator
232 stars 24 forks source link

Support generating individual URLs #137

Closed simonhamp closed 1 year ago

simonhamp commented 1 year ago

Edit by @jesseleite: We decided to pass urls as args instead... ie. php please ssg:generate /about /contact


Occasionally, you just want to build a specific page or a set of pages. With this new --url option you can do just that:

php please ssg:generate --url=/about --url=/contact

This will attempt to generate only these two pages and no more. It also doesn't clear the entire build directory

jesseleite commented 1 year ago

Love this feature PR, thanks! ❤️

We discussed, and I reworked to pass in as args instead of requiring --url option flags...

CleanShot 2023-07-13 at 12 41 34

Which is nice and clean in practice...

CleanShot 2023-07-13 at 12 40 54

Just going to add a some tests here once #140 gets merged, as I added some basic generator test coverage over there 👍

simonhamp commented 1 year ago

Agreed, much nicer!