rstudio / learnr

Interactive Tutorials with R Markdown
https://pkgs.rstudio.com/learnr
Apache License 2.0
710 stars 239 forks source link

Progressive Reveal for Topics at Level 2 Header ## #798

Open katieravenwood opened 1 year ago

katieravenwood commented 1 year ago

I've been writing business tutorials lately that require that all sections of content are completed before receiving a certification and generating an output of documents on the last page.

It would be great to be able to use progressive reveal at the topic level so that the Level 2 headers aren't revealed in the table of contents until the previous topic's subtopics have been completed so no one just skips to the end and generates the completion certificate without going through the previous tutorial steps!

Enabled for the whole document as:

---
title: "business tutorial"
output:
  learnr::tutorial:
    theme: "flatly"
    progressive-topic: true
    allow-topic-skip: true
runtime: shiny_prerendered

And enabled or disabled for specific topics:

## Topic { data-progressive-topic: true }