Skip to content

Commit

Permalink
Redirect subdirs under docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wkmor1 committed Mar 27, 2024
1 parent 0413ed2 commit 2af334b
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion api.R
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ function() {
#* @get /
function(res) {

path <- "/docs/"
path <- "/docs/index.html"

if (length(unlist(packageVersion("fbi"))) > 3L) {

Expand All @@ -538,6 +538,38 @@ function(res) {

}

#* @get /docs/articles
function(res) {

res[["status"]] <- 303L
res[["setHeader"]]("Location", "/docs/articles/index.html")

}

#* @get /docs/dev/articles
function(res) {

res[["status"]] <- 303L
res[["setHeader"]]("Location", "/docs/dev/articles/index.html")

}

#* @get /docs/reference
function(res) {

res[["status"]] <- 303L
res[["setHeader"]]("Location", "/docs/reference/index.html")

}

#* @get /docs/dev/reference
function(res) {

res[["status"]] <- 303L
res[["setHeader"]]("Location", "/docs/dev/reference/index.html")

}

#* @assets ./docs /docs
list()

Expand Down

0 comments on commit 2af334b

Please sign in to comment.