From b2316b686b3ee35c08411835206d12de5ab1d476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20B=C3=A9tin?= Date: Tue, 8 Oct 2024 17:24:22 +0200 Subject: [PATCH] Include future posts in Netlify previews (#903) * Include future posts in Netlify previews * Add comments in netlify.toml * Change lines order in netlify.toml --- netlify.toml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/netlify.toml b/netlify.toml index e9b5eebb345..77ace67eb40 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,15 @@ -[build] -# with debugging: command = "git submodule update --init --remote && bundle exec jekyll build --verbose --trace --config '_config.yml,_config_staging.yml'" +[context.production] +# Applies to the staging environment, generated from the `main` branch. command = "git submodule update --init --remote && npm install && bundle exec jekyll build --profile --trace --config '_config.yml,_config_staging.yml'" +# with debugging: command = "git submodule update --init --remote && bundle exec jekyll build --verbose --trace --config '_config.yml,_config_staging.yml'" + +[context.deploy-preview] +# Applies to deploy previews, generated from pull requests. +# Include posts with a future date +command = "git submodule update --init --remote && npm install && bundle exec jekyll build --profile --trace --config '_config.yml,_config_staging.yml' --future" +# with debugging: command = "git submodule update --init --remote && bundle exec jekyll build --verbose --trace --config '_config.yml,_config_staging.yml' --future" + +[build] publish = "_site" [build.environment]