Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Updates for pkgdown 2.1.0 #1082

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Config/testthat/parallel: true
Config/testthat/start-first: zzzz-bs-sass, fonts, zzz-precompile, theme-*, rmd-*
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Collate:
'accordion.R'
'breakpoints.R'
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
9 changes: 3 additions & 6 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,16 @@ template:
docsearch:
api_key: 53fd87c79a13e431b4298611470d023a
index_name: bslib
includes:
in_header: >
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css">
light-switch: true

navbar:
bg: info
type: light
structure:
left: [get-started, examples, theming, components, layouts]
right: [reference, news, github, dark-mode]
right: [reference, news, github, lightswitch]
components:
home: ~
dark-mode:
href: "#dark-mode"

get-started:
text: Get Started
Expand Down Expand Up @@ -86,6 +82,7 @@ navbar:

github:
icon: bi-github
aria-label: GitHub
href: https://github.com/rstudio/bslib

news:
Expand Down
4 changes: 1 addition & 3 deletions man/value_box.Rd

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

133 changes: 0 additions & 133 deletions pkgdown/extra.js

This file was deleted.

1 change: 1 addition & 0 deletions vignettes/any-project/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ output:

::: col-md-6
```{r, echo = FALSE}
#| fig.alt: RStudio "New Template" dialog showing three theming-related templates from bslib.
knitr::include_graphics("rstudio-templates.png")
```
:::
Expand Down
1 change: 1 addition & 0 deletions vignettes/cards/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ card(
full_screen = TRUE,
card_image(
file = "shiny-hex.svg",
alt = "Shiny's hex sticker",
href = "https://github.com/rstudio/shiny"
),
card_body(
Expand Down
1 change: 1 addition & 0 deletions vignettes/custom-components/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ shinyApp(ui, function(input, output) {})
```

```{r, echo = FALSE, out.width="67%"}
#| fig.alt: Two custom person components, one each for Andrew Carnegie and John D. Rockefeller.
knitr::include_graphics("person.png")
```

Expand Down
6 changes: 6 additions & 0 deletions vignettes/theming/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ knitr::include_graphics("themer.gif")
When running the theming widget locally, you'll see output like this in your R console (in R Markdown, you'll see YAML output instead of R code) to reproduce the theming changes:

```{r, echo = FALSE, out.width="80%"}
#| fig.alt: Console output showing the R code to reproduce the theming changes.
knitr::include_graphics("themer-code.png")
```

Expand All @@ -108,6 +109,7 @@ output:
</div>

```{r, echo = FALSE}
#| fig.alt: A screenshot of the minty Bootswatch theme.
knitr::include_graphics("bootswatch.png")
```

Expand Down Expand Up @@ -153,6 +155,7 @@ output:
:::

```{r, echo = FALSE}
#| fig.alt: A screenshot showing a dark mode theme with custom fonts.
knitr::include_graphics("custom-dark-mode.png")
```

Expand Down Expand Up @@ -199,6 +202,7 @@ output:
</div>

```{r, echo = FALSE, out.width="67%"}
#| fig.alt: A progress bar indicator colored orange.
knitr::include_graphics("progress-orange.png")
```

Expand Down Expand Up @@ -275,6 +279,7 @@ bs_theme(
```

```{r, echo = FALSE}
#| fig.alt: A screenshot showing a Shiny app with a video game style thanks to NES.css.
knitr::include_graphics("nes.png")
```

Expand Down Expand Up @@ -342,6 +347,7 @@ shinyApp(ui, server)
```

```{r, echo = FALSE, out.width="50%"}
#| fig.alt: An animation showing a dark mode switch in a Shiny app toggling on and off.
knitr::include_graphics("dark-mode.gif")
```

Expand Down
8 changes: 8 additions & 0 deletions vignettes/utility-classes/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ tabsetPanel(
```

```{r, echo = FALSE, out.width="67%"}
#| fig.alt: A tabset panel without padding or borders, showing plain text placed directly against the tab's bottom border.
knitr::include_graphics("tab-before.png")
```

Expand All @@ -46,6 +47,7 @@ tabsetPanel(
```

```{r, echo = FALSE, out.width="67%"}
#| fig.alt: A tabset panel with padding and borders, showing a border around the tab content and padding between the tab content and the tab's border.
knitr::include_graphics("tab-after.png")
```

Expand All @@ -63,16 +65,19 @@ tabsetPanel(
```

```{r, echo = FALSE, out.width="67%"}
#| fig.alt: Tabs using a pills style where the tab controls look like buttons.
knitr::include_graphics("pills.png")
```

It's also worth noting that you can also add these classes to [rmarkdown tabsets](https://bookdown.org/yihui/rmarkdown-cookbook/html-tabs.html), like so:

```{r, echo = FALSE, out.width="50%"}
#| fig.alt: Source code for an rmarkdown tabset, see the previous link for the code.
knitr::include_graphics("rmarkdown-tabs-source.png")
```

```{r, echo = FALSE}
#| fig.alt: Screenshot of a rendered rmarkdown tabset.
knitr::include_graphics("rmarkdown-tabs.png")
```

Expand All @@ -91,6 +96,7 @@ fluidPage(
```

```{r, echo = FALSE, out.width="67%"}
#| fig.alt: Tabs using a pills style where the tab controls look like buttons and are horizontally centered.
knitr::include_graphics("pills.png")
```

Expand Down Expand Up @@ -122,6 +128,7 @@ shinyApp(
```

```{r, echo = FALSE, out.width="67%"}
#| fig.alt: A card component with an orage header and a table of the mtcars dataset in the card body.
knitr::include_graphics("DT-card.png")
```

Expand All @@ -134,5 +141,6 @@ bs_theme("theme-colors" = "('flair': orange)")
```

```{r, echo = FALSE, out.width="67%"}
#| fig.alt: A card component with an orange header and a table of the mtcars dataset in the card body.
knitr::include_graphics("DT-card-custom.png")
```