-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88190aa
commit eed7d98
Showing
4 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: "Gallery" | ||
output: rmarkdown::html_vignette | ||
vignette: > | ||
%\VignetteIndexEntry{Gallery} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
|
||
<br><br> | ||
|
||
```{r} | ||
#| echo: false | ||
#| eval: !expr rlang::is_installed(c("gt", "tibble")) | ||
# Contributors: to add your pal to this table, add one row per pal in the | ||
# following `tribble()` call. If you've authored a pal extension that includes | ||
# multiple pals, include a row for each pal. | ||
quartochunk_code <- | ||
'prompt_new( | ||
"quartochunk", | ||
"replace", | ||
"https://gist.githubusercontent.com/hfrick/1ca8fc2cb2a4409b743e8120c6cc2223/raw/a9703edfbd4e83839af0278c33add1b33e243d02/quartochunk-replace.md" | ||
)' | ||
gallery <- | ||
tibble::tribble( | ||
~Description, ~Role, ~Interface, ~Author, ~`Use it via...`, | ||
"[Convert erroring code to use cli](https://simonpcouch.github.io/pal/reference/pal_cli.html)", "cli", "replace", "Simon Couch", "library(pal)", | ||
"[Convert unit tests to testthat 3e](https://simonpcouch.github.io/pal/reference/pal_testthat.html)", "testthat", "replace", "Simon Couch", "library(pal)", | ||
"[Template function documentation with roxygen](https://simonpcouch.github.io/pal/reference/pal_roxygen.html)", "roxygen", "prefix", "Simon Couch", "library(pal)", | ||
"[Transition to Quarto-style chunk headers](https://gist.github.com/hfrick/1ca8fc2cb2a4409b743e8120c6cc2223)", "quartochunk", "replace", "Hannah Frick", quartochunk_code, | ||
# silly example to be removed once there are other pal extension pkgs | ||
"[Always reply 'beep bop boop'](https://github.com/simonpcouch/palpable)", "boop", "replace", "Simon Couch", "pak::pak(\"simonpcouch/palpable\")\nlibrary(palpable)" | ||
) | ||
gallery$`Use it via...` <- paste0("```\n", gallery$`Use it via...`, "\n```") | ||
library(gt) | ||
gt(gallery) %>% | ||
fmt_markdown(c(Description, `Use it via...`)) %>% | ||
opt_interactive(use_search = TRUE) %>% | ||
cols_width(c(Description, `Use it via...`) ~ px(220)) | ||
``` | ||
|