In R-markdown there is is an option to move the title: out of the main YAML, as described in the R Markdown Cookbook.
But, in a Xaringan slide set the new --- seems to conflict with the idea of new slide.
The below code works, but when move line #2, title: "Presentation Ninja" outside the main YAML, and inset it as title: "The name of the dog is r dog_name!", by removing all my <!-- ... --> code in line #17-19, it does not work as expected. I do no longer get a title page. I guess I need to work around the --- in Xaringan?
---
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
output:
  xaringan::moon_reader:
    lib_dir: libs
---
# xaringan set the document title dynamically
       
```{r, code=xfun::read_utf8('script_with_many_dog_names.R')}
```
The name of the dog is `r dog_name`!
<!-- --- -->
<!-- title: "The name of the dog is `r dog_name`!" -->
<!-- --- -->
Some bullets
- Foo
- Bar

