spcanelon / RLadies-xaringan-template

Xaringan presentation template with an R-Ladies theme
https://spcanelon.github.io/RLadies-xaringan-template
12 stars 9 forks source link

custom title-slide class not showing author #2

Closed shannonpileggi closed 3 years ago

shannonpileggi commented 3 years ago

Hi Siliva! I modified my yaml title, subtitle, author, instititute and date as follows:

---
title: "A job interview presentation inspired by the R community"
subtitle: "How #tidytuesday and twitter helped me secure a job offer"
author: "Shannon Pileggi"
institute: "R-Ladies Miami Meet-up"
date: "April 22, 2021"
output:
  xaringan::moon_reader:
    lib_dir: libs
    css:
      - default
      - rladies
      - rladies-fonts
      - css/rladies-mod.css
    seal: false
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
      ratio: 4:3
---

and the title slide renders as:

image

should I remove the title-class or make modifications to it so that the yaml parameters pass through?

shannonpileggi commented 3 years ago

Ah never mind! I see now that you have to write it in. I included:

# `r rmarkdown::metadata$title`

## `r rmarkdown::metadata$subtitle`

### `r rmarkdown::metadata$author`

### `r rmarkdown::metadata$institute`

### `r rmarkdown::metadata$date`

and the slide rendered as:

image

spcanelon commented 3 years ago

Wahoo! I'm glad it's sorted 🎉 I'm excited for this presentation!

P.S. For long titles/sentences, you can choose how to break it up over multiple lines by inserting an HTML line break: <br>

For example, I think the following would work in your YAML:

title: "A job interview presentation<br>inspired by the R community"
subtitle: "How #tidytuesday and twitter<br>helped me secure a job offer"

I use <br> a lot throughout my slide decks to have a little more control over where text is placed. Another way I use them is for adding spaces between lines. It ends up working like a hard Enter or Return in a What-You-See-Is-What-You-Get word processor