question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation about versioning across branches rather than a single directory

See original GitHub issue

Have you read the Contributing Guidelines on issues?

Description

I have noticed that docusaurus lacks documentation about versioning across different branches rather than a single branch with a versioned directory, even if it is just a note about not being supported.


I wanted to set-up versioning for my project which uses separate branches for older versions (like master for current version, old/vX for older versions) and i have read that docusaurus supports versioning across branches, but i cannot find any documentation (even outside of the official documentation) regarding setting this up. The only vaguely similar things i found are basically setup a reverse proxy or depend on immutability from your provider, which is not really great for github pages or other static-only providers.

Self-service

  • I’d be willing to address this documentation request myself.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
hasezoeycommented, Dec 7, 2022

You can have subpaths on a single GHP deployment, and it’s also outside the scope of Docusaurus (only baseUrl is part of the Docusaurus scope.

Taking the 3 distinct framework examples, you can have Jekyll on /v1, MkDocs on /v2, and Docusaurus on / or /v3.

Static deployments are just static files, you can just merge 3 static folders into one if you want, and push all the files to the gh-pages branch of your repo. That’s a complex setup and it’s your responsibility to figure out details on how to assemble just deployment. That’s DevOps, not Docusaurus.

thanks for the feedback, i just wanted to ask if there would be any problems with doing a nested (which it would be) docusaurus deployment to a sub-folder, while still having the main docusaurus up on the root in github-pages

0reactions
slorbercommented, Dec 7, 2022

np 👍

No problem, you just need to build the 2 docusaurus sites (one with baseUrl: '/' and one with baseUrl: '/v1') and merge the 2 static outputs as a single static site. Replace Docusaurus by any other SSG and the answer remains true: that’s not specific to Docusaurus but is just how static files and folders work 😄

The only thing that matters is that you have both ./index.html and ./v1/index.html in your deployment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Content Source Versioning Methods :: Antora Docs
Version content using folders. Using this method, you store each documentation version in a folder in a single reference (branch or tag) of...
Read more >
Versioned Documentation - Read the Docs
Read the Docs supports two workflows for versioning: based on tags or branches. If you have at least one tag, tags will take...
Read more >
Versioning types—ArcGIS Pro | Documentation
Branch versioning has a simplified version hierarchy allowing only one level of named versions to be created from the default version. Traditional versioning....
Read more >
Version control concepts and best practices
This document is a brief introduction to version control. After reading it, you will be prepared to perform simple tasks using a version...
Read more >
A Visual Guide to Version Control - BetterExplained
Our shared folder/naming system is fine for class projects or one-time ... Most version control systems store diffs rather than full copies of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found