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

Make codebook table work with knit2wp and/or output:github_document [feature request] #55

Open
JanaJarecki opened this issue Aug 23, 2020 · 3 comments

Comments

@JanaJarecki
Copy link

One very cool feature would be to make codebook Rmd files work with knit2wp and/or output: github_document. Particularly, the github_document version would be cool, then one could directly view a codebook on a Github repo and e.g. sync it with the osf!

Here is a sample current output: of uploading a codebook Rmd with knit2wp (the github_document variant produces mostly the same): http://janajarecki.com/blog/codebook-for-data-in-jarecki-rieskamp-2020/

As we see, the text is pitch-perfect, but the codebook table gets transformed into a picture -- I suspect that has to do with the searchability javascript plugin of the table, but I'm not sure.

Cheers
Jana

@rubenarslan
Copy link
Owner

Hi @JanaJarecki, not sure I can solve this on my end, but I'll think about. It happens, because knitr uses the webshot packages to make an image if we don't render to HTML. Of course, you are rendering to HTML, but indirectly via Markdown. Maybe I can catch if you're doing that and spit out a non-fancy table. Or maybe you could use rmarkdown::render with clean = F and use the resulting Markdown.

@JanaJarecki
Copy link
Author

@rubenarslan thank you for the answer, clarifications, and suggestions. Anything I can do here?

Quick Feedback:
knitting with clean = F and then kit2wp() with the resulting *.md file produces just a <!–html_preserve–> statement, no luck here . I tried manually deleting the <!–html_preserve–> from the *.md file but that doesn't render the code. Result see here, the first codebook is with manually-remoced html_preserve; the second codebook on the page is rendering from clean = F as is: http://janajarecki.com/blog/test/

@JanaJarecki
Copy link
Author

Different Question: In your the tutorial - https://rubenarslan.github.io/codebook/articles/codebook.html#codebook-table-1 - you just uploaded the rendered HTML page, correct? No automatization involved, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants