Skip to content

Commit

Permalink
[CI] Textlint repo .md files, and new link-checker (#3491)
Browse files Browse the repository at this point in the history
Co-authored-by: Phillip Carter <[email protected]>
  • Loading branch information
chalin and cartermp authored Nov 5, 2023
1 parent e97f522 commit b03a870
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
10 changes: 10 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "^http://localhost"
}
],
"timeout": "3s",
"retryOn429": true,
"aliveStatusCodes": [200, 206]
}
28 changes: 14 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ files][].
These instructions are for [Gitpod.io][], adjust as needed for your favorite
cloud IDE:

1. Fork this repo. For help, see [Fork a repo][fork].
1. Fork this repository. For help, see [Fork a repository][fork].
2. From [gitpod.io/workspaces][], create a new workspace (do this only once) or
open an existing workspace over your fork. You can also visit a link of the
form:
<https://gitpod.io#https://github.com/YOUR_GITHUB_ID/opentelemetry.io>.

> **Note**: If you have the necessary permissions to work from this repo, or
> just want to look around, open
> **Note**: If you have the necessary permissions to work from this
> repository, or just want to look around, open
> <https://gitpod.io/#https://github.com/open-telemetry/opentelemetry.io>.
Gitpod will automatically install the repo-specific packages for you. You're now
Expand All @@ -29,8 +29,8 @@ files.

### Local setup

1. [Fork][] and then [clone][] this repo.
2. **Change** to the repo directory.
1. [Fork][] and then [clone][] this repository.
2. **Change** to the repository directory.
3. **Install or upgrade** to the [**active LTS** release][nodejs-rel] of
**Node.js**. We recommend using **[nvm][]** to manage your Node
installation. Under Linux, run the following command (which will
Expand Down Expand Up @@ -104,7 +104,7 @@ The website is built from the following content:

## Found a problem?

If you find a problem with the content of this repo, or you would like to
If you find a problem with the content of this repository, or you would like to
request an enhancement, [create an issue][new-issue].

> **NOTE**: As a general policy, we only _assign_ issues to community members
Expand All @@ -113,8 +113,8 @@ request an enhancement, [create an issue][new-issue].
## Submitting a change

Enhancements and fixes to the website are most welcome! Before submitting a
[pull request][pr] (PR) to the repo, run the following command and address any
reported issues. Also commit any files changed by the `fix` script:
[pull request][pr] (PR) to the repository, run the following command and address
any reported issues. Also commit any files changed by the `fix` script:

```sh
npm run test-and-fix
Expand All @@ -133,12 +133,12 @@ To list available NPM scripts, run `npm run`.

If you change any content inside of a [content-modules][] submodule, then you'll
need to **_first_** submit a PR (containing the submodule changes) to the
submodule's repo. Only after the submodule PR has been accepted, can you update
the submodule and have the changes appear in this website.
submodule's repository. Only after the submodule PR has been accepted, can you
update the submodule and have the changes appear in this website.

It is easiest to manage your `content-modules` changes by working with the repo
that the corresponding submodule is linked to, rather than inside the submodule
itself.
It is easiest to manage your `content-modules` changes by working with the
repository that the corresponding submodule is linked to, rather than inside the
submodule itself.

> **For expert contributors**, you can work directly in the submodule. You'll
> then be able to directly build and serve your (submodule) changes. By default,
Expand Down Expand Up @@ -175,7 +175,7 @@ required.
[netlify]: https://netlify.com
[new-issue]:
https://github.com/open-telemetry/opentelemetry.io/issues/new/choose
[nodejs-rel]: https://nodejs.org/en/about/releases/
[nodejs-rel]: https://nodejs.org/en/about/previous-releases
[nodejs-win]:
https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows
[nvm]:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# <img src="https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png" alt="OTel logo" width="45"> OpenTelemetry.io

This is the source repo for the [OpenTelemetry][] website, project documentation
and blog. The site is [built][contributing.md] using [Hugo][] and hosted on
[Netlify][].
This is the source repository for the [OpenTelemetry][] website, project
documentation and blog. The site is [built][contributing.md] using [Hugo][] and
hosted on [Netlify][].

## Get involved

Expand Down Expand Up @@ -30,7 +30,7 @@ new issue/PR with your content to get it added to the docs.
### Fork & Write locally

Follow the [setup instructions][contributing.md] then, to create a skeletal blog
post, run the following command from the repo root:
post, run the following command from the repository root:

```sh
npx hugo new content/en/blog/2023/short-name-for-post.md
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
"_build": "hugo --cleanDestinationDir -e dev -DFE",
"_check:format:any": "npx prettier --check --ignore-path ''",
"_check:format": "npx prettier --check .",
"_check:links--md": "npx markdown-link-check --config .markdown-link-check.json *.md",
"_check:links--warn": "npm run _check:links || (echo; echo 'WARNING: see link-checker output for issues.'; echo)",
"_check:links:internal": "npm run __check:links",
"_check:links": "HTMLTEST_ARGS='--log-level 1' npm run __check:links",
"_check:text": "npx textlint content data",
"_check:text": "npx textlint content data `ls *.md`",
"_diff:check": "git diff --name-only --exit-code",
"_diff:fail": "git diff --name-only --exit-code || exit 1",
"_fail": "exit 1",
Expand Down Expand Up @@ -86,6 +87,7 @@
"cspell": "^7.3.8",
"gulp": "^4.0.2",
"hugo-extended": "0.120.3",
"markdown-link-check": "^3.11.2",
"markdownlint": "^0.31.1",
"postcss-cli": "^10.1.0",
"prettier": "^3.0.3",
Expand Down

0 comments on commit b03a870

Please sign in to comment.