Skip to content

Commit 36aa589

Browse files
authored
Create a _config_preview.yml for preview builds (#437)
This will enable our Cloudflare builder to publish posts that are in the future and not yet published on our production build ``` JEKYLL_BUILD_CONFIG_PARAM=",_config_preview.yml" bundle exec jekyll build --config _config.yml${JEKYLL_BUILD_CONFIG_PARAM} ``` For production, JEKYLL_BUILD_CONFIG_PARAM will be empty For preview, JEKYLL_BUILD_CONFIG_PARAM will contain the above value. Wrap this into a cloudflare_build.sh script that is used by Cloudflare to build
1 parent 8b96054 commit 36aa589

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

_config_preview.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Preview build settings
2+
show_drafts: true
3+
future: true
4+
unpublished: true
5+
verbose: true

cloudflare_build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bundle exec jekyll build --config _config.yml${JEKYLL_BUILD_CONFIG_PARAM} && cp _redirects _site/_redirects

0 commit comments

Comments
 (0)