Subject: Rendering Rmd via GitHub actions does not create floating table of contents
I’m trying to use GitHub Actions to render R Markdown (.Rmd) files to .html and .md. I’d like the .html file to have a floating table of contents. When I knit the .Rmd file locally, the .html file includes a floating table of contents. However, when I render the document to .html with GitHub Actions, the .html does not include a floating table of contents.
Can you try rendering github_document then html_document to see if this makes a difference ?
Or can you set html_preview = FALSE for github_document ?
output:
github_document:
html_preview: FALSE
I think the HTML preview will override by default the HTML document you rendered before as they will have the same name. Changing the order should solve it, but setting the option too.
If you are generating a HTML document and md document yourself, you usually don't need the preview.
That answered my question perfectly. Changing the order solved the problem. I didn't realize that github_document was creating an HTML preview. Can you specify both outputs simultaneously in the same YAML header? So something like the following?:
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: