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:
-
Ensure that all pending appropriate merge requests have been merged
-
Ensure that your local branch is up-to-date
-
Run the docusaurus version command:
yarn docusaurus docs:version [version]
-
Commit the initial changes (Example from Moodle 4.4)
-
Update non-automated version mentions:
- Open
versioned_docs/version-[version]/intro.md
in your editor- Uncomment and update the link to the release notes for this version
- Open
docs/devupdate.md
in your editor- Clear the content of this file and update the version numbers
- Open
docs/intro.md
in your editor- Update the occurrences of the version number for the recent release with the version number for the next major version of Moodle
- Open
nextVersion.js
in your editor- Update the values for
nextVersion
(andnextLTSVersion
after the release of an LTS version)
- Update the values for
- Open
general/releases/[version].md
- Update links to the release notes in User Docs to point to the actual version
- Open
/static/_redirects
- Update the
nextVersion
redirect
- Update the
- Open
-
Commit these changes (Example from Moodle 4.4)
-
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.
-
After the Pull Request for this new version has been accepted, navigate to the Deploy Logs, and locate its "Permalink".
-
Remove the entire folder from
versioned_docs
andversioned_sidebars
:rm -rf versioned_docs/version-4.3 versioned_sidebars/version-4.3-*
-
Commit the changes
-
Update any remaining references to the version:
-
Open the
versionsArchived.json
file and add the full link to the Netlify build. -
Open the
versions.json
file and remove the version from the list -
Search for any remaining occurrences as a path, for example:
ag '/4\.3/'
-
-
Commit these changes
-
Create a pull request