dougmet / mango-pagedown

Testing out css for a Mango Pagedown theme
2 stars 1 forks source link

mango-pagedown

Testing out css for a Mango Pagedown theme

Getting started

You'll need to install pagedown in R.

install.packages("pagedown")

To build the test Rmd, test-pagedown.Rmd, you open it in RStudio and click the "knit" button, and this will knit and openthe file in your browser. Otherwise you can do:

rmarkdown::render("test-pagedown.Rmd")

and this will build the html without opening the browser.

Making changes

CSS

in css/

Instead of adding on CSS I've copied through everything from pagedown. So we can change as much as we like there. There are three:

Images

in img/

There are some standard branding images, both png and svg, that we can use.

Layout

in templates/

I think most of the layout changes will happen in templates/mango-paged.html. This is a template doc that pandoc uses to turn the markdown file into html. I (Doug) don't really know this templating language but I feel it may be key.

For example. We'll need to add new divs for exercise boxes. In markdown it'll be something like:

Exercise {#exercise}

And somehow that becomes a named div in html.

The templates in the pagedown package may be informative. For instance the resume one does cool stuff: https://github.com/rstudio/pagedown/blob/master/inst/resources/html/resume.html

Our current style

in word/

You can see what the material looks like now in word/03 Getting Data into R.docx. Some things would be nice to keep:

Other things can just go:

But really there's no strict requirements. If it's super hard to do that chapter numbering then we can live without it, for example.