Introducing Custom Build Commands

We’re excited to announce Custom Build Commands! You can now decide what build command should be run for your project.

Until now Forestry chose the build command that needed to be run for you, which worked fine for most cases. However, this meant that projects that needed a custom build process were unable to use Forestry’s deployment tools and (in some cases) previews.

Picking your own commands enables you to really choose your own workflow and give you the flexibility you need.


Custom Build Commands

When you add custom build commands to your project, Forestry will run those commands when creating a preview or preparing your site for deployment. Learn how to set up build commands.

build:
  preview_command: hugo -D -F -E
  publish_command: hugo
  output_directory: public
  ...

Sites with Frontend Asset Pipelines

You no longer need to compile your frontend assets (with tools such as Gulp or Webpack). With custom build commands, Forestry compiles your assets for your previews and deployments. Effectively, we can now replace you external CI tools. Simply add your custom build commands to your settings.yml. Go to the docs.


Preview & Deploy for VuePress

When we first introduced VuePress support, previewing and deployment were not possible for VuePress sites. Now, adding custom build commands for your VuePress site will unlock preview and deployment capabilities in Forestry! 🌲🎉

https://res.cloudinary.com/forestry-io/image/fetch/c_limit,dpr_auto,f_auto,q_80,w_640/https://forestry.io/uploads/2018/09/vuepress-add-preview-1.gif


Flexibility for More Workflows

We want our users to get the most out of Forestry. With custom build commands, we aim to support your workflow so you can use everything we have to offer.

To review all changes, please visit our changelog, or visit our sunset notices to see if any features are going to be replaced or removed.