Btibert3
Btibert3

Reputation: 40176

Name Property in Xaringan Slides

I am probably missing something very obvious, but when creating a new slide in xaringan, what does name do? For example name: setup, or name:usecourse or name:ninja set at the start of the slide?

I can't find references in the custom css so I am really not sure what this is doing.

To see an example of how this is being used: https://github.com/rstudio-education/arm-workshop-rsc2019/blob/master/static/slides/xaringan.Rmd

And the repo where the custom css files live: https://github.com/rstudio-education/arm-workshop-rsc2019/tree/master/static/slides/css

Upvotes: 1

Views: 190

Answers (1)

Emi
Emi

Reputation: 3584

If you name a slide, an id will be appended to the slide. So say now you want to go to the slide named ninja from another slide (within the same presentation) then you can refer to it by [click here](#ninja).

Also if you append #ninja to your slide URL then it will go directly to that slide, e.g. yourslides.html#ninja.

You can also use named slides as a template for other slides. E.g.

name: ninja

Institute Logo (say)

---

template: ninja

Content to be appended 

Upvotes: 3

Related Questions