fix(curriculum): control visibility via env

This commit is contained in:
Oliver Eyton-Williams
2020-05-21 17:21:33 +02:00
committed by Mrugesh Mohapatra
parent 68aef571ee
commit 9b297ed76d
2 changed files with 9 additions and 0 deletions

View File

@ -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;
}

View File

@ -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