Skip to content

Versioned docs of jenkins.io

Notifications You must be signed in to change notification settings

jenkins-infra/docs.jenkins.io

Repository files navigation

Jenkins Documentation

This repository hosts parts of the documentation of jenkins.io.

  • Developer Guide

  • User Guide

  • Tutorials

  • Solutions Pages

  • Books

How to Build the Versioned Documentation Locally with Antora

The documentation site for Jenkins is split into two parts:

  1. Version-controlled documentation (managed using Antora)

  2. Non-versioned documentation (using Gatsby for rendering the current website)

This guide focuses on building the version-controlled documentation using Antora.

Overview of Gatsby

Gatsby is a React-based framework that allows developers to create fast and optimized websites. It leverages GraphQL for data handling and provides a plugin ecosystem for extended functionality. This project utilizes Gatsby for rendering the non-versioned documentation of Jenkins, enhancing performance and user experience.

Project Structure

The Gatsby site is structured as follows:

  • src/: Contains the source files for the site, including components, templates, and styles.

  • static/: Static files that are directly served, such as images or fonts.

  • gatsby-config.js: Configuration file for Gatsby where you can customize settings and plugins.

Installing the Prerequisites

  1. Install Node.js and npm

    It is recommended to install Node.js and npm using the Node Version Manager (nvm): * NVM repository: [https://github.com/nvm-sh/nvm](https://github.com/nvm-sh/nvm)

    + Alternatively, you can download and install Node.js from the official Node.js website:

  2. Install Antora CLI

    Antora is used for generating versioned documentation. Install it globally via npm:

    npm install -g @antora/cli @antora/site-generator-default

Installing Project Dependencies

Once Node.js, npm, and Antora are installed, install the dependencies by running the following command at the root of the repository:

npm i

Building the Versioned Docs

To build and serve the site locally, use the provided Makefile. Run this command at the root of the repository:

make all

Once the site is up and running, it should be available locally at:

Documentation Structure

For more details on running the project, refer to the detailed documentation in the README.md file:

Contributing

If you have any queries or contributions or updates for the documentation, feel free to create an issue and/or submit a pull request.