Skip to content

Commit

Permalink
docs: add head metadata (#59)
Browse files Browse the repository at this point in the history
Closes #45.
add head metadata to md docs
  • Loading branch information
huynhicode authored Dec 31, 2022
1 parent 41add2e commit df4b7e0
Show file tree
Hide file tree
Showing 12 changed files with 193 additions and 119 deletions.
30 changes: 18 additions & 12 deletions docs/contributing/code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Code of Conduct
---
id: code-of-conduct
title: Code of Conduct
sidebar_label: Code of Conduct
keywords:
- code of conduct
---

## Our pledge

Expand All @@ -14,21 +20,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our responsibilities
Expand Down
15 changes: 11 additions & 4 deletions docs/contributing/introduction-to-contributing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Introduction to contributing
---
id: introduction-to-contributing
title: Introduction to contributing
sidebar_label: Introduction to contributing
keywords:
- introduction to contributing
---

Contributions are always welcome, no matter how large or small. Before contributing,
please read the [code of conduct](./code-of-conduct.md).
Expand Down Expand Up @@ -36,11 +42,12 @@ For running the test suite, use the following command. Since the tests run in wa
# the tests will run in watch mode by default
npm test
```

For more info on testing React and JavaScript, check out this course [Testing JavaScript](https://testingjavascript.com/)

## Pull requests

___We actively welcome your pull requests, however linking your work to an existing issue is preferred.___
**_We actively welcome your pull requests, however linking your work to an existing issue is preferred._**

1. Fork the repo and create your branch from `main`.
1. Name your branch something that is descriptive to the work you are doing. i.e. adds-new-thing or fixes-mobile
Expand All @@ -53,7 +60,7 @@ ___We actively welcome your pull requests, however linking your work to an exist
1. A PR description and title are required. The title is required to begin with: "feat:" or "fix:"
1. [Link to an issue](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) in the project. Unsolicited code is welcomed, but an issue is required for an announcement your intentions. PR's without a linked issue will be marked invalid and closed.

*note for maintainers: All pull requests need a label to assist automation. See the [template](https://github.com/open-sauced/open-sauced/blob/HEAD/.github/release-drafter.yml) to guide which labels to use.*
_note for maintainers: All pull requests need a label to assist automation. See the [template](https://github.com/open-sauced/open-sauced/blob/HEAD/.github/release-drafter.yml) to guide which labels to use._

### PR validation

Expand Down Expand Up @@ -107,7 +114,7 @@ Do you have questions? Join the conversation in our [Discord](https://discord.gg

- Ask questions if you are stuck.
- Use [CSS variables](https://github.com/open-sauced/open-sauced/blob/HEAD/src/styles/variables.js)
- Always use [rel="noreferrer" on all target="_blank" links](https://web.dev/external-anchors-use-rel-noopener/).
- Always use [rel="noreferrer" on all target="\_blank" links](https://web.dev/external-anchors-use-rel-noopener/).

## License

Expand Down
12 changes: 9 additions & 3 deletions docs/contributing/triage-guide.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Triage guide
---
id: triage-guide
title: Triage guide
sidebar_label: Triage guide
keywords:
- triage guide
---

## How do I join the triage team?

Expand Down Expand Up @@ -28,10 +34,10 @@ It might be helpful to write your own test apps to re-affirm your understanding

Issues labeled as `good first issue` represent a curated list of easy contributions for new contributors. These issues are meant to help folks make their first contribution to open-source and should not require an excessive amount of research or triaging on the contributor's part.

*All good first issues should include one or more of the following: a solution, a suggestion for a solution, links to components, or in which issue occurs.*
_All good first issues should include one or more of the following: a solution, a suggestion for a solution, links to components, or in which issue occurs._

- Issues that `needs triage` cannot be labeled as `good first issues`.
- It is better to have no `good first issue` labeled issues than to have a `good first issue` confusing enough to deter a contributor from contributing.
- It is better to have no `good first issue` labeled issues than to have a `good first issue` confusing enough to deter a contributor from contributing.

## Removal of triage role

Expand Down
1 change: 0 additions & 1 deletion docs/introduction.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
slug: /
title: Introduction to Open Sauced
sidebar_label: Introduction to Open Sauced 🍕
---

Expand Down
14 changes: 10 additions & 4 deletions docs/maintainers/check-engines.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# @open-sauced/check-engines
---
id: check-engines
title: "@open-sauced/check-engines"
sidebar_label: "@open-sauced/check-engines"
keywords:
- "@open-sauced/check-engines"
---

## Description

Expand Down Expand Up @@ -26,7 +32,7 @@ Add the verification scripts to your `scripts` section in the `package.json` fil
}
```

The reason why we provide `npx` in the `scripts` section is for the people using this as a development enhancement, interactive configurations or trimmed dependency trees, where using `npx` is preferred over installing all the dependencies at once.
The reason why we provide `npx` in the `scripts` section is for the people using this as a development enhancement, interactive configurations or trimmed dependency trees, where using `npx` is preferred over installing all the dependencies at once.

## Usage

Expand Down Expand Up @@ -73,11 +79,11 @@ A more traditional approach not using `pre` or `post` scripts, this example enab

Older `node` and `npm` versions won't be able to run this package, depending on versions the scripts section could be ignored completely.

If you have that use case, this package is only worth enabling for progressive contributors frequently missing the legacy support of the respective module and forcefully upgrading dependencies - them running newer versions will force the error message and explicitly disable.
If you have that use case, this package is only worth enabling for progressive contributors frequently missing the legacy support of the respective module and forcefully upgrading dependencies - them running newer versions will force the error message and explicitly disable.

### Why not use `check-engines` or `engine-strict`

As described in the `npm@6` [engine-strict docs](https://docs.npmjs.com/cli/v6/configuring-npm/package-json#enginestrict):
As described in the `npm@6` [engine-strict docs](https://docs.npmjs.com/cli/v6/configuring-npm/package-json#enginestrict):

> Prior to npm 3.0.0, this feature was used to treat this package as if the user had set engine-strict. It is no longer used.
Expand Down
10 changes: 8 additions & 2 deletions docs/maintainers/conventional-commit.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# @open-sauced/conventional-commit
---
id: conventional-commit
title: "@open-sauced/conventional-commit"
sidebar_label: "@open-sauced/conventional-commit"
keywords:
- "@open-sauced/conventional-commit"
---

## Description

Expand Down Expand Up @@ -27,7 +33,7 @@ Add the verification scripts to your `scripts` section in the `package.json` fil
}
```

The reason why we provide `npx` in the `scripts` section is for the people using this as a development enhancement, interactive configurations or trimmed dependency trees, where using `npx` is preferred over installing all the dependencies at once.
The reason why we provide `npx` in the `scripts` section is for the people using this as a development enhancement, interactive configurations or trimmed dependency trees, where using `npx` is preferred over installing all the dependencies at once.

## Usage

Expand Down
98 changes: 53 additions & 45 deletions docs/maintainers/semantic-release.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# @open-sauced/semantic-release-conventional-config
---
id: semantic-release
title: "@open-sauced/semantic-release-conventional-config"
sidebar_label: "@open-sauced/semantic-release-conventional-config"
keywords:
- "@open-sauced/semantic-release-conventional-config"
---

## Description

Expand Down Expand Up @@ -26,13 +32,15 @@ This package uses the following modules:
## 🖥️ Requirements

Most important limitations are:

- `GITHUB_TOKEN` for everything
- `NPM_TOKEN` for public `npm` library
- `docker` containers need to be built beforehand

You can skip here if you are using elevated [Private Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), however we don't recommend going down that path.

No force push or admin cherries branch protections for the following branches:

- `main` - required
- `alpha` - optional, pre-release branch
- `beta` - optional, pre-release branch
Expand Down Expand Up @@ -79,7 +87,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: '♻️ cleanup'
- name: "♻️ cleanup"
run: |
echo ${{ env.RELEASE_TAG }}
echo ${{ env.RELEASE_VERSION }}
Expand Down Expand Up @@ -117,7 +125,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: '♻️ cleanup'
- name: "♻️ cleanup"
run: |
echo ${{ steps.semantic-release.outputs.release-tag }}
echo ${{ steps.semantic-release.outputs.release-version }}
Expand Down Expand Up @@ -192,36 +200,36 @@ This example requires `"private": true,` in your `package.json` and simplifies t

```yaml
release:
environment:
name: production
url: https://github.com/${{ github.repository }}/releases/tag/${{ env.RELEASE_TAG }}
name: Semantic release
runs-on: ubuntu-latest
steps:
- name: "☁️ checkout repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "🔧 setup node"
uses: actions/setup-node@v2.1.5
with:
node-version: 16
- name: "🔧 install npm@latest"
run: npm i -g npm@latest
- name: "📦 install dependencies"
uses: bahmutov/npm-install@v1
- name: "🚀 static app"
run: npm run build
- name: "🚀 release"
id: semantic-release
uses: docker://ghcr.io/open-sauced/semantic-release-conventional-config:3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
environment:
name: production
url: https://github.com/${{ github.repository }}/releases/tag/${{ env.RELEASE_TAG }}
name: Semantic release
runs-on: ubuntu-latest
steps:
- name: "☁️ checkout repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "🔧 setup node"
uses: actions/setup-node@v2.1.5
with:
node-version: 16
- name: "🔧 install npm@latest"
run: npm i -g npm@latest
- name: "📦 install dependencies"
uses: bahmutov/npm-install@v1
- name: "🚀 static app"
run: npm run build
- name: "🚀 release"
id: semantic-release
uses: docker://ghcr.io/open-sauced/semantic-release-conventional-config:3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

### Npm library
Expand Down Expand Up @@ -253,7 +261,7 @@ jobs:
uses: actions/setup-node@v2.1.5
with:
node-version: 16
- name: "🔧 install npm@latest"
run: npm i -g npm@latest
Expand Down Expand Up @@ -336,7 +344,7 @@ jobs:
uses: actions/setup-node@v2.1.5
with:
node-version: 16
- name: "🔧 install npm@latest"
run: npm i -g npm@latest
Expand Down Expand Up @@ -417,7 +425,7 @@ An up-to-date version of the example above is available at [open-sauced/open-sau

### Pre-releases

This workflow requires the creation of `alpha` and `beta` protected branches while templating every commit to be conventional. It does not support squashing without creating extremely complex conflict resolution:
This workflow requires the creation of `alpha` and `beta` protected branches while templating every commit to be conventional. It does not support squashing without creating extremely complex conflict resolution:

```yaml
name: "Release"
Expand Down Expand Up @@ -481,14 +489,14 @@ The following commit rules are enforced by `@semantic-release/commit-analyzer`:
{
"preset": "conventionalcommits",
"releaseRules": [
{"type": "build", "release": "minor"},
{"type": "ci", "release": "patch"},
{"type": "docs", "release": "minor"},
{"type": "style", "release": "patch"},
{"type": "refactor", "release": "patch"},
{"type": "test", "release": "patch"},
{"type": "revert", "release": "patch"},
{"type": "chore", "release": false}
{ "type": "build", "release": "minor" },
{ "type": "ci", "release": "patch" },
{ "type": "docs", "release": "minor" },
{ "type": "style", "release": "patch" },
{ "type": "refactor", "release": "patch" },
{ "type": "test", "release": "patch" },
{ "type": "revert", "release": "patch" },
{ "type": "chore", "release": false }
],
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
Expand Down Expand Up @@ -517,7 +525,7 @@ Create the `alpha` and/or `beta` branches and protect them from being deleted or

Switch your branching strategy to `merge` and enable conventional commits checking.

You will have to resolve merge conflicts between `alpha`, `beta` and `main` branches as described in the [semantic-releases recipes](https://github.com/semantic-release/semantic-release/tree/master/docs/recipes).
You will have to resolve merge conflicts between `alpha`, `beta` and `main` branches as described in the [semantic-releases recipes](https://github.com/semantic-release/semantic-release/tree/master/docs/recipes).

## Contributing

Expand Down
15 changes: 11 additions & 4 deletions docs/maintainers/setting-up-a-new-repository.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Setting up a new repository
---
id: setting-up-a-new-repository
title: Setting up a new repository
sidebar_label: Setting up a new repository
keywords:
- setting up a new repository
---

## How do I Join the Maintainers Team?

1. Sign up for [opensauced.pizza](https://opensauced.pizza)
1. Join [discord](https://discord.gg/gZMKK5q).
1. Join [discord](https://discord.gg/gZMKK5q).
1. Prove your pizza worth!

## Requirements
Expand Down Expand Up @@ -49,10 +55,11 @@ The default labels have some missing emojis. Copy the rest with:
npx octoherd-script-copy-labels \
--template "open-sauced/open-sauced" \
-T $GH_TOKEN \
-R "open-sauced/check-engines"
-R "open-sauced/check-engines"
```

Then go back to your repository and delete:

- documentation
- 👀 needs-triage (green background one)
- other potential duplicates if the above race condition is different
Expand Down Expand Up @@ -83,7 +90,7 @@ Pull requests require [triage](https://github.com/open-sauced/open-sauced/blob/m

Most `node` projects will require [release automation](https://github.com/open-sauced/open-sauced/blob/main/.github/workflows/release.yml) powered by [@open-sauced/semantic-release-conventional-config](https://github.com/open-sauced/semantic-release-conventional-config).

Other [development workflows](https://github.com/open-sauced/open-sauced/tree/main/.github/workflows) are less common and opinionated towards decentralised collaboration. Use these as example backbones for your new repository.
Other [development workflows](https://github.com/open-sauced/open-sauced/tree/main/.github/workflows) are less common and opinionated towards decentralised collaboration. Use these as example backbones for your new repository.

## Setting up environments and secrets

Expand Down
Loading

0 comments on commit df4b7e0

Please sign in to comment.