The goal of ghdown is to create Github-styled HTML documents from RMarkdown
You can install ghdown from Github with:
# install.packages("devtools")
devtools::install_github("tjmahr/ghdown")github_html_document() is just a wrapper for rmarkdown::html_document() but it uses the Github-themed CSS style file.
You can use the format in render().
rmarkdown::render(
input = "./README.Rmd",
output_format = ghdown::github_html_document(),
output_file = "./inst/README.html")The resulting HTML file can be previewed here. It looks like the HTML preview generated by rmarkdown::github_document(). That's the point of the package.
One upside of targeting HTML is MathJax support. This equation renders correctly in the HTML preview of this document.
y = m**x + b
This format can be targeted like other formats in the YAML frontmatter. Like so:
---
output:
ghdown::github_html_document: default
---Any options set in the YAML frontmatter as passed onto rmarkdown::html_document().