oscarbaruffa / parallaxr

Generate a parallax scroll document in R with YAML and Markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

parallaxr

Generate a parallax scroll document in R with YAML and Markdown

This is an R package that allows you to create a parallax scroll document with YAML and Markdown files.

Check out this demo output: https://martinctc.github.io/examples/parallaxr-examples-output.html

You can install the package with the following line of code. Make sure you have devtools installed first, of course:

devtools::install_github("martinctc/parallaxr")

In the examples folder of this repo, you will find the script and the Markdown documents that were used to produce this page. Here is a snippet of the starter code, but please visit the repo for the latest version:

## Load packages
library(parallaxr)

## Character vector of all MD files
all_md_str <- list.files(path = "examples/Markdown", full.names = TRUE)


## Loop through each MD file, parse, and return a single tibble
md_tibble <-
  all_md_str %>%
  purrr::map_dfr(parse_md) # Return a tibble with row-binding

## Output HTML file

generate_scroll_doc(path = "examples/parallaxr-examples-output.html",
                    inputs = md_tibble)

More documentation is available for the individual functions, e.g.

?generate_scroll_doc

If you have any questions, bugs, or suggestions for enhancements, please log an issue with https://github.com/martinctc/parallaxr/issues. This is an open-source project, so any contribution is very welcome! Pull requests are welcome.

About

Generate a parallax scroll document in R with YAML and Markdown

License:GNU General Public License v3.0


Languages

Language:HTML 51.6%Language:R 37.7%Language:CSS 10.7%