Skip to content

Commit

Permalink
feat: pkgdown site gains new global search (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolepore authored Nov 27, 2024
1 parent c39cb3d commit 723470c
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ Remotes:
RMI-PACTA/pacta.portfolio.utils
Suggests:
covr,
DT,
dverse,
mockr,
testthat (>= 3.0.0)
Config/testthat/edition: 3
Expand Down
3 changes: 3 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ navbar:
packages:
text: "Packages"
menu:
- text: "Global search"
href: articles/global-search.html
- text: -----
- text: "pacta.data.scraping"
href: https://rmi-pacta.github.io/pacta.data.scraping/
- text: "pacta.portfolio.import"
Expand Down
46 changes: 46 additions & 0 deletions vignettes/articles/global-search.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: "Global search"
---

```{r, include = FALSE}
knitr::opts_chunk$set(
echo = FALSE,
collapse = TRUE,
comment = "#>"
)
```

```{r setup, message=FALSE}
library(pacta.data.scraping)
library(pacta.data.validation)
library(pacta.executive.summary)
library(pacta.interactive.plot)
library(pacta.portfolio.allocate)
library(pacta.portfolio.audit)
library(pacta.portfolio.import)
library(pacta.portfolio.report)
library(pacta.portfolio.utils)
```

```{r}
packages <- c(
"pacta.data.scraping",
"pacta.data.validation",
"pacta.executive.summary",
"pacta.interactive.plot",
"pacta.portfolio.allocate",
"pacta.portfolio.audit",
"pacta.portfolio.import",
"pacta.portfolio.report",
"pacta.portfolio.utils"
)
url_template <- "https://rmi-pacta.github.io/{package}/reference/{topic}.html"
docs <- dverse::document_universe(packages, url_template)
exported_helpfiles <- docs %>%
dplyr::filter(type == "help", keyword != "internal" | is.na(keyword)) %>%
dplyr::select(topic, title, package)
exported_helpfiles %>% DT::datatable(escape = FALSE)
```

0 comments on commit 723470c

Please sign in to comment.