rrstudioquarto

Render Quarto document with the outline


Hoping someone can help - I am new to quarto and working on analysis with some documentation about each code/step in the form of headings and subheading. I can see this as an outline in my quarto document but can't see it when render to an html. I want the same outline as the one in the quarto document in the rendered html file, so that when reviewing the html file, the user can toggle to their desired content.

Any idea on how I can achieve this? I have tried using the following, but it didn't work

  output:
  quarto::quarto_html:
    toc: true
    format:
      html:
        self-contained: true

Thank you for your help


Solution

  • Not sure if I understand the question, hope this example help:


    mwe


    ---
    format: html
    toc: true
    self-contained: true
    ---
    # heading
    
    Some text
    
    ```{r}
    1 + 1
    ```
    
    ## subheading
    
    With another R chunk
    
    ```{r}
    #| eval: false
    2 * 3
    ```