Code Monkey home page Code Monkey logo

rotemplate's Introduction

rotemplate

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Build Status

rotemplate provides a custom pkgdown template for rOpenSci packages. Please don’t use it for your own package if it’s not an rOpenSci package (i.e. only use it for packages listed on https://ropensci.org/packages/).

Inspired by tidytemplate and lockedatapkg.

How to use rotemplate

If your website has no pkgdown website yet

Run

usethis::use_pkgdown()

And to ensure your website will be automatically deployed from Travis, which we recommend,

usethis::use_pkgdown_travis()

Note that the setup that’ll be recommended by running the function above consists in updating the website on a gh-pages branch with every push, which might bloat your git history. If you want to avoid that, have a look at

  • the setup in magick repo: the website is only built when there’s a GitHub release, which uses the following code in its .travis.yml file.
deploy:
  provider: script
  script: Rscript -e 'pkgdown::deploy_site_github()'
  skip_cleanup: true
  on:
    tags: true

In all cases

Tweak _pkgdown.yml config

In your _pkgdown.yml config file make sure to add the following lines

template:
  package: rotemplate

Tweak the .travis.yml config

To .travis.yml add a command installing the package template, i.e. something like

before_cache: 
  Rscript -e 'remotes::install_cran("pkgdown");remotes::install_github("ropenscilabs/rotemplate").'

Locally, if you want to build and preview the website, you’ll need to ensure that rotemplate is installed, and then build your website:

remotes::install_github("ropenscilabs/rotemplate")
pkgdown::build_site()

Make sure the website has a favicon

If your package has no logo of its own, use the rOpenSci hex by running the code below, but do not necessarily put it in the README as mentioned by usethis (your choice). This way the package website will have a favicon.

usethis::use_logo("https://raw.githubusercontent.com/ropensci/logos/master/stickers/blue_short_hexsticker.png")
# but do not necessarily put it in the README as mentioned by `usethis`,
# your call!
pkgdown::build_favicon()

Examples “in the wild”

rotemplate's People

Contributors

maelle avatar njtierney avatar wlandau-lilly avatar

Watchers

James Cloos avatar  avatar  avatar

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.