{"id":16411964,"url":"https://github.com/amirmasoudabdol/primermd","last_synced_at":"2025-02-24T05:43:50.401Z","repository":{"id":41305001,"uuid":"507067225","full_name":"amirmasoudabdol/primermd","owner":"amirmasoudabdol","description":"An accessible, responsive, and readable theme for R Markdown based on GitHub’s Primer CSS framework","archived":false,"fork":false,"pushed_at":"2022-07-21T13:21:14.000Z","size":3893,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-06T06:12:49.278Z","etag":null,"topics":["primer-css","rmarkdown","rmarkdown-template","rstats"],"latest_commit_sha":null,"homepage":"https://primermd.amirmasoudabdol.name","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amirmasoudabdol.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-24T15:56:37.000Z","updated_at":"2022-07-20T14:53:20.000Z","dependencies_parsed_at":"2022-08-24T14:34:09.312Z","dependency_job_id":null,"html_url":"https://github.com/amirmasoudabdol/primermd","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/amirmasoudabdol%2Fprimermd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirmasoudabdol%2Fprimermd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirmasoudabdol%2Fprimermd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirmasoudabdol%2Fprimermd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amirmasoudabdol","download_url":"https://codeload.github.com/amirmasoudabdol/primermd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240427195,"owners_count":19799466,"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":["primer-css","rmarkdown","rmarkdown-template","rstats"],"created_at":"2024-10-11T06:47:10.763Z","updated_at":"2025-02-24T05:43:50.354Z","avatar_url":"https://github.com/amirmasoudabdol.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\neditor_options: \n  markdown: \n    wrap: 72\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit this file --\u003e\n\n# primermd \u003cimg src=\"man/figures/logo.png\" width=\"160\" align=\"right\"/\u003e\n\n**`{primermd}`** is a versatile template for `{rmarkdown}` based on [Primer\nCSS](http://primer.style/css/) developed by GitHub. Primer CSS is very readable, \naccessible, and responsive; however, it is really not meant to be used for \na simple one-page document. That being said, I quite like it, and that's why\nthis package exists! I wanted to be able to get as close as I can to GitHub's\nMarkdown rendering, so, I went with their framework! 🙃\n\n`{primermd}` is, by design, not very customizable, in fact, I have intentionally\nremoved some basic options that you can find in similar template packages, \ne.g., prismjs syntax highlight, Font Awesome. As said, my main goal is to\nreplicate GitHub's Markdown rendering, and add some of the features that they \nare adding to their website, e.g., check boxes, alerts, etc. \n\nIn the future, if I have some time, I would like to continue tweaking this, and \nkeeping it up to date with GitHub's changes, and aesthetic.\n\n![](man/figures/comparison.png)\n\n## Installation\n\nYou can install the latest development version from\n[GitHub](https://github.com/amirmasoudabdol/primermd/):\n\n``` r\nremotes::install_github(\"amirmasoudabdol/primermd\")\n```\n\nand, hopefully **soon**, you can install the released version of primermd from CRAN:\n\n``` r\n# ⚠️ Not Working Yet!\ninstall.packages(\"primermd\") \n```\n\n## Usage\n\nYou may activate the `{primermd}` theme by adding the following line to\nthe top of your R Markdown file.\n\n``` yaml\noutput: \n  primermd::html_document_primer\n```\n\n## Customizations\n\n{primermd} offers a few customization options and features, e.g., theme,\ntitle customization. You can tweak the behavior, and looks of the theme\nby adding more parameters to your YAML header as described below.\n\n### Themes\n\nPrimer CSS automatically adjusts to user's system settings, and it\ndelivers either light, or dark theme of the page accordingly based on\nthe current appearance of the system. If you wish to disable this\nautomatic behavior, you may set the `auto_theme` variable to `false`,\nand as a result adaptive theme-ing will be disabled.\n\nIn addition to default `light` and `dark` themes, you can choose two\ndarker themes, i.e., `dark_dimmed`, `dark_high_contrast`. You can select\neither of these themes using `light_theme` and `dark_theme` parameters.\n\n``` yaml\noutput: \n  primermd::html_document_primer:\n    auto_theme: true\n    light_theme: light\n    dark_theme: dark_dimmed\n```\n\n\u003e ⚠️ At the moment, RStudio does not adapt to user preferences and therefore \n{primermd} does not work as expcted inside the RStudio. However, if you open the\ngenerated file in your browser you'll get the adaptive behavior.\n\n### Title Customization\n\nBy default, {primermd} adds the title, subtitle, author and the date to\nthe top of the document; however, you can disable this by setting the\n`header` parameter to `false`.\n\n``` yaml\noutput: \n  primermd::html_document_primer:\n    header: false\n```\n\n### Footer Customization\n\nBy default, the footer of the page contains the authors names', but\nit is possible to hide the footer entirely by setting the `footer`\nparameter to `false`.\n\n``` yaml\noutput: \n  primermd::html_document_primer:\n    footer: false\n```\n\n### List Style\n\nBy setting the `list_style_none` parameter to `true`, you can remove bullets\nfrom an unordered list or numbers from an ordered list.\n\n``` yaml\noutput: \n  primermd::html_document_primer:\n    list_style: none\n```\n\n### Enable the Checkboxes\n\nBy setting the `enable_checkboxes` parameter to `true`, you can enable the\ncheck box controls such that readers can interact with them.\n\n``` yaml\noutput: \n  primermd::html_document_primer:\n    enable_checkboxes: true\n```\n\n### Syntax Highlight\n\nBy setting the `highlight` to `false`, you can disable the syntax highlighting.\n{primermd} does not allow you to change the color scheme of the code \nhighlighter. I'm working on enabling this, but it is a bit tricky because I want\nto have a list of schemes that look good with all the settings.\n\n## Todos\n\n- [ ] Make it possible to change the width of the page\n- [ ] Make use of [Octicons](https://primer.style/octicons/), replacing the\nFont Awesome\n- [ ] Add `use_primermd()`\n- [ ] Find a matching color scheme for syntax highlighting\n- [x] Make sure that the table of content looks alright\n\n## Acknowledgments\n\nI should thank [Garrick](https://github.com/gadenbuie) for his awesome R \nMarkdown themes, [cleanmd](https://github.com/gadenbuie/cleanrmd). I wanted to \nmake this theme for a while, but I had no time, and inspiration to start it. His\nproject motivated me to work on this project. Oh, and I could not have done it\nwithout his code. Thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirmasoudabdol%2Fprimermd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famirmasoudabdol%2Fprimermd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirmasoudabdol%2Fprimermd/lists"}