Feature Request: Display {gt} tables in the Examples section
The uptick in packages utilizing gt to create beautiful tables has been significant over the last couple of years. https://gt.rstudio.com/
I would be amazing if pkgdown could somehow render/display these tables in the example section somehow.
One tricky bit, is that by default I believe the CSS from the parent site will override much of the stying within a gt table. I think each table would need to be "printed" utilizing the gt::as_raw_html() function, which will insert the default gt stylings and not allow global site CSS to take over any aspect of the table.
Thank you! 🍁
+1, maybe like ggplot work, they could just be coerced to png somehow?
That should probably be a gt feature request. It would need to define a pkgdown_print() method for whatever class it is returning.
It seems that this script is used to generate examples for gt https://github.com/rstudio/gt/blob/master/scripts/generate_example_pngs.R
From @rich-iannone, as_raw_html() will generate raw HTML suitable for direct embedding.