mikeroswell / ratioScales

Development of ratio scales package for plotting
https://mikeroswell.github.io/ratioScales/
1 stars 1 forks source link

Fix captioning on pkgdown #15

Open mikeroswell opened 1 year ago

mikeroswell commented 1 year ago

I think Ben's solution to captioning should work fine, ultimately, but some work might need to happen to get css to be respected by the pkgdown machinery as well as the rendering of the README.md file on github.

mikeroswell commented 1 year ago

I'm not sure how dooable the "on github" part will end up being: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject

mikeroswell commented 1 year ago

https://pragmaticpineapple.com/adding-custom-html-and-css-to-github-readme/

bbolker commented 1 year ago

IMO trying to get fancy CSS to work on the github side is too much trouble; the README presented on GitHub can be relatively simple and technical (basic goals of the package, how to install, where to ask questions, etc.), without any figures, while the index page presented on GH pages can have fancy stuff (figures etc.). For example, compare

mikeroswell commented 1 year ago

@bbolker , Thank you!

I'm a bit lost on some of these details, maybe you can point me to a simple template for how this all comes together. I don't yet understand

I like your setup. I was just reading about using latex to get colored text as an alternative: https://stackoverflow.com/a/73871251/8400969.

bbolker commented 1 year ago

how you get something other than README.md to be the index with pkgdown

make sure there's an index.html file present in the docs directory (or the root directory of the gh-pages branch - wherever your GH pages are drawing their material from)

what you needed the pkgdown.extras package to do for you

this is probably not necessary for you. We have Rnw vignettes, which are a pretty big pain to handle in pkgdown. (I would recommend avoiding LaTeX-based solutions on GH pages/with GH actions if you can, it takes a lot of fussing to set up the right LaTeX environments remotely)

mikeroswell commented 1 year ago

Thank you, Ben!!!