gt
gt copied to clipboard
Have gt tables look okay in bookdown, blogdown, xaringan
In bookdown, blogdown, pkgdown, and xaringan (and others) there are CSS rules that directly affect elements such as <table>
, <th>
, <tr>
, etc., leading to unexpected results when integrating a gt table in any documents/pages.
The solution is to implement a simple CSS reset at the table level. Once that's done, perform integration tests on all of these.
{gt} seems to substantially increase the .ReadingTime variable as calculated by hugo.
I went through and changed a post from using knitr::kable()
to using gt::gt()
on several tables in a post and found my article's read time had substantially increased as a result. My guess is this has to do with the way gt adds css to the page... but unsure.
The specific article where I noticed this can be found here. (Wasn't sure was worth opening a new issue etc. as seems related to other things...)
Side note:
I turned off displaying .ReadingTime
on longer posts via:
{{ if and (eq .Section "post") (lt .ReadingTime 17)}}
<span class="article-duration">{{ .ReadingTime }} min read</span>
{{ end }}
In single.html.
Just wanted to drop in and add Quarto to the list of above formats 😉