-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(website): multiple version api doc (#384)
* chore: add multiple version api doc sample * update api docs list * unnecessary duplicated latest docs Co-authored-by: Yonghui Lin <homura.dev@gmail.com>
- Loading branch information
1 parent
f244d81
commit dab3e09
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// string or { branchName: string, label: string } | ||
const branches = [ | ||
{ | ||
branchName: 'stable', | ||
label: '0.18.0(latest)' | ||
}, | ||
{ | ||
branchName: 'develop', | ||
label: '0.19.x(next)' | ||
} | ||
]; | ||
|
||
const parseURL = (branchName) => branchName | ||
.replaceAll("_", "") | ||
.replaceAll(".", "") | ||
.replaceAll("/", "-") | ||
|
||
module.exports = branches.map(branch => ( | ||
typeof branch === 'string' | ||
? { | ||
href: `https://lumos-website-git-${parseURL(branch)}-cryptape.vercel.app/api/`, | ||
label: branch, | ||
target: "_blank", | ||
} | ||
: { | ||
href: `https://lumos-website-git-${parseURL(branch.branchName)}-cryptape.vercel.app/api/`, | ||
label: branch.label, | ||
target: "_blank", | ||
} | ||
)) |
dab3e09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
lumos-website – ./
lumos-website.vercel.app
lumos-website-cryptape.vercel.app
lumos-website-git-develop-cryptape.vercel.app