Share on a GitHub website

library(fusen)

You write R scripts and you would like to share them with other users, in a sustainable and maintainable way. You already know how to write a notebook (Rmarkdown or Quarto) and share its HTML output, but you do not like to present the outputs along with how to use the functions in the same web page.

If you plan on sharing your package on GitHub, fusen::init_share_on_github() creates all necessary files in your project and send them on your GitHub account to create the website of the package documentation. Then, you can focus on the content.
Follow the steps below and you’ll see your public website documentation in no time!

Initiate your package and share it on GitHub

# Describe your project
fusen::fill_description(
  pkg = here::here(),
  fields = list(
    Title = "Share Your Project Following Good Development Practices From a Rmarkdown File",
    Description = "Use Rmarkdown First method. Strengthen your work with documentation and tests. Everything can be set from a Rmarkdown file in your project.",
    `Authors@R` = c(
      person("John", "Doe", email = "john@email.me", role = c("aut", "cre"), comment = c(ORCID = "0000-0000-0000-0000"))
    )
  )
)
# Define License with use_*_license()
usethis::use_mit_license("John Doe")
fusen::inflate(flat_file = "dev/flat_full.Rmd", vignette_name = "Get started")
#' \dontrun{
#' # This modifies the current directory and send it on GitHub
init_share_on_github()
#' }

In a few minutes, you’ll be able to see and share your project website.
You won’t have to run this command line again. Each time you push new commits to the main branch on GitHub, your website will be updated thanks to GitHub Actions.

What happens behind the scene ?

init_share_on_github() runs multiple steps to be able to share a proper package on GitHub: