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

Closes #2205 add previous website links #2207

Merged
merged 7 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: admiral
Type: Package
Title: ADaM in R Asset Library
Version: 0.12.2.9001
Version: 0.12.3.9001
Authors@R: c(
person("Ben", "Straub", email = "[email protected]", role = c("aut", "cre")),
person("Stefan", "Bundfuss", role = "aut"),
Expand Down
18 changes: 16 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ reference:

navbar:
structure:
left: [getstarted, reference, articles, community, news]
right: [search, slack, newissue, github]
left: [getstarted, reference, articles, community, news, versions]
right: [search, slack, history, newissue, github]
components:
getstarted:
text: Get Started
Expand Down Expand Up @@ -194,6 +194,20 @@ navbar:
href: articles/lab_grading.html
- text: Hy's Law Implementation
href: articles/hys_law.html
versions:
text: Versions
menu:
- text: Development
href: dev/index.html
- text: Current Release
href: index.html
- text: Previous Releases
href: articles/website-versions.html

history:
icon: fa-history
href: articles/website-versions.html
aria-label: Previous Release Websites
slack:
icon: fa-slack
href: https://app.slack.com/client/T028PB489D3/C02M8KN8269
Expand Down
14 changes: 10 additions & 4 deletions vignettes/articles/website-versions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ all_folders <-
unique()

# subset to all version folders
all_version_folders <- all_folders[grep("^v[0-9]+", x = all_folders)]
all_version_folders <-
all_folders[grep("^v[0-9]+|dev", x = all_folders)] |>
rev()
# more dev first if it appears
if ("dev" %in% all_version_folders) {
all_version_folders <- c("dev", all_version_folders) |> unique()
}

# release dates of prior tags
df_tags <- gert::git_tag_list()
Expand All @@ -46,7 +52,6 @@ df_tags$date <-
) |>
unlist()
df_tags <- df_tags[!is.na(df_tags$date), ]
df_tags

lst_tag_dates <-
paste0(" (", df_tags$date, ")") |>
Expand All @@ -56,9 +61,10 @@ lst_tag_dates <-
# string with all markdown links
str_website_links <-
lapply(
X = all_version_folders |> rev(),
X = all_version_folders,
FUN = function(x) {
paste0("[", x, lst_tag_dates[[x]], "](", paste0(base_url, x), ")")
x_label <- ifelse(x %in% "dev", "Development Site", x)
paste0("[", x_label, lst_tag_dates[[x]], "](", paste0(base_url, x), ")")
}
) |>
unlist() |>
Expand Down
Loading