diff --git a/docs/contents/getting_started/index.md b/docs/contents/getting_started/index.md index 903362c49..8cd875986 100644 --- a/docs/contents/getting_started/index.md +++ b/docs/contents/getting_started/index.md @@ -43,9 +43,9 @@ Before downloading PDF.js please take a moment to understand the different layer

Includes the generic build of PDF.js and the viewer.

- + Stable (vSTABLE_VERSION) - Beta (vBETA_VERSION) + Beta (vBETA_VERSION)
diff --git a/gulpfile.js b/gulpfile.js index 469b99ca4..4d37837dd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1169,6 +1169,15 @@ gulp.task('wintersmith', ['gh-pages-prepare'], function (done) { /STABLE_VERSION/g, config.stableVersion); replaceInFile(GH_PAGES_DIR + '/getting_started/index.html', /BETA_VERSION/g, config.betaVersion); + + // Hide the beta version button if there is only a stable version. + const groupClass = config.betaVersion ? 'btn-group-vertical centered' : ''; + const hiddenClass = config.betaVersion ? '' : 'hidden'; + replaceInFile(GH_PAGES_DIR + '/getting_started/index.html', + /GROUP_CLASS/g, groupClass); + replaceInFile(GH_PAGES_DIR + '/getting_started/index.html', + /HIDDEN_CLASS/g, hiddenClass); + console.log('Done building with wintersmith.'); done(); });