Skip to content

Commit

Permalink
push for preview
Browse files Browse the repository at this point in the history
  • Loading branch information
dajmcdon committed Nov 5, 2024
1 parent a58c767 commit d836665
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 23 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
^pkgdown$
^vignettes/articles$
^.*\.Rproj$
^data-raw$
19 changes: 11 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Package: delphidocs
Title: pkgdown template for CMU Delphi
Title: pkgdown template for Delphi
Version: 0.0.1
Authors@R: c(
person("Daniel J.", "McDonald", , "[email protected]", role = c("aut", "cre")),
person("CMU's Delphi Research Group", role = c("cph", "fnd"))
person("Delphi Research Group", role = c("cph", "fnd"))
)
Description: A pkgdown template for the CMU Delphi R packages.
Description: A pkgdown template for the Delphi R packages.
License: MIT + file LICENSE
URL: https://github.com/cmu-delphi/delphidocs
BugReports: https://github.com/cmu-delphi/delphidocs/issues
Expand All @@ -14,13 +14,16 @@ Depends:
Imports:
cli,
glue
Config/Needs/website: rmarkdown
Suggests:
knitr,
rmarkdown
VignetteBuilder:
knitr
Config/Needs/website:
rmarkdown
cmu-delphi/delphidocs
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Suggests:
knitr,
rmarkdown
VignetteBuilder: knitr
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(consult_oracle)
importFrom(cli,cat_line)
importFrom(cli,cli_h2)
importFrom(cli,cli_inform)
importFrom(cli,col_yellow)
8 changes: 4 additions & 4 deletions R/consult_oracle.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#' consult_oracle("A")
consult_oracle <- function(query) {
if (missing(query)) {
cli::cli_inform("Did you have a question?")
cli_inform("Did you have a question?")
}
resp <- sample(delphidocs::responses, 1)
cli::cli_h2(cli::col_yellow("The oracle says: "))
cli::cli_inform(glue::glue(cli::symbol$fancy_question_mark, " {resp}."))
cli::cat_line("")
cli_h2(col_yellow("The oracle says: "))
cli_inform(glue::glue(cli::symbol$fancy_question_mark, " {resp}."))
cat_line("")
invisible(resp)
}
8 changes: 8 additions & 0 deletions R/delphidocs-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#' Some things the oracle might say
"responses"

#' Some useful colours
"colours"

#' @importFrom cli cli_inform cli_h2 cat_line col_yellow
"_PACKAGE"
2 changes: 0 additions & 2 deletions R/responses.R

This file was deleted.

10 changes: 7 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ knitr::opts_chunk$set(
[![CRAN status](https://www.r-pkg.org/badges/version/delphidocs)](https://CRAN.R-project.org/package=delphidocs)
<!-- badges: end -->

`{delphidocs}` provides a custom pkgdown template for CMU Delphi packages.
`{delphidocs}` provides a custom pkgdown template for Delphi packages.
Please don’t use it for your own package, but feel free to modify it for
your own purposes.

Expand All @@ -37,14 +37,18 @@ You probably shouldn't install this package. It's just a template.
To use the `{delphidocs}` template for your pkgdown site,
add the following to your `_pkgdown.yml` file:

```{yaml example}
``` yaml
---
template:
package: delphidocs
---
```

You will also need to add the following to your `DESCRIPTION` file:

```{yaml needs}
``` yaml
---
Config/Needs/website: cmu-delphi/delphidocs
---
```

10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](h
status](https://www.r-pkg.org/badges/version/delphidocs)](https://CRAN.R-project.org/package=delphidocs)
<!-- badges: end -->

`{delphidocs}` provides a custom pkgdown template for CMU Delphi
packages. Please don’t use it for your own package, but feel free to
modify it for your own purposes.
`{delphidocs}` provides a custom pkgdown template for Delphi packages.
Please don’t use it for your own package, but feel free to modify it for
your own purposes.

Inspired by [rotemplate](https://github.com/ropensci-org/rotemplate).

Expand All @@ -27,12 +27,16 @@ To use the `{delphidocs}` template for your pkgdown site, add the
following to your `_pkgdown.yml` file:

``` yaml
---
template:
package: delphidocs
---
```

You will also need to add the following to your `DESCRIPTION` file:

``` yaml
---
Config/Needs/website: cmu-delphi/delphidocs
---
```
15 changes: 15 additions & 0 deletions data-raw/colours.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
colours <- c(
fg = "#172431",
bg = "#fff",
cmu_red = "#C41230",
skibo_red = "#941120",
highlands_blue = "#007BC0",
berkley_blue = "#002676",
berkeley_gold = "#FDB515",
ubc_blue = "#002145",
ubc_secondary = "#00A7E1",
fifty = "#8C338F",
complem = "#368f33"
)

usethis::use_data(colours, overwrite = TRUE)
Binary file added data/colours.rda
Binary file not shown.
5 changes: 3 additions & 2 deletions inst/pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ template:
fg: "#172431"
base_font: {google: "Open Sans"}
heading_font: {google: "Source Serif Pro"}
primary: "#007BC0"
primary: "#941120"
secondary: "#8C338F"
border-radius: 0
headings-color: "#941120"
headings-color: "#002676"
navbar-light-color: "$headings-color"
navbar-light-brand-color: "$headings-color"
navbar-light-hover-color: "$headings-color"
Expand Down
16 changes: 16 additions & 0 deletions man/colours.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions man/delphidocs-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/responses.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d836665

Please sign in to comment.