Skip to content

Commit

Permalink
feat: use _brand.yml for pkgdown (#1176)
Browse files Browse the repository at this point in the history
* feat: use `_brand.yml` for pkgdown

* chore: fix link color

* fix Sass variable names

* chore: update comment
  • Loading branch information
gadenbuie authored Jan 29, 2025
1 parent e2ca5e0 commit c2bdb0b
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 46 deletions.
30 changes: 30 additions & 0 deletions pkgdown/_brand.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
meta:
name: bslib
link:
home: https://rstudio.github.io/bslib
github: https://github.com/rstudio/bslib

color:
info: "#e6f2fd"

typography:
fonts:
- family: Atkinson Hyperlegible
source: google
weight: [300, 400, 700]
base: Atkinson Hyperlegible
headings:
color: "#206B72"
link:
color: "#216B73"
decoration: underline dotted

defaults:
bootstrap:
defaults:
link-color-dark: "#cef4f9"
navbar-light-bg: "#E6F2FD"
navbar-dark-bg: "#333F48"
# remove after r-lib/pkgdown#2847 is on CRAN
pkgdown-navbar-bg: "#E6F2FD"
pkgdown-navbar-bg-dark: "#333F48"
16 changes: 4 additions & 12 deletions _pkgdown.yml → pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,15 @@ toc:
template:
bootstrap: 5
bslib:
info: "#E6F2FD"
base_font:
google: {family: "Atkinson Hyperlegible", wght: [300, 400, 700], ital: [0, 1]}
headings-color: "#206B72"
link-color: "#216B73"
link-color-dark: "#cef4f9"
link-decoration: underline dotted
brand: pkgdown/_brand.yml
params:
footer: <b>bslib</b> is an R package developed by <a href='https://rstudio.com'>RStudio</a>
docsearch:
api_key: 53fd87c79a13e431b4298611470d023a
index_name: bslib
footer: <b>bslib</b> is an R package developed by <a href='https://posit.co'>Posit</a>
light-switch: true
theme: github-light
theme-dark: github-dark

navbar:
bg: info
type: light
structure:
left: [get-started, examples, theming, components, layouts]
right: [search, reference, news, github, lightswitch]
Expand Down
34 changes: 0 additions & 34 deletions pkgdown/extra.scss
Original file line number Diff line number Diff line change
Expand Up @@ -247,38 +247,4 @@ footer {
img:active {
opacity: 1;
}

// github-dark.css //
pre code /* Normal */ {color:#e1e4e8}
pre code span.al /* Alert */ {color:#ff5555; font-weight: bold}
pre code span.an /* Annotation */ {color:#6a737d}
pre code span.at /* Attribute */ {color:#f97583}
pre code span.bn /* BaseN */ {color:#79b8ff}
pre code span.bu /* BuiltIn */ {color:#f97583}
pre code span.cf /* ControlFlow */ {color:#f97583}
pre code span.ch /* Char */ {color:#9ecbff}
pre code span.cn /* Constant */ {color:#79b8ff}
pre code span.co /* Comment */ {color:#6a737d}
pre code span.cv /* CommentVar */ {color:#6a737d}
pre code span.do /* Documentation */ {color:#6a737d}
pre code span.dt /* DataType */ {color:#f97583}
pre code span.dv /* DecVal */ {color:#79b8ff}
pre code span.er /* Error */ {color:#ff5555; text-decoration: underline}
pre code span.ex /* Extension */ {color:#f97583; font-weight: bold}
pre code span.fl /* Float */ {color:#79b8ff}
pre code span.fu /* Function */ {color:#b392f0}
pre code span.im /* Import */ {color:#9ecbff}
pre code span.in /* Information */ {color:#6a737d}
pre code span.kw /* Keyword */ {color:#f97583}
pre code span.op /* Operator */ {color:#e1e4e8}
pre code span.ot /* Others */ {color:#b392f0}
pre code span.pp /* Preprocessor */ {color:#f97583}
pre code span.re /* RegionMarker */ {color:#6a737d}
pre code span.sc /* SpecialChar */ {color:#79b8ff}
pre code span.ss /* SpecialString */ {color:#9ecbff}
pre code span.st /* String */ {color:#9ecbff}
pre code span.va /* Variable */ {color:#ffab70}
pre code span.vs /* VerbatimString */ {color:#9ecbff}
pre code span.wa /* Warning */ {color:#ff5555}

}
Binary file added pkgdown/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions pkgdown/favicon/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions pkgdown/favicon/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
Binary file added pkgdown/favicon/web-app-manifest-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/web-app-manifest-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c2bdb0b

Please sign in to comment.