Skip to content

Commit

Permalink
more info
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed Oct 17, 2024
1 parent a8bea58 commit d6b3e07
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pkgup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
Rscript -e 'litedown::fuse_site("docs")'
mkdir -p public
find docs -name '*.html' -print0 | cpio -pvdmB --null public
ls -R public
mv public/docs/* public
rm -r public/docs
- name: repo
Expand Down
30 changes: 17 additions & 13 deletions docs/vignettes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ if (tail(strsplit(getwd(), "/", fixed=TRUE)[[1L]], 1L) == "docs") {
}
invisible(file.copy("../vignettes", ".", recursive=TRUE))
rmd = list.files("./vignettes", "*.Rmd", full.names=TRUE)
html = list.files("./vignettes", "*.html", full.names=TRUE)
title = function(f) {
title1 = function(f) {
l = readLines(f)
t = paste(head(strsplit(basename(f), ".", fixed=TRUE)[[1L]], -1L), collapse=".") ## default, basename without extension
for (i in seq_along(l)) {
if (substr(l[i], 1L, 6L) != "title:")
next
t = trimws(gsub("title:", "", l[i], fixed=TRUE))
break
if (!length(rmd)) {
cat("no vignettes\n")
} else {
title = function(f) {
title1 = function(f) {
l = readLines(f)
t = paste(head(strsplit(basename(f), ".", fixed=TRUE)[[1L]], -1L), collapse=".") ## default, basename without extension
for (i in seq_along(l)) {
if (substr(l[i], 1L, 6L) != "title:")
next
t = trimws(gsub("title:", "", l[i], fixed=TRUE))
break
}
t
}
t
sapply(f, title1)
}
sapply(f, title1)
html = list.files("./vignettes", "*.html", full.names=TRUE)
lapply(html, function(f) cat(sprintf("[%s](%s)\n", title(rmd), f))) |> invisible()
}
lapply(html, function(f) cat(sprintf("[%s](%s)\n", title(rmd), f))) |> invisible()
```

0 comments on commit d6b3e07

Please sign in to comment.