diff --git a/curriculum/getChallenges.js b/curriculum/getChallenges.js index 07acad80bd..8f1b411dad 100644 --- a/curriculum/getChallenges.js +++ b/curriculum/getChallenges.js @@ -128,6 +128,12 @@ async function createChallenge(fullPath, maybeMeta) { challenge.template = template; challenge.time = time; + // challenges can be hidden (so they do not appear in all environments e.g. + // production), SHOW_HIDDEN controls this. + if (process.env.SHOW_HIDDEN === 'true') { + challenge.isHidden = false; + } + return challenge; } diff --git a/sample.env b/sample.env index c13e0f3e17..b3625a09a2 100644 --- a/sample.env +++ b/sample.env @@ -53,3 +53,6 @@ GHOST_CLIENT_KEY=123abc SENTRY_DSN=dsn_from_sentry_dashboard SENTRY_ENVIRONMENT='staging' + +# Set this to false to see what the production site will contain +SHOW_HIDDEN=true