---
title: "allcontributors"
author: "Mark Padgham"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float: true
number_sections: false
theme: flatly
vignette: >
%\VignetteIndexEntry{allcontributors}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r pkg-load, echo = FALSE, message = FALSE}
library (allcontributors)
```
The main functionality of the [`allcontributors`
package](https://github.com/ropensci/allcontributors) is described in the
main [`README`](https://docs.ropensci.org/allcontributors/). This vignette
provides a visual reference for the various options available for formatting
contributors.
## Default Grid Format
The following represents the default format of contributors divided into three
sections ("Code", "Issue Authors", and "Issue Contributors"), with each section
formatted as a grid with seven columns (determined by the [`ncols`
parameter](https://docs.ropensci.org/allcontributors/reference/add_contributors.html)).
The images ("Avatars") are hyperlinked to the main github pages of each
contributor, and the github names below them are linked to the contributions
made to the package by each contributor. The following uses dummy avatars
simply to reduce the compiled size of this vignette, and also uses dummy names
for all except the first. (The names are dummy only in the sense of being
entirely generic, although they actually do belong to real people - click to
find out.)
### Code
### Issue Authors
### Issue Contributors
---
## Section Organisation
The default output shown above has three sections of "Code", "Issue Authors"
and "Issue Contributors". The organisation of these sections can be controlled
by the parameters `num_sections`, `type`, and `section_names`.
The `type` parameter enables sections to be removed by reducing them from the
default three referred to as `code`, `issues` (for those who open issues), and
`discussion` (for those who contribute to issues). For example, passing `type =
"code"` will only acknowledge direct contributions to code, while ignoring all
those who contributed to issues only.
The `num_sections` argument is provided for convenience, primarily in order to
allow default formats to have either one, two, or three sections. Specifying
`num_sections = 2` will by default collapse the "Issue Authors" and "Issue
Contributors" sections into a single section named "Issues". (This section title
may be renamed with the `section_names` parameter.)
## List Format
The `format` parameter of the [`add_contributors()`
function](https://docs.ropensci.org/allcontributors/reference/add_contributors.html)
accepts the three options of "grid", "list", or "text." With the three default
section titles as shown above, the "list" option gives output that looks like this:
### Code
- mpadge
- this-person
- that-person
- somebody
- somebody-else
- them
- others
### Issue Authors
- nobody
- somebody
- anybody
- nope
- yep
- maybe
- doubtful
### Issue Contributors
- here
- there
- anywhere
- somewhere
- nowhere
- sometime
- later
## Text Format
Finally, the text format enables contributors to be acknowledged as a single
lines of text.
### Code
mpadge,
this-person,
that-person,
somebody,
somebody-else,
them,
others
### Issue Authors
nobody,
somebody,
anybody,
nope,
yep,
maybe,
doubtful
### Issue Contributors
here,
there,
anywhere,
somewhere,
nowhere,
sometime,
later
The shortest possible way of acknowledging your contributors would be like this:
```{r short, eval = FALSE}
add_contributors (num_sectons = 1, format = "text")
```
which would in this case convert the above into the single list of,
mpadge,
this-person,
that-person,
somebody,
somebody-else,
them,
others,
nobody,
somebody,
anybody,
nope,
yep,
maybe,
doubtful,
here,
there,
anywhere,
somewhere,
nowhere,
sometime,
later