Skip to content

Commit b03a870

Browse files
chalincartermp
andauthored
[CI] Textlint repo .md files, and new link-checker (open-telemetry#3491)
Co-authored-by: Phillip Carter <[email protected]>
1 parent e97f522 commit b03a870

File tree

4 files changed

+31
-19
lines changed

4 files changed

+31
-19
lines changed

.markdown-link-check.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^http://localhost"
5+
}
6+
],
7+
"timeout": "3s",
8+
"retryOn429": true,
9+
"aliveStatusCodes": [200, 206]
10+
}

CONTRIBUTING.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ files][].
1313
These instructions are for [Gitpod.io][], adjust as needed for your favorite
1414
cloud IDE:
1515

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

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

3030
### Local setup
3131

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

105105
## Found a problem?
106106

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

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

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

119119
```sh
120120
npm run test-and-fix
@@ -133,12 +133,12 @@ To list available NPM scripts, run `npm run`.
133133

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

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

143143
> **For expert contributors**, you can work directly in the submodule. You'll
144144
> then be able to directly build and serve your (submodule) changes. By default,
@@ -175,7 +175,7 @@ required.
175175
[netlify]: https://netlify.com
176176
[new-issue]:
177177
https://github.com/open-telemetry/opentelemetry.io/issues/new/choose
178-
[nodejs-rel]: https://nodejs.org/en/about/releases/
178+
[nodejs-rel]: https://nodejs.org/en/about/previous-releases
179179
[nodejs-win]:
180180
https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows
181181
[nvm]:

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# <img src="https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png" alt="OTel logo" width="45"> OpenTelemetry.io
22

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

77
## Get involved
88

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

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

3535
```sh
3636
npx hugo new content/en/blog/2023/short-name-for-post.md

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
"_build": "hugo --cleanDestinationDir -e dev -DFE",
99
"_check:format:any": "npx prettier --check --ignore-path ''",
1010
"_check:format": "npx prettier --check .",
11+
"_check:links--md": "npx markdown-link-check --config .markdown-link-check.json *.md",
1112
"_check:links--warn": "npm run _check:links || (echo; echo 'WARNING: see link-checker output for issues.'; echo)",
1213
"_check:links:internal": "npm run __check:links",
1314
"_check:links": "HTMLTEST_ARGS='--log-level 1' npm run __check:links",
14-
"_check:text": "npx textlint content data",
15+
"_check:text": "npx textlint content data `ls *.md`",
1516
"_diff:check": "git diff --name-only --exit-code",
1617
"_diff:fail": "git diff --name-only --exit-code || exit 1",
1718
"_fail": "exit 1",
@@ -86,6 +87,7 @@
8687
"cspell": "^7.3.8",
8788
"gulp": "^4.0.2",
8889
"hugo-extended": "0.120.3",
90+
"markdown-link-check": "^3.11.2",
8991
"markdownlint": "^0.31.1",
9092
"postcss-cli": "^10.1.0",
9193
"prettier": "^3.0.3",

0 commit comments

Comments
 (0)