Coder Social home page Coder Social logo

hyderogen's Introduction

hyderogen

stability-wip

Turn your roxygen documentation into a jekyll site.

How it works

  • one page per package function or object or named section
  • example sections support a simple templating system for readable docs offline and online
  • generates folder structure under docs/ and builds site at docs/_site/
  • simple sidebar layout, styled with Bootstrap
# remotes::install_github("nteetor/hyderogen")

library(hyderogen)

# WARNING ----
# In its current state this function will delete any existing files
# in your docs/ folder!!
jekyll("<path to pkg>", build = TRUE)

Examples section templating

#' @examples
#'
#' ### This is converted into a title
#'
#' # This is converted into a paragraph.
#' # This is in the same paragraph.
#'
#' div("hello, world")
#'
#' % <div>another div</div><!--this is dropped in verbatim-->
#'
#' # A final pararaph.

Code blocks, the div("hello, world"), are evaluated such that the code and output are both shown.

Why?

It's a toolset useful to me and I like jekyll.

hyderogen's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hyderogen's Issues

Jekyll issue

Hi Nate,

I'm getting the following error on Ubuntu 18.04 (jekyll is installed as far as I can tell).

hyderogen::jekyll()
Error: Column `title` must be length 1 (a summary value), not 0

Note that I am running the above from the root of the directory, I tried with build = TRUE. I could very well be doing something wrong.

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(hyderogen)
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] hyderogen_0.0.1

loaded via a namespace (and not attached):
 [1] tidyselect_0.2.5  compiler_3.6.0    magrittr_1.5      assertthat_0.2.1 
 [5] R6_2.4.0          sourcetools_0.1.7 fs_1.3.1          pillar_1.4.1     
 [9] glue_1.3.1        dplyr_0.8.1       tibble_2.1.2      crayon_1.3.4     
[13] Rcpp_1.0.1        pkgconfig_2.0.2   rlang_0.3.4       purrr_0.3.2      

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.