Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Host Documentation for multiple versions/branch #188

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

AS1100K
Copy link
Contributor

@AS1100K AS1100K commented Nov 24, 2024

I love azalea, and sometimes I need to use different branch of azalea like 1.20.4. The issue is that azalea, currently only hosts documentation for main branch and though it would be great if it supported documentation multiple branches. This is what this PR introduces.

A Demo is available at https://as1100k.github.io/azalea/ [Old due to changes requested]

Prerequisite

  1. Create a orphan branch docs. And a Initial Commit with .gitignore with the following content:
    target
    
  2. Update doc.yml for old branches. (If you approve, I will open PR for all those other branches)
  3. Change settings to host GitHub Pages from docs branch instead of GitHub Actions

@ShayBox
Copy link
Contributor

ShayBox commented Nov 24, 2024

I've always viewed old docs on docs.rs for the last published version I need, or local cargo docs if I have to modify an old version, but I also prefer to use zenith proxy or via proxy to connect to old versions with the latest Azalea version.

@AS1100K
Copy link
Contributor Author

AS1100K commented Nov 25, 2024 via email

Copy link
Collaborator

@mat-1 mat-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty cool, thanks for taking the time to make this.

The only request I have is that I'd like for the index page to redirect to the docs for the master branch (so visiting azalea.matdoes.dev redirects the main docs the same way it does right now), and for the version listing to be on a separate page (/branches.md or something).

@mat-1
Copy link
Collaborator

mat-1 commented Nov 27, 2024

Oh also I just realized, it should have a filter to only do the commit on the docs branch if the current branch looks like a version number. (since I'll often have temporary branches for other stuff)

@AS1100K
Copy link
Contributor Author

AS1100K commented Nov 27, 2024

Listings are now on branches.html Demo and opening azalea.matdoes.dev redirects to the main branch documentation now.

Also, this action will now create index.html if it doesn't exist that will redirect the documentation for main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants