Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include {.tabset} functionality in rendered articles #981

Closed
seanhardison1 opened this issue Feb 28, 2019 · 6 comments
Closed

Include {.tabset} functionality in rendered articles #981

seanhardison1 opened this issue Feb 28, 2019 · 6 comments
Labels
articles ✍️ feature a feature request or enhancement help wanted ❤️ we'd love your help!

Comments

@seanhardison1
Copy link

Is it possible to include {.tabset} style dropdowns in pkgdown articles? This would be helpful for creating visualization-heavy articles.

@hadley
Copy link
Member

hadley commented Mar 1, 2019

How does this work outside of pkgdown? That's the first problem to solve.

@seanhardison1
Copy link
Author

Here's an example of what I'm talking about in a standard rmd rendered to html

---
title: "tabset test"
author: "Sean Hardison"
date: "3/1/2019"
output: html_document
---


## Section X {.tabset}


### X.1

```{r, echo = T}
plot(rnorm(30))
```


### X.2 

```{r, echo = T}
plot(rnorm(30))
```

The output looks like this:

image

Maybe this is already possible through pkgdown? Tabset syntax is ignored in pkgdown::build_articles() as far as I'm aware.

@jayhesselberth
Copy link
Collaborator

jayhesselberth commented Mar 1, 2019

The tabset classes are in the pkgdown vignette output, so I think we'd just need to copy the rmarkdown jquery plugin and some css into pkgdown.

Edit: actually it's more complicated that this, the markdown is processed in a specific way to generate tab contents, and pkgdown isn't doing that part. Because pkgdown uses html_document internally, it's probably doable, but will take some more digging.

@jayhesselberth jayhesselberth added the feature a feature request or enhancement label Mar 1, 2019
@jgranja24
Copy link

Is this still an outstanding feature? The tabsets are incredibly useful for building nice turorials.

@hadley
Copy link
Member

hadley commented Mar 22, 2020

I think unfortunately this is out of scope for pkgdown; in order to get the output of RMarkdown into pkgdown's templates we already have to do a lot of fiddly manipulation, so adding this feature is both difficult and likely to introduce unexpected issues further down the road.

@maelle
Copy link
Collaborator

maelle commented Aug 23, 2021

Not sure why GitHub is showing me this issue in my notifications, but in the meantime there are tabsets for articles via #1694

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
articles ✍️ feature a feature request or enhancement help wanted ❤️ we'd love your help!
Projects
None yet
Development

No branches or pull requests

5 participants