diff --git a/astro.config.mjs b/astro.config.mjs index 38eb18b0..ce37c731 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -30,17 +30,17 @@ export default defineConfig({ { label: 'Specification', items: [ - { label: 'overview', slug: 'overview' }, + { label: 'spec overview', slug: 'overview' }, { label: 'specification', slug: 'specification' }, { label: 'emoji-key', slug: 'emoji-key' }, - { label: 'repository-maintainers', slug: 'repository-maintainers' }, + { label: 'usage tips', slug: 'usage-tips' }, { label: 'tooling', slug: 'tooling' } ], }, { label: '@all-contributors Bot 🤖', items: [ - { label: 'overview', slug: 'bot/overview' }, + { label: 'bot overview', slug: 'bot/overview' }, { label: 'installation', slug: 'bot/installation' }, { label: 'usage', slug: 'bot/usage' }, { label: 'configuration', slug: 'bot/configuration' }, @@ -50,7 +50,7 @@ export default defineConfig({ { label: 'CLI', items: [ - { label: 'overview', slug: 'cli/overview' }, + { label: 'CLI overview', slug: 'cli/overview' }, { label: 'installation', slug: 'cli/installation' }, { label: 'usage', slug: 'cli/usage' }, { label: 'configuration', slug: 'cli/configuration' } @@ -60,8 +60,9 @@ export default defineConfig({ label: 'Project', items: [ { label: 'contribute', slug: 'project/contribute' }, + { label: 'development', slug: 'project/development' }, { label: 'code-of-conduct', slug: 'project/code-of-conduct' }, - { label: 'implementations', slug: 'project/implementations' } + { label: 'implementations', slug: 'project/implementations' }, ], }, ], @@ -69,5 +70,10 @@ export default defineConfig({ vite: { plugins: [tailwindcss()], + resolve: { + alias: { + '@assets': '/src/assets', + }, + }, }, }); \ No newline at end of file diff --git a/public/images/logo-full.svg b/public/images/logo-full.svg index f503e390..5b0aa460 100644 --- a/public/images/logo-full.svg +++ b/public/images/logo-full.svg @@ -1 +1,24 @@ - + + + + + + + + + + diff --git a/src/assets/bot-usage.png b/src/assets/bot-usage.png new file mode 100644 index 00000000..56f550d6 Binary files /dev/null and b/src/assets/bot-usage.png differ diff --git a/src/assets/logo-full.svg b/src/assets/logo-full.svg index f503e390..5b0aa460 100644 --- a/src/assets/logo-full.svg +++ b/src/assets/logo-full.svg @@ -1 +1,24 @@ - + + + + + + + + + + diff --git a/src/content/docs/emoji-key.md b/src/content/docs/emoji-key.md index 1ab2c438..af32a1e4 100644 --- a/src/content/docs/emoji-key.md +++ b/src/content/docs/emoji-key.md @@ -4,47 +4,57 @@ title: Emoji Key ✨ (and Contribution Types) sidebar_label: Emoji Key ✨ --- -## Table - -> To have a contribution added when using the [Bot](bot/overview) or [CLI](cli/overview) use the keyword in the `Type` column. The bot will also use [basic Natural Language Parsing](https://github.com/all-contributors/app/blob/main/lib/parse-comment.js) to determine your contribution intent. - -Emoji/Type | Represents | Comments | -:---: | :---: | :---: | -🔊
`audio` | Audio | Podcasts, background music or sound effects | -♿️
`a11y` | Accessibility | Reporting or working on accessibility issues | -🐛
`bug` | Bug reports | Links to issues reported by the user on this project | -📝
`blog` | Blogposts | Links to the blogpost | -💼
`business` | Business Development | People who execute on the business end | -💻
`code` | Code | Links to commits by the user on this project | -🖋
`content` | Content | e.g. website copy, blog posts are separate | -🔣
`data` | Data | Links to contributed data for the project (both tests and datasets) | -📖
`doc` | Documentation | Links to commits by the user on this project, Wiki, or other source of documentation | -🎨
`design` | Design | Links to the logo/iconography/visual design/etc. | -💡
`example` | Examples | Links to the examples | -📋
`eventOrganizing` | Event Organizers | Links to event page | -💵
`financial` | Financial Support | People or orgs who provide financial support, links to relevant page | -🔍
`fundingFinding` | Funding/Grant Finders | People who help find financial support | -🤔
`ideas` | Ideas & Planning | | -🚇
`infra` | Infrastructure | Hosting, Build-Tools, etc. Links to source file (like `travis.yml`) in repo, if applicable | -🚧
`maintenance` | Maintenance | People who help in maintaining the repo, links to commits by the user on this project | -🧑‍🏫
`mentoring` | Mentoring | People who mentor new contributors, links to the repo home | -📦
`platform` | Packaging | Porting to support a new platform | -🔌
`plugin` | Plugin/utility libraries | Links to the repo home | -📆
`projectManagement` | Project Management | | -📣
`promotion` | Promotion | | -💬
`question` | Answering Questions | Answering Questions in Issues, Stack Overflow, Gitter, Slack, etc. | -🔬
`research` | Research | Literature review. | -👀
`review` | Reviewed Pull Requests | | -🛡️
`security` | Security | Identify and/or reduce security threats, GDPR, Privacy, etc | -🔧
`tool` | Tools | Links to the repo home | -🌍
`translation` | Translation | Links to the translated content | -⚠️
`test` | Tests | Links to commits by the user on this project | -✅
`tutorial` | Tutorials | Links to the tutorial | -📢
`talk` | Talks | Links to the slides/recording/repo/etc | -📓
`userTesting` | User Testing | Links to user test notes | -📹
`video` | Videos | Links to the video | - -## What's next - -- [Notes for repository maintainers](repository-maintainers) -- [Automating the process using tools](tooling) +## About the Emoji Table + +To have a contribution added when using the [Bot](bot/overview) or [CLI](cli/overview) use the keyword in the `Type` column. + +For example if you add a comment in an issue or Pull Request on GitHub like this: + +`@all-contributors add @usernamehere for a11y` + +Then the bot will add the user (usernamehere) as a contributor with the `Accessibility` contribution type to your project's README file. +You can also use multiple contribution types like this: + +`@all-contributors add @usernamehere for a11y, docs, infra` + +And the bot will add those contribution types to the user's existing contribution types. If the user is not already a contributor, the bot will add them as a new contributor with those contribution types. + +### Natural Language Processing + +The bot will use [basic Natural Language Parsing](https://github.com/all-contributors/app/blob/main/lib/parse-comment.js) to determine your contribution intent. + +| Emoji/Type | Represents | Comments | +| :---: | :---: | :---: | +| 🔊
`audio` | Audio | Podcasts, background music or sound effects | +| ♿️
`a11y` | Accessibility | Reporting or working on accessibility issues | +| 🐛
`bug` | Bug reports | Links to issues reported by the user on this project | +| 📝
`blog` | Blogposts | Links to the blogpost | +| 💼
`business` | Business Development | People who execute on the business end | +| 💻
`code` | Code | Links to commits by the user on this project | +| 🖋
`content` | Content | e.g. website copy, blog posts are separate | +| 🔣
`data` | Data | Links to contributed data for the project (both tests and datasets) | +| 📖
`doc` | Documentation | Links to commits by the user on this project, Wiki, or other source of documentation | +| 🎨
`design` | Design | Links to the logo/iconography/visual design/etc. | +| 💡
`example` | Examples | Links to the examples | +| 📋
`eventOrganizing` | Event Organizers | Links to event page | +| 💵
`financial` | Financial Support | People or orgs who provide financial support, links to relevant page | +| 🔍
`fundingFinding` | Funding/Grant Finders | People who help find financial support | +| 🤔
`ideas` | Ideas & Planning | Open up issues | +| 🚇
`infra` | Infrastructure | Hosting, Build-Tools, etc. Links to source file (like `travis.yml`) in repo, if applicable | +| 🚧
`maintenance` | Maintenance | People who help in maintaining the repo, links to commits by the user on this project | +| 🧑‍🏫
`mentoring` | Mentoring | People who mentor new contributors, links to the repo home | +| 📦
`platform` | Packaging | Porting to support a new platform | +| 🔌
`plugin` | Plugin/utility libraries | Links to the repo home | +| 📆
`projectManagement` | Project Management | Organize team meetings, take minutes, set timelines, etc. | +| 📣
`promotion` | Promotion | Social media | +| 💬
`question` | Answering Questions | Answering Questions in Issues, Stack Overflow, Gitter, Slack, etc. | +| 🔬
`research` | Research | Literature review. | +| 👀
`review` | Reviewed Pull Requests | | +| 🛡️
`security` | Security | Identify and/or reduce security threats, GDPR, Privacy, etc | +| 🔧
`tool` | Tools | Links to the repo home | +| 🌍
`translation` | Translation | Links to the translated content | +| ⚠️
`test` | Tests | Links to commits by the user on this project | +| ✅
`tutorial` | Tutorials | Links to the tutorial | +| 📢
`talk` | Talks | Links to the slides/recording/repo/etc | +| 📓
`userTesting` | User Testing | Links to user test notes | +| 📹
`video` | Videos | Links to the video | diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 7c2f5cf2..52660cf0 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -9,47 +9,33 @@ hero: tagline: Including those that don't push code. image: alt: A glittering, brightly colored logo - file: "../../assets/hero.png" + file: "@assets/hero.png" + actions: + - text: Install the bot + link: /bot/installation + icon: right-arrow + - text: View on GitHub + link: https://github.com/all-contributors/all-contributors + icon: external + variant: minimal + attrs: + rel: me --- import "../../styles/allcontributors.scss"; import { LinkCard, CardGrid } from "@astrojs/starlight/components"; import { Picture } from "astro:assets"; import { LinkButton } from '@astrojs/starlight/components'; -import addContributors from "../../assets/add-contributors.png"; -import heroImg from '../../assets/hero.png'; -import swoosh from '../../assets/bg-swoop.svg'; -import howItWorks from '../../assets/how-it-works.png'; -import p5jsLogo from '../../assets/p5js.png'; -import snipeitLogo from '../../assets/snipeit.png'; -import golearningLogo from '../../assets/golearning.png'; -import formikLogo from '../../assets/formik.png'; +import addContributors from '@assets/add-contributors.png'; +import heroImg from '@assets/hero.png'; +import swoosh from '@assets/bg-swoop.svg'; +import howItWorks from '@assets/how-it-works.png'; +import p5jsLogo from '@assets/p5js.png'; +import snipeitLogo from '@assets/snipeit.png'; +import golearningLogo from '@assets/golearning.png'; +import formikLogo from '@assets/formik.png'; - - -
-
- {/* Left side: Text and button */} -
-

- Recognize All Contributors -

-

Including those that don't push code

- Install the Bot -
- - {/* Right side: Hero image */} -
- -
-
-
- -
+
## Add New Contributors in Seconds @@ -59,7 +45,6 @@ so you can focus on your project instead of managing your ReadMe.
-
@@ -89,7 +74,7 @@ so you can focus on your project instead of managing your ReadMe.
{/* Left: Image */} - -
-

Start adding contributors to your project today

+
+

Start adding contributors to your project today

Install the Bot Read the Docs diff --git a/src/content/docs/overview.mdx b/src/content/docs/overview.mdx index e855f200..b9ca5901 100644 --- a/src/content/docs/overview.mdx +++ b/src/content/docs/overview.mdx @@ -3,16 +3,15 @@ id: overview title: Overview sidebar_label: Overview --- +import { Picture } from "astro:assets"; +import { Aside } from '@astrojs/starlight/components'; +import contributorsTableSmall from '@assets/contributors-table-small.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) -
- ✨ All Contributors ✨ -
- -Star + -This is a specification for recognizing contributors to an open-source project in a way that rewards every contribution, not just code. +All-contributors is a specification for recognizing contributors to an open-source project in a way that rewards every contribution, not just code. The basic idea is this: @@ -22,16 +21,11 @@ People are giving themselves and their free time to contribute to open source pr ## The All Contributors Table -Below is an example of how using the all-contributors spec table can recognize all contributors -
- All Contributors Table Screenshot +Below is an example of how using the all-contributors spec table can recognize all contributors. +
+
-> You can use [the @all-contributors bot 🤖](bot/overview) to automate acknowledging contributors to your open source projects - -## What's next - -- [The all contributors specification](specification) -- [Emoji Key (Contribution Types Reference)](emoji-key) -- [Notes for repository maintainers](repository-maintainers) -- [Automating the process using tools](tooling) + diff --git a/src/content/docs/project/development.mdx b/src/content/docs/project/development.mdx new file mode 100644 index 00000000..deff3634 --- /dev/null +++ b/src/content/docs/project/development.mdx @@ -0,0 +1,90 @@ +--- +id: development +title: Development Guide +sidebar_label: development +--- +import { Aside } from '@astrojs/starlight/components'; + +Welcome to the development guide for the All Contributors documentation site! + +## How to Work On Our Documentation + +Our docs are built using [Astro](https://astro.build/) and the [Starlight](https://starlight.astro.build/) theme. +Astro is a javascript based static site generator. +It is is designed for building fast, modern websites with a focus on performance and flexibility. +It allows us to write components in multiple frameworks. +Astro ships only the minimal JavaScript needed. + +We use the [Starlight theme with Astro](https://starlight.astro.build/). +Starlight provides a beautiful, accessible, and feature-rich documentation platform out of the box. +It handles navigation, search, dark mode, and supports [Tailwind CSS](https://tailwindcss.com/docs). + +## MDX Files + +Our documentation pages are largely written using the **MDX** (`.mdx`) format. This format supports Markdown with the additional ability to include components and custom elements directly in the content. This allows us to embed images, asides, and other interactive elements easily. + + + +## Images paths and aliases + +All images live in the assets directory. +We defined an alias to the assets directory in the site configuration file (`astro.config.mjs`) to make referencing items easier. + +To see how this is defined, go to `astro.config.mjs`. +The alias for assets (@assets) is defined there: + +```js +vite: { + plugins: [tailwindcss()], + resolve: { + alias: { + '@assets': '/src/assets', + }, + }, +``` + + +## Adding Images to the Docs + +We use the `` utility to add images to our documentation. This utility supports a web compression feature that will automatically convert images to formats like webp and avif upon rendering. + +To use the Picture utility, + +1. First import the utility at the top of the `.mdx` file like this + ```markdown + import { Picture } from "astro:assets"; + ``` +2. Optionally, define an alias for your image path at the top of the MDX file. + You can also call it directly using a path. + The image below has an alias of contributorsTableSmall and it's located in the assets directory of the site: + ```markdown + import contributorsTableSmall from '@assets/contributors-table-small.png'; + ``` +3. Use the `Picture` utility in your MDX page like this + ```markdown + + ``` + +Notice that above we specify both avif and webp as formats. +This will allow the browser to choose the best format it supports. + +## Styling Pages + +Astro and Starlight support [Tailwind CSS](https://tailwindcss.com/docs) for styling. +You can add custom styles to individual pages using the `class` attribute on HTML elements. + +In the config file code snippet above, you can see that Tailwind CSS is included as a Vite plugin. This allows us to use Tailwind's utility classes throughout our MDX files. + +Tailwind is also a required dependency for Starlight, so it is already set up and ready to use. + +## Fonts + +The all contributors documentation site uses the Google Font **Poppins** as a base font. For convenience and web page loading speed, we have vendored the font have vendored the font in the assets/fonts directory for quicker loading and rendering times. + + diff --git a/src/content/docs/specification.md b/src/content/docs/specification.mdx similarity index 85% rename from src/content/docs/specification.md rename to src/content/docs/specification.mdx index 04cee0bc..c2996c59 100644 --- a/src/content/docs/specification.md +++ b/src/content/docs/specification.mdx @@ -1,12 +1,17 @@ --- id: specification -title: Specification +title: All Contributors Bot Specification sidebar_label: Specification --- +import { Aside } from '@astrojs/starlight/components'; +import { Picture } from "astro:assets"; +import contributorsTableSmall from '@assets/contributors-table-small.png'; + An example of how using the all-contributors spec table can recognize all contributors -
- Contributors Table Screenshot + +
+
## Mandatory @@ -25,7 +30,7 @@ Open source projects should include the following mandatory items to support the - The order of contributors is immaterial to the spec. Order them how you wish. 3. Projects should define contributors as those who contribute to a project in any of the Contribution Categories at any level of contribution. This specification is, by definition, inclusive of all contributions. In cases where projects deviate from the Contribution Categories or require a specific contribution level to meet criteria as a project contributor, the project should provide explicit documentation of the definitions that satisfy the project contributor criteria in the CONTRIBUTING document or a similar prominent public document at the top level of the project repository. This specification recommends against the exclusion of an individual from the Contributor list based upon the perceived level of contribution. Instead, projects should use indicators of effort within a list that remains inclusive of all contributors to the project at any level of effort. If used, these effort indicators are at the discretion of the project and are not currently specified. -> **Pro tip:** You can use [the @all-contributors bot 🤖](bot/overview) to automate acknowledging contributors to your open source projects ✨ + ## Optional @@ -33,9 +38,3 @@ Projects should consider the following optional items as part of their commitmen 1. The user's avatar can be included and is recommended. 2. An optional link from the Contribution Category indicator to the category-specific contribution(s) can be included to provide additional information about the project contribution(s) as detailed in the section below. - -## What's next - -- [Emoji Key (Contribution Types Reference)](emoji-key) -- [Notes for repository maintainers](repository-maintainers) -- [Automating the process using tools](tooling) diff --git a/src/content/docs/tooling.md b/src/content/docs/tooling.md deleted file mode 100644 index a5f25391..00000000 --- a/src/content/docs/tooling.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -id: tooling -title: Automating Updates with Tooling -sidebar_label: Tooling ---- - -## Motivation - -Implementing the [All Contributors spec](specification) by hand is a laborious process. - -### All Contributors Bot - -Enter the [@all-contributors bot 🤖](bot/overview)! The bot will automatically pull a user's profile, grab the contribution type emoji, update the project README and then open a Pull Request against the project ✨ - - Example usage screenshot - - -### All Contributors CLI - -If you prefer command-line tools, you can instead use the [all-contributors CLI tool](cli/overview) to help automate adding contributor acknowledgements. diff --git a/src/content/docs/tooling.mdx b/src/content/docs/tooling.mdx new file mode 100644 index 00000000..4e20db90 --- /dev/null +++ b/src/content/docs/tooling.mdx @@ -0,0 +1,25 @@ +--- +id: tooling +title: Automating Updates with Tooling +sidebar_label: Tooling +--- +import { Picture } from "astro:assets"; +import botUsage from '@assets/bot-usage.png'; + +## Why We Created the All Contributors Bot and CLI + +Implementing the [All Contributors spec](specification) by hand is a laborious process. To add contributors who have not contributed code to your project but have contributed in other ways requires manually editing your README file to add their name, profile link, and the appropriate contribution type emoji. + +Further, you'd have to keep track of who has contributed what over time. This is a lot to manage, especially for larger projects with many contributors. + +### All Contributors Bot + +The [@all-contributors bot 🤖](bot/overview), makes the process of adding contributors of all kinds simple. When called to add a user, the bot will automatically pull a user's profile image, grab the contribution type emoji, update your project's README file and then open a Pull Request against the project with the updated README file. ✨ + +
+ +
+ +### All Contributors CLI + +If you prefer command-line tools, you can instead use the all-contributors CLI tool to help automate adding contributor acknowledgements. [Read more about the All-Contributor bot CLI here](cli/overview). diff --git a/src/content/docs/repository-maintainers.md b/src/content/docs/usage-tips.mdx similarity index 69% rename from src/content/docs/repository-maintainers.md rename to src/content/docs/usage-tips.mdx index ddba5906..6c737adc 100644 --- a/src/content/docs/repository-maintainers.md +++ b/src/content/docs/usage-tips.mdx @@ -1,15 +1,22 @@ --- id: repository-maintainers -title: Notes for Repository Maintainers +title: "How to Use the Bot: Tips for Repository Maintainers" sidebar_label: Repository Maintainers --- +import { Aside } from '@astrojs/starlight/components'; + +## When to add a contributor Contributors should be recognised as soon as the contribution is discovered to help ensure their efforts are not overlooked when the list gets updated at a later date. This can be difficult for contributions that are not the result of a commit to the repository but do your best to minimise the time between the contribution and updating the list. -> **Pro tip:** If your project is configured for [the @all-contributors bot 🤖](bot/overview) simply write a comment on an issue or pull request to recognise their contribution. For example: -> + + +## Encourage contributors to add themselves using the bot Being the owner or a maintainer of the repository does not mean you are solely responsible for keeping the list of contributors up to date. You should encourage contributors to add themselves to the list as much as possible. @@ -18,12 +25,12 @@ This can be in the form of a comment on the issue, blog or answer, or through mo Many contributors may not realise that their efforts are sufficient for recognition in the contributors list. This might be because they have not read or understood the definition of a contributor as set out in this specification, or because they do not feel like it is significant enough. In these cases, you should still encourage them to add themselves, -but it may be necessary for you to add the contributor yourself (though it's a good idea to do so in the form of a pull -request to make sure they're ok with being added). +but it may be necessary for you to add the contributor yourself. + + In the end, there are no hard and fast rules for when a contribution has to be added to the list, just do your best to be fair and to ensure all contributors are recognised. - -## What's next - -- [Automating the process using tools](tooling)