Have you read the Contributing Guidelines on issues?
Motivation
This issue is a continuation of the discussion started in #10852 (comment).
I would like to generate my own versioned_docs and versions.json out of my release branches like v1 and v2 instead of maintaining them all in the main branch.
Take my sample repository: https://github.com/felipecrs/docusaurus-sample-branched-versions
$ git clone https://github.com/felipecrs/docusaurus-sample-branched-versions
$ cd docusaurus-sample-branched-versions
$ npm install
$ npm start
npm start will also execute ./prepare_versioned_docs.sh which in turn will generate versioned_docs/ and versions.json.
Each directory inside versioned_docs/ will be a copy of the current repository at the specific release branch.
Right now, it does not work because it expects the docs directory to be the root of the versioned doc.
And even if it worked, edit URLs would not, as they are not within the same branch as the current docs.
Thus, I think the only thing I really need to make this work is being able to override the versioned docs path and their edit URLs through the versions.json. Something like:
[
"v2": {
"docsPath": "./versioned_docs/version-v2/docs",
"editUrl": "https://github.com/felipecrs/docusaurus-sample-branched-versions/tree/v2/"
},
"v1": {
"docsPath": "./versioned_docs/version-v1/docs",
"editUrl": "https://github.com/felipecrs/docusaurus-sample-branched-versions/tree/v1/"
}
]
Self-service
Have you read the Contributing Guidelines on issues?
Motivation
This issue is a continuation of the discussion started in #10852 (comment).
I would like to generate my own
versioned_docsandversions.jsonout of my release branches likev1andv2instead of maintaining them all in the main branch.Take my sample repository: https://github.com/felipecrs/docusaurus-sample-branched-versions
npm startwill also execute./prepare_versioned_docs.shwhich in turn will generateversioned_docs/andversions.json.Each directory inside
versioned_docs/will be a copy of the current repository at the specific release branch.Right now, it does not work because it expects the
docsdirectory to be the root of the versioned doc.And even if it worked, edit URLs would not, as they are not within the same branch as the current docs.
Thus, I think the only thing I really need to make this work is being able to override the versioned docs path and their edit URLs through the
versions.json. Something like:Self-service