### Install and Run Docusaurus Docs Locally
Source: https://allcontributors.org/docs/en/project/contribute
Instructions for installing project dependencies using npm and launching a local development server for the Docusaurus documentation site. Requires Node.js and npm to be installed.
```bash
npm install
npm run start
```
--------------------------------
### Initialize all-contributors project
Source: https://allcontributors.org/docs/en/cli/installation
Initializes the all-contributors project within your current directory by running the 'init' command. This command will prompt you with questions to set up the contributor management system.
```bash
npx all-contributors init
# Or with yarn: yarn all-contributors init
# Or directly execute the bin
./node_modules/.bin/all-contributors init
```
--------------------------------
### Check npm and Node.js Versions
Source: https://allcontributors.org/docs/en/project/contribute
Bash commands to verify the installation and versions of npm and Node.js on your system. These are prerequisites for running the project's development server.
```bash
npm -v
node -v
```
--------------------------------
### Install all-contributors-cli using npm or yarn
Source: https://allcontributors.org/docs/en/cli/installation
Installs the all-contributors CLI tool as a development dependency in your project using either npm or yarn package managers. This is the recommended method for most Node.js projects.
```bash
npm i -D all-contributors-cli
# If you are a yarn user: yarn add --dev all-contributors-cli
```
--------------------------------
### Add shortcut scripts to package.json
Source: https://allcontributors.org/docs/en/cli/installation
Defines shortcut scripts within the 'scripts' section of your package.json file to easily execute all-contributors commands. This streamlines the workflow for adding and generating contributors.
```json
{
"scripts": {
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate"
}
}
```
--------------------------------
### Execute shortcut script to add contributor
Source: https://allcontributors.org/docs/en/cli/installation
Demonstrates how to use the defined shortcut script from package.json to add a contributor. This is an alternative to directly using 'npx all-contributors add'.
```bash
npx contributors:add jfmengels doc
```
--------------------------------
### Add and generate contributors using CLI
Source: https://allcontributors.org/docs/en/cli/installation
Adds a specific contributor with their contribution type and then generates the contributor list. This is a core workflow for updating contributor information.
```bash
npx all-contributors add jfmengels doc
npx all-contributors generate
```
--------------------------------
### Bot Configuration Example (.all-contributorsrc)
Source: https://allcontributors.org/docs/en/bot/configuration
This JSON object demonstrates the configuration options for the all-contributors bot. It includes settings such as project name, owner, repository type, file paths, image sizes, commit behavior, and custom templates for badges and contributor display. It also allows for specifying custom contribution types.
```json
{
"projectName": "all-contributors",
"projectOwner": "all-contributors",
"repoType": "github",
"repoHost": "https://github.com",
"files": ["README.md"],
"imageSize": 100,
"commit": false,
"contributorsPerLine": 7,
"contributorsSortAlphabetically": false,
"badgeTemplate": "[](#contributors)",
"contributorTemplate": "\">
\" width=\"<%= options.imageSize %>px;\" alt=\""/>
<%= contributor.name %>",
"wrapperTemplate": "\n
\n <%= bodyContent %> \n<%= tableFooterContent %>
\n\n",
"types": {
"custom": {
"symbol": "ðŸ”",
"description": "A custom contribution type.",
"link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),"
}
},
"linkToUsage": true,
"skipCi": true,
"contributors": []
}
```
--------------------------------
### Lint Markdown Files Locally
Source: https://allcontributors.org/docs/en/project/contribute
Commands to install markdownlint-cli globally and then use it to check and fix linting issues in markdown files within the docs directory. This ensures contributions adhere to markdown standards.
```bash
npm i -g markdownlint-cli
markdownlint --fix "docs/project/contribute.md"
markdownlint --fix "docs/**.md"
```
--------------------------------
### Minimal .all-contributorsrc Configuration
Source: https://allcontributors.org/docs/en/bot/installation
This is the minimal configuration file required for the All Contributors bot. It must be placed at the root of your repository. The bot will automatically update this file with default configurations after the first pull request.
```json
{
"projectName": "",
"projectOwner": ""
}
```
--------------------------------
### All Contributors README Markdown List
Source: https://allcontributors.org/docs/en/bot/installation
This code block is a placeholder for the contributors list in a README.md file. The All Contributors bot uses these markers to automatically populate the list of contributors.
```markdown
## Contributors
```
--------------------------------
### Static All Contributors Badge (Previously)
Source: https://allcontributors.org/docs/en/bot/faq
This code snippet shows the previous method of displaying the All Contributors badge using a static count. It is intended for reference and should not be used for new implementations.
```html
[](#contributors)
```
--------------------------------
### Add Contributor using all-contributors CLI
Source: https://allcontributors.org/docs/en/cli/usage
This command is used to add new contributors to your project or to record new contributions made by existing contributors. It updates the configuration file and the contributor list, similar to the generate command. The username should be the user's GitHub or GitLab username, and the contribution type is a comma-separated list.
```bash
# Add new contributor , who made a contribution of type
all-contributors add
# Example:
all-contributors add jfmengels code,doc
```
--------------------------------
### Dynamic All Contributors Badge (Now)
Source: https://allcontributors.org/docs/en/bot/faq
This code snippet demonstrates the current method for displaying the All Contributors badge using a dynamic Shields badge. It requires replacing placeholders with actual GitHub project owner and repository names. Customization of style and color is supported via Shields.io parameters.
```html
[](#contributors)
```
--------------------------------
### Set Private Token for GitLab/GitHub API
Source: https://allcontributors.org/docs/en/cli/usage
Environment variables for 'PRIVATE_TOKEN' are used to authenticate with GitHub and GitLab APIs, helping to circumvent rate limits, especially for projects with many contributors or on self-hosted GitLab instances. The method for setting this variable differs between Linux and Windows operating systems.
```bash
# set private token on Linux
export PRIVATE_TOKEN=your_private_token
# set private token on Windows
set PRIVATE_TOKEN=your_private_token
```
--------------------------------
### Modify File Configuration
Source: https://allcontributors.org/docs/en/bot/configuration
This JSON snippet shows how to update the `files` array within the `.all-contributorsrc` configuration to specify a different file for the contributors table, such as `CONTRIBUTORS.md`, instead of the default `README.md`.
```json
{
"files": [
"CONTRIBUTORS.md"
],
...
}
```
--------------------------------
### Add Contributor Command for All Contributors Bot
Source: https://allcontributors.org/docs/en/bot/usage
This command is used to request the All Contributors bot to add a new contributor to the project. You need to specify the username and the type of contribution. The bot will then create a Pull Request.
```markdown
@all-contributors please add @ for
```
--------------------------------
### Add Multiple Contributors Command for All Contributors Bot
Source: https://allcontributors.org/docs/en/bot/usage
This demonstrates how to add multiple contributors in a single comment to the All Contributors bot. It can be done using a single line with multiple commands or by using multiple lines, each specifying a contributor and their contributions.
```markdown
@all-contributors please add @ for . please add @ for .
```
```markdown
@all-contributors
please add @ for .
please add @ for .
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.