{"id":16284709,"url":"https://github.com/pachadotdev/prettydoc_experiments","last_synced_at":"2025-04-09T00:36:18.310Z","repository":{"id":81294076,"uuid":"80834801","full_name":"pachadotdev/prettydoc_experiments","owner":"pachadotdev","description":"prettydoc themes based on Yixuan Qiu's R package","archived":false,"fork":false,"pushed_at":"2017-08-03T17:37:45.000Z","size":153,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T18:52:23.150Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pachadotdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-03T14:10:54.000Z","updated_at":"2018-03-21T14:53:54.000Z","dependencies_parsed_at":"2023-03-10T01:30:24.467Z","dependency_job_id":null,"html_url":"https://github.com/pachadotdev/prettydoc_experiments","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/pachadotdev%2Fprettydoc_experiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pachadotdev%2Fprettydoc_experiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pachadotdev%2Fprettydoc_experiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pachadotdev%2Fprettydoc_experiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pachadotdev","download_url":"https://codeload.github.com/pachadotdev/prettydoc_experiments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247952041,"owners_count":21023854,"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-10-10T19:20:35.433Z","updated_at":"2025-04-09T00:36:18.287Z","avatar_url":"https://github.com/pachadotdev.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Creating Pretty Documents From R Markdown\n\n\u003e Have you ever tried to find a lightweight yet nice theme for the R Markdown\ndocuments, like [this page](http://yixuan.cos.name/prettydoc/cayman.html)?\n\n### Themes for R Markdown\n\nWith the powerful [rmarkdown](http://rmarkdown.rstudio.com/index.html)\npackage, we could easily create nice HTML document\nby adding some meta information in the header, for example\n\n```yaml\n---\ntitle: Nineteen Years Later\nauthor: Harry Potter\ndate: July 31, 2016\noutput:\n  rmarkdown::html_document:\n    theme: lumen\n---\n```\n\nThe [html_document](http://rmarkdown.rstudio.com/html_document_format.html)\nengine uses the [Bootswatch](http://bootswatch.com/)\ntheme library to support different styles of the document.\nThis is a quick and easy way to tune the appearance of your document, yet with\nthe price of a large file size (\u003e 700KB) since the whole\n[Bootstrap](http://getbootstrap.com/) library needs to be packed in.\n\nFor package vignettes, we can use the\n[html_vignette](http://rmarkdown.rstudio.com/package_vignette_format.html)\nengine to generate a more lightweight HTML file that is meant to minimize the\npackage size, but the output HTML is less stylish than the `html_document` ones.\n\nSo can we do **BOTH**, a lightweight yet nice-looking theme for R Markdown?\n\n### The prettydoc Engine\n\nThe answer is YES! (At least towards that direction)\n\nThe **prettydoc** package provides an alternative engine, `html_pretty`,\nto knit your R Markdown document into pretty HTML pages.\nIts usage is extremely easy: simply replace the\n`rmarkdown::html_document` or `rmarkdown::html_vignette` output engine by\n`prettydoc::html_pretty` in your R Markdown header, and use one of the built-in\nthemes and syntax highlighters. For example\n\n```yaml\n---\ntitle: Nineteen Years Later\nauthor: Harry Potter\ndate: July 31, 2016\noutput:\n  prettydoc::html_pretty:\n    theme: cayman\n    highlight: github\n---\n```\n\nYou can also create documents from **prettydoc** templates in RStudio.\n\n**Step 1:** Click the \"New File\" button and choose \"R Markdown\".\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"http://yixuan.cos.name/prettydoc/images/step1.png\" alt=\"Step 1\" /\u003e\n\u003c/div\u003e\n\n**Step 2:** In the \"From Template\" tab, choose one of the built-in templates.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"http://yixuan.cos.name/prettydoc/images/step2.png\" alt=\"Step 2\" /\u003e\n\u003c/div\u003e\n\n### Options and Themes\n\nThe options for the `html_pretty` engine are mostly compatible with the default\n`html_document`\n(see the [documentation](http://rmarkdown.rstudio.com/html_document_format.html))\nwith a few exceptions:\n\n1. Currently the `theme` option can take the following values. More themes will\nbe added in the future.\n    - `cayman`: Modified from the [Cayman](https://github.com/jasonlong/cayman-theme) theme.\n    - `tactile`: Modified from the [Tactile](https://github.com/jasonlong/tactile-theme) theme.\n    - `architect`: Modified from the [Architect](https://github.com/jasonlong/architect-theme) theme.\n    - `leonids`: Modified from the [Leonids](https://github.com/renyuanz/leonids) theme.\n    - `hpstr`: Modified from the [HPSTR](https://github.com/mmistakes/hpstr-jekyll-theme) theme.\n2. The `highlight` option takes value from `github` and `vignette`.\n3. Options `code_folding`, `code_download` and `toc_float` are not applicable.\n\n### Related Projects\n\n- [tufte](https://github.com/rstudio/tufte) provides the Tufte style for\nR Markdown documents.\n- [BiocStyle](http://bioconductor.org/packages/release/bioc/html/BiocStyle.html)\nprovides standard formatting styles for Bioconductor PDF and HTML documents.\n- [rmdformats](https://github.com/juba/rmdformats) by Julien Barnier contains\nHTML formats and templates for R Markdown documents, with some extra features\nsuch as automatic table of contents, lightboxed figures, and dynamic crosstab\nhelper.\n- [markdowntemplates](https://github.com/hrbrmstr/markdowntemplates) by Bob Rudis\nis a collection of alternative R Markdown templates.\n- [prettyjekyll](https://github.com/privefl/prettyjekyll) by Florian Privé\nuses **prettydoc** to convert R Markdown documents to Jekyll Markdown for blog posting.\n\n\n### Gallery\n\nHere are some screenshots of the HTML pages generated by **prettydoc** with\ndifferent themes and syntax highlighters.\n\n#### Cayman [(demo page)](http://yixuan.cos.name/prettydoc/cayman.html)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"600px\" src=\"http://yixuan.cos.name/prettydoc/images/cayman.png\" alt=\"Cayman Theme\" /\u003e\n\u003c/div\u003e\n\n#### Tactile [(demo page)](http://yixuan.cos.name/prettydoc/tactile.html)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"600px\" src=\"http://yixuan.cos.name/prettydoc/images/tactile.png\" alt=\"Tactile Theme\" /\u003e\n\u003c/div\u003e\n\n#### Architect [(demo page)](http://yixuan.cos.name/prettydoc/architect.html)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"600px\" src=\"http://yixuan.cos.name/prettydoc/images/architect.png\" alt=\"Architect Theme\" /\u003e\n\u003c/div\u003e\n\n#### Leonids [(demo page)](http://yixuan.cos.name/prettydoc/leonids.html)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"800px\" src=\"http://yixuan.cos.name/prettydoc/images/leonids.png\" alt=\"Leonids Theme\" /\u003e\n\u003c/div\u003e\n\n#### HPSTR [(demo page)](http://yixuan.cos.name/prettydoc/hpstr.html)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"600px\" src=\"http://yixuan.cos.name/prettydoc/images/hpstr.png\" alt=\"HPSTR Theme\" /\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpachadotdev%2Fprettydoc_experiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpachadotdev%2Fprettydoc_experiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpachadotdev%2Fprettydoc_experiments/lists"}