Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion src/content/docs/cli/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ title: CLI Configuration
sidebar_label: Configuration
---

> Please refer to this [documentation for the configuration](../bot/configuration).
Please refer to the [bot documentation for CLI configuration information](../../bot/configuration).
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
id: installation
title: CLI Installation
title: All-Contributors CLI Installation
sidebar_label: Installation
---
import { Aside } from '@astrojs/starlight/components';

## 1. Install the CLI tool
| [![NPM Version](https://img.shields.io/npm/v/all-contributors-cli.svg)](https://www.npmjs.com/package/all-contributors-cli) | [![AUR Version](https://img.shields.io/aur/version/all-contributors-cli.svg)](https://aur.archlinux.org/packages/all-contributors-cli) |
| --- | --- |

<a href="https://www.npmjs.com/package/all-contributors-cli">
<img src="https://img.shields.io/npm/v/all-contributors-cli.svg" alt="NPM Version" />
</a>
<a href="https://aur.archlinux.org/packages/all-contributors-cli">
<img src="https://img.shields.io/aur/version/all-contributors-cli.svg" alt="AUR Version" />
</a>
## 1. How to Install the All-Contributors CLI tool

This module is distributed via [npm](https://www.npmjs.com/) which is bundled with [node](https://nodejs.org/) and
should be installed as one of your project's `devDependencies`:
The all-contributors CLI module is distributed via [npm](https://www.npmjs.com/) which is bundled with [node](https://nodejs.org/) and
should be installed as one of your project's `devDependencies`.

To install it run:

```console
npm i -D all-contributors-cli
Expand All @@ -23,7 +22,9 @@ npm i -D all-contributors-cli

Alternatively, Arch Linux users can install the [`all-contributors-cli`](https://aur.archlinux.org/packages/all-contributors-cli) package from the AUR.

> The CLI is node-based, if you don't wish to add a node dependency use the [@all-contributors bot 🤖](../bot/overview)
<Aside type="tip">
The CLI is node-based, if you don't wish to add a node dependency use the [@all-contributors bot 🤖](../bot/overview)
</Aside>

## 2. Init the Project

Expand Down Expand Up @@ -65,13 +66,8 @@ For example:
}
```

To allow shortcuts such as:
To support shortcuts such as:

```console
npx contributors:add jfmengels doc
```

## What's next

- [Using the CLI](usage)
- [Configuring the CLI](configuration)
24 changes: 10 additions & 14 deletions src/content/docs/cli/overview.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
---
id: overview
title: CLI Overview
title: All-Contributors Command Line Overview
sidebar_label: Overview
---

<a href="https://www.npmjs.com/package/all-contributors-cli">
<img src="https://img.shields.io/npm/v/all-contributors-cli.svg" alt="NPM Version" />
</a>
<a class="github-button" href="https://github.com/all-contributors/all-contributors-cli" data-icon="octicon-star" data-count-href="/all-contributors/all-contributors-cli/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub" >Star</a>
| [![NPM Version](https://img.shields.io/npm/v/all-contributors-cli.svg)](https://www.npmjs.com/package/all-contributors-cli) | [![GitHub Stars](https://img.shields.io/github/stars/all-contributors/all-contributors-cli?style=social)](https://github.com/all-contributors/all-contributors-cli) |
| --- | --- |

## The problem
## About the the All-Contributors Command Line Interface (CLI)

You want to implement the [All Contributors](../specification) spec, but don't
want to maintain the table by hand
The all-contributors-cli is a tool that helps you automate adding contributor acknowledgements for your GitHub or GitLab repository at the command line. THe GitHub bot allows you to call our bot in a issue or pull request.

## The CLI solution
You want to use the command line because:
- You want to add contributors in bulk
- You want to add contributors as part of your project scripts
- You want to add contributors as part of your continuous integration (CI) process

The all-contributors-cli is a tool to help automate adding contributor acknowledgements for your GitHub or GitLab repository.

- [Installing the CLI](installation)
- [Using the CLI](usage)
- [Configuring the CLI](configuration)
Similar to the bot, the CLI allows you to implement the [All Contributors](../specification) spec, without maintaining the contributor table by hand.
43 changes: 22 additions & 21 deletions src/content/docs/cli/usage.md → src/content/docs/cli/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
---
id: usage
title: CLI Usage
title: Using the All-Contributors CLI
sidebar_label: Usage
---
import { Aside } from '@astrojs/starlight/components';

> This usage documentation assumes you have already followed the [cli installation steps](installation).
<Aside type="tip"> This usage documentation assumes you have already followed the [cli installation steps](installation). Below you will learn how to use the CLI with the `all-contributors` command, to keep things simple. If you are having any difficulties running the command on it's own, then give the `npx all-contributors-cli init` route a try 😺.</Aside>

A quick note: Below we'll just show `all-contributors` to keep things simple, but if you're having any difficulties, then give the `npx all-contributors-cli init` route a try 😺.

## Commands

<AUTOGENERATED_TABLE_OF_CONTENTS>
## All-Contributors Command Line Interface Commands

### `all-contributors init`

Run this when you first start using the all-contributors-cli. This command asks a few questions and sets up the project for all-contributors.
This setup includes creating a `.all-contributorsrc` configuration file and creating a contributor table in the `files` you specify (usually your `README.md`).
You can run `all-contributors init` when you first start using the All-Contributors CLI. This command asks a you few questions. It then, sets up the project to support All-Contributors.

The setup includes creating:
* an `.all-contributorsrc` configuration file and
* a contributor table in the `files` you specify.

The default file for the contributor table is your `README.md`.

### `all-contributors add`

Use `add` to add new contributors to your project, or add new ways in which they
have contributed. They will be added to your configuration file, and the
Use the `add` command to add:
* new contributors to your project, or
* add new ways in which they have contributed.

For instance, a user may have already contributed code, but after they add a documentation pull request you might want to add them for documentation too. The contributor will be added to your configuration file, and the
contributors file will be updated just as if you used the [generate command](#all-contributors-generate).

```console
Expand All @@ -31,19 +37,18 @@ all-contributors add jfmengels code,doc
```

Where `username` is the user's GitHub or Gitlab username, and `contribution` is a
`,`-separated list of contributions. See the [Emoji Key (Contribution Types Reference)](../emoji-key)
`,`-separated list of contributions. See the [Emoji Key (Contribution Types Reference)](../../emoji-key)
for a list of valid `contribution` types.

> **GitLab Users**: See the [additional requirements for GitLab users](#gitlab-users)
<Aside type="tip"> **GitLab Users**: See the [additional requirements for GitLab users](#gitlab-users) </Aside>

### `all-contributors check`

Use `check` to compare contributors from GitHub with the ones credited in your
`.all-contributorsrc` file, to make sure that credit is given where
it's due.

> Due to GitHub API restrictions, this command only works for projects with less
> than 500 contributors (Unless you set a `PRIVATE_TOKEN` as mentioned [below in GitHub users](#github-users)).
<Aside type="note"> Due to GitHub API restrictions, this command only works for projects with less than 500 contributors (Unless you set a `PRIVATE_TOKEN` as mentioned [below in GitHub users](#github-users)). </Aside>

### `all-contributors generate`

Expand Down Expand Up @@ -73,17 +78,13 @@ In some cases you may see the error message `GitHub API rate limit exceeded for
## GitLab Users

Please note that if you are using a self-hosted GitLab instance,
some commands will need you to set an environment variable named `PRIVATE_TOKEN` first.
some commands will require you to set an environment variable named `PRIVATE_TOKEN` first.

> Private token is the personal access token to authenticate with the GitLab API.
<Aside type="tip"> Private token is the personal access token to authenticate with the GitLab API.</Aside>

```console
# set private token on Linux
export PRIVATE_TOKEN=your_private_token
# set private token on Windows
set PRIVATE_TOKEN=your_private_token
```

## What's next

- [Configuring the CLI](configuration)
```
7 changes: 6 additions & 1 deletion src/content/docs/project/code-of-conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <[email protected]>. All
reported by contacting the project team.

We are currently working on a new COC team here at All Contributors so please bare with us as we rework our documentation and governance structures.


All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality concerning the reporter of an incident.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ id: contribute
title: Contribute, and help us improve
sidebar_label: Help us Improve
---
import { Aside } from '@astrojs/starlight/components';
import { Picture } from "astro:assets";
import editPage from '@assets/edit-this-page.png';
import translating from '@assets/translating-xpath.png';

> Call for translators! [We're looking for translators](https://github.com/all-contributors/all-contributors/issues/143) to help translate this spec for everyone!
[![GitHub stars](https://img.shields.io/github/stars/all-contributors/all-contributors?style=social)](https://github.com/all-contributors/all-contributors)

<Aside type="tip">Call for translators! [We're looking for translators](https://github.com/all-contributors/all-contributors/issues/143) to help translate this spec for everyone!</Aside>

## Help improve the all-contributors documentation!

Expand All @@ -20,12 +26,14 @@ If you're not used to it or are afraid to mistype a commit, you can run `npm run

## Editing Content

> **Pro Tip**: Every page has an _Edit_ button up the top, clicking this will take you straight to the GitHub source code for that page
<Aside type="tip">Every page has an _Edit_ button up the top, clicking this will take you straight to the GitHub source code for that page</Aside>

Once on a file, click the 'pencil' icon to [easily edit the file inline](https://help.github.com/articles/editing-files-in-your-repository/)
<div align="center">
<img src="/images/edit-this-page.png" alt="Example on how to edit a page" width="800px" />
</div>
After making your changes, scroll to the bottom of the page to create a commit with your changes. You will want to create and commit these changes on a new branch in your fork of the repository.

After committing your changes, you can create a pull request to propose your changes to be merged into the main branch.

<Picture src={editPage} formats={['avif', 'webp']} alt="A screenshot that shows the GitHub interface with a file open focused on the pencil icon that allows you to edit the page." />

## Translations

Expand All @@ -35,7 +43,8 @@ Our translations are managed through crowdin. You can help contribute by heading
If you like, [comment on this issue](https://github.com/all-contributors/all-contributors/issues/143) to let us know you're helping or if you have any queries!

> When translating, anything that has the [XPATH](https://developer.mozilla.org/en-US/docs/Web/XPath) `@href`, `@src` etc mustn't be translated. Things like `code` should not be either. This will cause the project to 404. See the below image for an example:
<img src="/images/translating-xpath.png" alt="Contribute to translating" />

<Picture src={translating} formats={['avif', 'webp']} alt="A screenshot that shows the GitHub interface with a file open focused on the pencil icon that allows you to edit the page." />

> However, it's recommended to translate any content that would contribute to a better comprehension like the comments in `code` tags _as long as_ it doesn't change the actual code since it only understands English.

Expand All @@ -56,11 +65,7 @@ If you like, [comment on this issue](https://github.com/all-contributors/all-con

### Change deployments

After you translate strings in any given language, you won't see those changes appearing live until the `master` branch was updated followed by a successful deployment.

## Search

Search is by algolia, the configuration is at <https://github.com/algolia/docsearch-configs/blob/main/configs/all-contributors.json>
After you translate strings in any given language, you won't see those changes appearing live until the `main` branch was updated followed by a successful deployment.

## Run the website locally:

Expand Down Expand Up @@ -95,22 +100,16 @@ Once you have completed the above, you can launch a server locally that will bui
### Make changes - linting your contribution

If you make changes to a markdown file in the site, then our linting action will
check those changes. To run the linter yourself on a file locally:

First install markdownlint-cli:
check those changes. To run the linter yourself locally on the documentation before submitting a PR use:

`npm i -g markdownlint-cli`
`npm run lint`

Then run markdownlint on the file (or files) that you wish to check:
You can also run it manually on specific files like this:

`markdownlint --fix "src/content/docs/contribute.md"`

Or you can run it on all files in the docs directory, like this:

`markdownlint --fix "src/content/docs/**.md"`

## Add yourself as a contributor

To add yourself to the table of contributors, follow the [bot usage instructions](../bot/usage) ;).
To add yourself to the table of contributors, follow the [bot usage instructions](../../bot/usage).

[the crowdin project]: https://crowdin.com/project/all-contributors