Skip to main content

Managing Moodle version documentation

We generate version-specific documentation and maintain this for each supported version of Moodle.

When a new version of Moodle is released, the documentation is 'forked'.

When a version of Moodle goes out of support, its developer documentation is archived.

Further information about this functionality is available in the Docusaurus documentation on the topic.

Creating a new version of the docs

Typically this task is performed by the Integration team using the following steps:

  1. Ensure that all pending appropriate merge requests have been merged

  2. Ensure that your local branch is up-to-date

  3. Run the docusaurus version command:

    yarn docusaurus docs:version [version]
  4. Commit the initial changes (Example from Moodle 4.4)

  5. Update non-automated version mentions:

    1. Open versioned_docs/version-[version]/intro.md in your editor
      1. Uncomment and update the link to the release notes for this version
    2. Open docs/devupdate.md in your editor
      1. Clear the content of this file and update the version numbers
    3. Open docs/intro.md in your editor
      1. Update the occurrences of the version number for the recent release with the version number for the next major version of Moodle
    4. Open nextVersion.js in your editor
      1. Update the values for nextVersion (and nextLTSVersion after the release of an LTS version)
    5. Open general/releases/[version].md
      1. Update links to the release notes in User Docs to point to the actual version
    6. Open /static/_redirects
      1. Update the nextVersion redirect
  6. Commit these changes (Example from Moodle 4.4)

  7. Create a pull request (Example from Moodle 4.4)

Archiving a version of the docs

The archival of a set of documentation usually happens immediately after the forking of documentation for the latest version.

  1. After the Pull Request for this new version has been accepted, navigate to the Deploy Logs, and locate its "Permalink".

  2. Remove the entire folder from versioned_docs and versioned_sidebars:

    rm -rf versioned_docs/version-4.3 versioned_sidebars/version-4.3-*
  3. Commit the changes

  4. Update any remaining references to the version:

    1. Open the versionsArchived.json file and add the full link to the Netlify build.

    2. Open the versions.json file and remove the version from the list

    3. Search for any remaining occurrences as a path, for example:

      ag '/4\.3/'
  5. Commit these changes

  6. Create a pull request