Skip to content

Commit

Permalink
Symlink latest to latest documentation available. (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 authored Dec 18, 2023
1 parent 03d6422 commit 269b4e6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions public/doc/latest/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Redirecting to latest doc...</title>
</head>
<body>
<script>
window.onload = ()=>{
fetch("https://api.github.com/repos/ether/etherpad-lite/releases/latest")
.then(c=>c.json())
.then(c=>{
const remainingPath = window.location.href.substring(window.location.href.indexOf("latest")+6)
window.location.href = `/doc/${c.tag_name}${remainingPath}`
})
}
</script>
</body>
</html>

0 comments on commit 269b4e6

Please sign in to comment.