{"id":14069108,"url":"https://github.com/ThinkR-open/papillon","last_synced_at":"2025-07-30T05:31:21.484Z","repository":{"id":46054224,"uuid":"195239642","full_name":"ThinkR-open/papillon","owner":"ThinkR-open","description":"Build And Highlight Package Documentation With Customized Templates","archived":false,"fork":false,"pushed_at":"2023-01-28T15:09:21.000Z","size":351,"stargazers_count":11,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-28T21:53:03.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://thinkr-open.github.io/papillon/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThinkR-open.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-04T12:42:41.000Z","updated_at":"2023-03-08T05:48:55.000Z","dependencies_parsed_at":"2023-02-15T17:16:08.293Z","dependency_job_id":null,"html_url":"https://github.com/ThinkR-open/papillon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fpapillon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fpapillon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fpapillon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fpapillon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThinkR-open","download_url":"https://codeload.github.com/ThinkR-open/papillon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228092144,"owners_count":17868140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:06:36.687Z","updated_at":"2024-12-04T10:30:56.188Z","avatar_url":"https://github.com/ThinkR-open.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- badges: start --\u003e\n[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)\n[![R-CMD-check](https://github.com/ThinkR-open/papillon/workflows/R-CMD-check/badge.svg)](https://github.com/ThinkR-open/papillon/actions)\n[![Codecov test coverage](https://codecov.io/gh/ThinkR-open/papillon/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ThinkR-open/papillon?branch=main)\n\u003c!-- badges: end --\u003e\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# papillon\n\n\u003c!-- description: start --\u003e\nThis is package {papillon}: Build And Highlight Package Documentation With Customized\n    Templates.  \nYou are using version 0.0.1.9000.\n\u003c!-- description: end --\u003e\n\n*Complete documentation in the {pkgdown} site: https://thinkr-open.github.io/papillon/*\n\n## Installation\n\u003c!-- install: start --\u003e\nThe list of dependencies required to install this package is: attachment, bookdown, cli, crayon, desc, devtools, knitr, magrittr, pkgdown, readr, remotes, rmarkdown, shiny, usethis, utils.\n\nTo install the package, you can run the following script\n\n```{r, echo=TRUE, eval=FALSE}\n# install.packages(\"remotes\")\nremotes::install_github(repo = \"Thinkr-open/papillon\")\n```\n\n\u003c!-- install: end --\u003e\n\n## Examples\n### Build a book from vignettes inside a package\n\nYou can use `create_book()` using your own template basis. By default, it uses {bookdown} site template. You can use it to build your own.\n\n```{r, eval=FALSE}\ntemplate \u003c- system.file(\"rstudio/templates/project/resources\", package = \"bookdown\")\ncreate_book(path = \"inst/report\", clean = TRUE,\n            template = template)\n```\n\nHelp users find your book with function `open_guide_function()`. This adds function `open_guide()` inside your package that will open the userguide (in HTML or PDF) on demand.\n\n```{r, eval=FALSE}\nopen_guide_function(path = \"inst/report\")\n```\n\n### Build a pkgdown site inside a package\n\nYou can use `build_pkgdown()` using your own template basis. By default, it uses the {pkgdown} original template.  \nTo use your own template, it is better to create a R package with all necessary files (See \u003chttps://github.com/tidyverse/tidytemplate\u003e as an example).  \n\n*You can then define your own `_pkgdown.yml` file that will call your template when building the site:*\n```yaml\ntemplate:\n  package: mypackagetemplate\n\n```\n\n```{r, eval=FALSE}\npapillon::build_pkgdown(\n  lazy = TRUE,\n  yml = \"/pah/to/your/yaml/_pkgdown.yml\",\n  favicon = \"/path/to/your/favicon.ico\",\n  move = TRUE\n)\n```\n\nHelp users find your pkgdown website with function `open_pkgdown_function()`. This adds function `open_pkgdown()` inside your package that will open the site on demand. _This may make your package not pass warnings in checks, but remember this is for internal or private use. For public use, you can publish your pkgdown site directly online._\n\n```{r, eval=FALSE}\npapillon::open_pkgdown_function()\n```\n\n### Build a reference page\n\nTo award people hard working for open-source, it is always good to cite their work. In order to add an informative page in your Shiny applications for instance, you can create a html or markdown page listing all package dependencies used. \n\n```{r, eval=FALSE}\npapillon::create_pkg_biblio_file(to = \"html\", out.dir = \"inst\")\n# Can be included in a shiny app using \nshiny::includeHTML(\"bibliography.html\")\n# OR\npapillon::create_pkg_biblio_file(to = \"markdown\")\n# Can be included in a shiny app using \nshiny::includeMarkdown(\"bibliography.md\")\n```\n\n## To describe your package and how to install it\n\nThis can be useful to create your Readme for instance or to send the instructions file for your clients to install your package.\n\n```{r, eval=FALSE}\npath \u003c- system.file(\"DESCRIPTION\", package = \"papillon\")\nout.dir \u003c- tempdir()\ncreate_pkg_desc_file(path, source = c(\"archive\"), to = \"html\")\n```\n\n```{r, eval=FALSE}\n# Use with results=\"asis\" in a Rmd\nshiny::includeHTML(file.path(out.dir, \"pkg_description.html\"))\n```\n\n## Create and update a custom README with installation instructions\n\n- `generate_readme()` uses {usethis} Readme template for packages and fill the installation instructions.  \n- This function can be run anytime during project development as it will only update the description and installation parts\n\n```{r, eval=FALSE}\n#usethis::use_readme_rmd\npapillon::generate_readme_rmd()\npapillon::generate_readme_rmd(parts = \"description\")\n```\n  \n  \n  \n## Code of Conduct\n\nPlease note that the papillon project is released with a [Contributor Code of Conduct](https://thinkr-open.github.io/papillon/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThinkR-open%2Fpapillon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThinkR-open%2Fpapillon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThinkR-open%2Fpapillon/lists"}