Closed friendly closed 6 months ago
pkgdown
appears to process these two files differently:
README.Rmd
is not converted to HTML directly. Rather, it is converted to README.md
, and then to HTML. When processing README.md
, pkgdown
processes the markdown syntax automatically, because it knows it is dealing with pure markdown and it can afford to make assumptions.vignettes/file.Rmd
are converted to HTML directly.When you call tt()
in a Rmarkdown file that will output to HTML, tinytable
will create an HTML table, but it doesn't know anything about what you put in that table. If you want content to be interpreted as markdown syntax to be converted to link with HTML tabs, you need to state that explicitly:
library(tinytable)
tt(x) |> format_tt(markdown = TRUE)
I tried this in your repo's vignette and it worked as expected. Don't hesitate to ping me if you try it and it doesn't work.
Wow! that is so helpful, and explains the problem. I'll give it a whirl.
Now works like a charm.
I wonder if what I've done is of any interest re your https://vincentarelbundock.github.io/Rdatasets/datasets.html which is the most comprehensive list of datasets in R packages I've seen.
Great!
And thanks for the nudge. heplots
has been available for a few months, but I ran the script again to update the files. Should live soon.
In my heplots package, I'm preparing several tables of datasets in the package, with the package name to be a link to the documentation in the pkgdown web site.
I get different results when I try
tt()
in the README vs. a datasets vignette, where the links don't resolve, so I had to revert to usingknitr::kable()
. There is probablytt()
option or chunk option I'm missing, but I don't know what.In the
README.Rmd
file, that becomesindex.html
I have this code:This works, more or less as I expect, producing the Datasets table.
In the vignette, what I get when I knit this is: