Single docs site (recommended)
The simplest and recommended approach is deploying one canonical docs site at /. This is the standard GitHub Pages workflow:
- Build Jekyll at the repository root.
- Publish the output to the
gh-pagesbranch (or configure GitHub Pages to build from your default branch).
With GitHub Actions, a minimal workflow looks like:
- uses: actions/jekyll-build-pages@v1
- uses: actions/deploy-pages@v4
This keeps CI simple and avoids the complexity of managing multiple doc versions.
Multi-version docs (optional)
If your project needs versioned documentation, such as /next/ for the development branch, / for the current release, and /v1.0.0/ for older releases, the theme includes scripts to support this pattern:
scripts/version_manifest.rbgenerates_data/versions.ymlfrom your release historyscripts/publish_gh_pages.shhandles publishing in two modes:next: publishes to the/next/pathrelease: publishes the current release to/and an immutable snapshot to/v1.2.3/
A typical CI flow:
- On every push to the default branch, build docs with a
/nextbase URL and publish withpublish_gh_pages.sh next. - On release, build once for the site root and once for
/v1.2.3, then publish withpublish_gh_pages.sh release. _data/versions.ymlon thegh-pagesbranch becomes the source of truth for the version selector dropdown.
By default, the publish script reads _site_next for next, _site_current for the root release build, and _site_release for the
/v1.2.3/ release snapshot.
When _data/versions.yml is present and contains version items, the theme renders a version selector in the navbar automatically.
WARNING
Multi-version mode adds operational complexity. Caching behavior, legacy paths, and rebuild coordination all need attention. Only use it when you genuinely need immutable version snapshots. For most projects, a single docs site with a changelog link is sufficient.
In your repository’s GitHub Pages settings, configure the source to serve from branch gh-pages (root).