Skip to content

tjmahr/ghdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghdown

The goal of ghdown is to create Github-styled HTML documents from RMarkdown

Installation

You can install ghdown from Github with:

# install.packages("devtools")
devtools::install_github("tjmahr/ghdown")

Example

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

YAML Example

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().

About

Create Github-styled HTML documents with RMarkdown

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published