Skip to content

Commit 5094547

Browse files
authored
Merge pull request #141 from stan-dev/new-pkgdown-theme
New pkgdown theme
2 parents 2f1625a + 9b37fec commit 5094547

File tree

11 files changed

+148
-104
lines changed

11 files changed

+148
-104
lines changed

.github/workflows/pkgdown.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
# build dev site on merged pushes
5+
push:
6+
branches: [main, master]
7+
# build full site on releases
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown.yaml
13+
14+
jobs:
15+
pkgdown:
16+
runs-on: ubuntu-latest
17+
# Only restrict concurrency for non-PR jobs
18+
concurrency:
19+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
20+
cancel-in-progress: true
21+
env:
22+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- uses: r-lib/actions/setup-pandoc@v2
29+
30+
- uses: r-lib/actions/setup-r@v2
31+
with:
32+
use-public-rspm: true
33+
34+
- uses: r-lib/actions/setup-r-dependencies@v2
35+
with:
36+
extra-packages: any::pkgdown, local::., any::withr, stan-dev/pkgdown-config
37+
38+
- name: Build site
39+
run: |
40+
withr::with_envvar(
41+
c("NOT_CRAN" = "true"), # this should already be set by setup-r@v2? keeping because vignettes don't build otherwise
42+
pkgdown::build_site_github_pages(
43+
lazy = FALSE, # change to TRUE if runner times out.
44+
run_dont_run = TRUE,
45+
new_process = TRUE
46+
)
47+
)
48+
shell: Rscript {0}
49+
50+
- name: Deploy to GitHub pages 🚀
51+
uses: JamesIves/github-pages-deploy-action@v4
52+
with:
53+
clean: false
54+
branch: gh-pages
55+
folder: docs

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ Suggests:
5353
roxygen2 (>= 6.0.1),
5454
rmarkdown,
5555
rstudioapi
56-
RoxygenNote: 7.3.2
56+
RoxygenNote: 7.3.3
5757
VignetteBuilder: knitr
5858
Roxygen: list(markdown = TRUE)

R/rstan_create_package.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#' @aliases rstan_package_skeleton
2222
#'
2323
#' @description
24-
#' \if{html}{\figure{stanlogo.png}{options: width="25" alt="https://mc-stan.org/about/logo/"}}
24+
#' \if{html}{\figure{logo.svg}{options: width="25" alt="https://mc-stan.org/about/logo/"}}
2525
#' The `rstan_create_package()` function helps get you started developing a
2626
#' new \R package that interfaces with Stan via the \pkg{rstan} package. First
2727
#' the basic package structure is set up via [usethis::create_package()].

R/rstantools-package.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#'
66
#' @description
77
#' \if{html}{
8-
#' \figure{stanlogo.png}{options: width="50" alt="mc-stan.org"}
8+
#' \figure{logo.svg}{options: width="50" alt="mc-stan.org"}
99
#' } *Stan Development Team*
1010
#'
1111
#' The \pkg{rstantools} package provides various tools for developers of \R

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# rstantools <img src="man/figures/stanlogo.png" align="right" width="120" />
1+
# rstantools <img src="man/figures/logo.svg" align="right" width="120" />
22

33
<!-- badges: start -->
44
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/rstantools?color=blue)](https://cran.r-project.org/web/packages/rstantools)

_pkgdown.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
url: https://mc-stan.org/rstantools
2+
3+
destination: "."
4+
5+
template:
6+
package: pkgdownconfig
7+
8+
development:
9+
mode: auto
10+
11+
navbar:
12+
title: "rstantools"
13+
14+
structure:
15+
left: [home, vignettes, functions, news, pkgs, stan]
16+
right: [search, bluesky, forum, github, lightswitch]
17+
18+
components:
19+
pkgs:
20+
text: Other Packages
21+
menu:
22+
- text: bayesplot
23+
href: https://mc-stan.org/bayesplot
24+
- text: cmdstanr
25+
href: https://mc-stan.org/cmdstanr
26+
- text: loo
27+
href: https://mc-stan.org/loo
28+
- text: posterior
29+
href: https://mc-stan.org/posterior
30+
- text: projpred
31+
href: https://mc-stan.org/projpred
32+
- text: rstan
33+
href: https://mc-stan.org/rstan
34+
- text: rstanarm
35+
href: https://mc-stan.org/rstanarm
36+
- text: shinystan
37+
href: https://mc-stan.org/shinystan
38+
39+
articles:
40+
- title: "Recommendations for R package development with Stan"
41+
desc: >
42+
This vignette provides many recommendations for developers interested in
43+
creating an R package that interface with Stan. Topics include
44+
development best practices, precompiling Stan programs, R code and
45+
documentation, and more.
46+
contents:
47+
- developer-guidelines
48+
- title: "Step-by-step guide"
49+
desc: >
50+
This vignette walks through the steps required to set up a package with
51+
a precompiled Stan model, from creating the initial package structure to
52+
adding the precompiled Stan program and writing the R function that users
53+
will call to fit the model.
54+
contents:
55+
- minimal-rstan-package
56+
57+
reference:
58+
- title: "Package structure"
59+
desc: >
60+
Creating the basic structure of a Stan-based R package or add
61+
Stan programs to an existing package.
62+
contents:
63+
- rstantools-package
64+
- rstan_create_package
65+
- use_rstan
66+
- rstan_config
67+
- rstantools_load_code
68+
- title: "Generics"
69+
desc: >
70+
S3 generics (and some default methods) for adding functionality
71+
to your package using the same naming conventions as **rstanarm**
72+
and other Stan-based R packages.
73+
contents:
74+
- bayes_R2
75+
- log_lik
76+
- loo-prediction
77+
- posterior_interval
78+
- posterior_epred
79+
- posterior_linpred
80+
- posterior_predict
81+
- predictive_error
82+
- predictive_interval
83+
- prior_summary

man/figures/logo.svg

Lines changed: 1 addition & 96 deletions
Loading

man/figures/stanlogo.png

-15.8 KB
Binary file not shown.

man/rstan_create_package.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/rstantools-package.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)