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

Show the latest version of the basic-cli docs by default #5718

Conversation

Hasnep
Copy link
Contributor

@Hasnep Hasnep commented Aug 1, 2023

Changes the website build script to show the latest version of the basic-cli docs by default instead of the main branch, and moves the docs for the main branch into a folder called main.

The new layout for the www/build/packages folder is:

packages/
└── basic-cli/
   ├── 0.3.2/
   ├── 0.4.0/
   ├── main/
   ├── index.html
   └── ...

where the basic-cli folder contains a copy of the 0.4.0 folder. The various versions are stored in an array, and the latest version is automatically copied from the first element of the array.

Addresses issue #89 and issue #94 in the basic-cli repo.

mv generated-docs/* $BASIC_CLI_PACKAGE_DIR/main

# Set up docs for different basic-cli versions
BASIC_CLI_VERSIONS=("0.4.0" "0.3.2") # Listed with the latest version first
Copy link
Collaborator

Choose a reason for hiding this comment

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

So I guess we need to update this for each new release?

@Anton-4
Copy link
Collaborator

Anton-4 commented Aug 1, 2023

There's been a bit of mixup, on zulip I was talking about "Should we display the code for the latest release when going to https://github.com/roc-lang/basic-cli instead of the main branch". I think we should keep the docs site https://www.roc-lang.org/packages/basic-cli pointed to the main branch to prevent issues when the URL is shared, for example when someone thinks that they are sharing the docs for 0.4.0 but the content changes over time.

I also set up the www build script yesterday here to auto-detect all docs archives and set up docs sites for all releases that have docs, because that version requires no changes when a release is made I'm going to close this PR in favor of that one. I still appreciate the effort though @Hasnep ❤️

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