Giter VIP home page Giter VIP logo

Comments (2)

jennybc avatar jennybc commented on June 2, 2024

Yeah GitHub-flavored markdown is never going to play nicely with your flextables. The "basic markdown" vibe is intentional for README.[R]md since README.md actually goes to CRAN and is displayed on CRAN landing pages. So that markdown needs to remain fairly low-tech.

Most people allow index.html for their pkgdown site to be created from README.md, but there are other options and I think this might apply to you:

The main content of the home page (index.html) is generated from pkgdown/index.md, index.md, or README.md, in that order. Most packages will use README.md because that's also displayed by GitHub and CRAN. Use index.md if you want your package website to look different to your README, and use pkgdown/index.md if you don't want that file to live in your package root directory.

If you use index.Rmd or README.Rmd it's your responsibility to knit the document to create the corresponding .md. pkgdown does not do this for you because it only touches files in the doc/ directory.

https://pkgdown.r-lib.org/reference/build_home.html#home-page

I think this is not a problem we can solve for you in devtools, but I think you can solve it with more work on the pkgdown side.

from devtools.

ateucher avatar ateucher commented on June 2, 2024

Late to the story here, but I have found this works for me if I use webshot, not webshot2. I believe knitr looks first for webshot2, so if you have it installed, you need to uninstall it. And webshot requires phantomjs:

# remove.packages("webshot2") # If it is installed
install.packages("webshot")
webshot::install_phantomjs()
devtools::build_readme()

This successfully renders html output (mapview) to pngs in my README eg here.

Re webshot2, I think there is an issue properly launching chromote in some situations, but I can't find where that is now...

Edit: This doesn't solve the rendering of html in pkgdown, but does automatically create the pngs in the README.md

from devtools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.