1.5.0
This is a pretty big release for Cleaver, the following changes and additions have been added:
- Markdown is now compiled with parsedown-extra, giving you the ability to add things like class names easily to your content
- The command
php cleaverhas been replaced withphp cleaver build, and the CLI system has been overhauled to use Symfony's Console Command component - You can specify single pages to build by referencing either the content item or the output path in the build command (e.g.
php cleaver build posts/2020/test-post.json) - The entire site's content files are imported under a
$cleavervariable as a Laravel collection, giving you the ability to sort, filter, and loop through parts of your site's content for things like article category pages - External JSON files can now be imported into content by storing them in a
resources/datadirectory and then referencing their path in your content file's JSON (see hello-world.json for an example of this) - External URLs that return JSON can be imported into content by adding them under any heading in your content's JSON file, as long as the url is prepended with
json: - The BrowserSync feature has been modified to work alongside webpack-dev-server, running
npm run watchwill spin up that server on port:8080while the hot-reload version of your site will be available at port:3000 - By default, tailwind's build-in purge system has been added in to remove any unused classes from the rendered CSS. This can be disabled by clearing out the
purgearray in tailwind.config.js - The
pathvariable can be excluded from JSON and Markdown files, and will auto-generate based on the location and filename of your content files. For example, a file atresources/content/posts/2020/test.jsonwill render atexample.com/posts/2020/test - The CLI output shown while building a site has been updated for both style and substance. Error messages, build times, and runtime hints are more clear and helpful