10:00
From R Markdown to Quarto
UC Berkeley
Duke University + Posit
Places the logo on top of the sidebar and a small version in the browser tab.
Pick up where we left off and
10:00
One of 25 Bootswatch themes
Custom themes
A combination of the two
In _quarto.yml
:
Setting a light and dark theme makes both available with a toggle automatically added to your website:
To customize a theme, add a custom .scss
file that is then called in _quarto.yml
, e.g.:
SCSS files have the following form:
/*-- scss:defaults --*/
$h2-font-size: 1.6rem !default;
$headings-font-weight: 500 !default;
$body-color: $gray-700 !default;
/*-- scss:rules --*/
h1, h2, h3, h4, h5, h6 {
text-shadow: -1px -1px 0 rgba(0, 0, 0, .3);
}
The defaults
section is where you list variables
The rules
section is where you list (CSS) rules
Some examples include:
$body-bg
: The page background color.
$link-color
: The link color.
$font-family-monospace
: The monospace font family for the page.
$callout-color-<type>
: The colors for the various types of callouts.
See the full list at https://quarto.org/docs/output-formats/html-themes.html#sass-variables.
Figuring out what to style
Use your browser’s developer tools.
Refer to the default values for SASS variables and set to something absurd (red and bold or giant size) while testing. Once you have the correct variable or rule identified, set the style values to what you want them to be.
Pick up where we left off and
10:00
to request!
What other aspects / features of a Quarto website or book would you like to learn about?
Socials
Some examples include:
Twitter Cards provide an enhanced appearance when someone links to your site on Twitter.
The Open Graph protocol enables richer sharing of links to articles on the web, e.g., with preview images.