Closed andrewnicols closed 5 months ago
I like the idea of creating docs from the beginning in the proper folder where they belong <3 That way, it will be clearer that, although the development branch is called "main" in moodle.git, all the content in that folder will be related to the unreleased next version (4.5 in our case).
So +1 to create /docs/4.5 from the beginning.
The only thing we should guarantee is that by default the content on /docs/4.5 should be displayed when accessing without selecting any specific version (so our last version should always be the default one, as we are doing now with "main") :-)
The only thing we should guarantee is that by default the content on /docs/4.5 should be displayed when accessing without selecting any specific version (so our last version should always be the default one, as we are doing now with "main") :-)
Yes - that will happen already. You can trial this locally with this change:
diff --git a/config/navbar.js b/config/navbar.js
index 342bd99db3..798c6c435e 100644
--- a/config/navbar.js
+++ b/config/navbar.js
@@ -31,7 +31,7 @@ const navbar = {
// },
items: [
{
- to: '/docs',
+ to: '/docs/4.4',
label: 'Guides',
position: 'left',
},
diff --git a/docusaurus.config.js b/docusaurus.config.js
index 96b8fd6741..fef93faa39 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -26,6 +26,7 @@ const versionConfig = Object.fromEntries(Versions.map((version) => [version, {
}]));
versionConfig.current = {
label: 'main',
+ path: '4.4',
banner: 'none',
};
I like docs having their final location since created, plus that enables also having more than one development version (like we have had in the past) and other niceties.
And, if possible, always redirecting from un-versioned URLs to the last versioned one, please.
(And I said “redirected” on purpose)
I agree with previous comments.
What do we need to do?
So as we're going to be releasing Moodle 4.4 soon and we'll start development on 4.5, I am wondering whether we should change the default path for the in-development version of the docs.
Right now we have versioned paths for released Moodle versions, that is:
And we have the 'current' version (in development - main branch). That is at:
This works fairly well but it does ahve a main pitfall, being that any link to 4.4 docs may disappear in the future as that file may be moved/etc.
The prime example is the
devupdate.md
file. That gets reset with each release and so the bookmark within it will (likely) change.The alternative is that we set the path for the 'current' version to the next version of Moodle. So since Moodle 4.4 is our current development branch, we'll use that example:
The drawback here is that there is no
/docs/apis
any more. I believe that we can add a redirect so that any page not found will redirect to the 4.4 path.