Skip to content

Commit

Permalink
Add link validation plugin (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz authored Oct 3, 2023
1 parent 906c36d commit 7360356
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 11 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: main

on:
push:
pull_request:

jobs:
# Validates links in the docs
validate:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- name: Install NodeJS
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run validate
run: yarn validate
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"name": "passwordless-docs",
"version": "0.0.1",
"license": "MIT",
"description": "Documentation for Passwordless",
"main": "index.js",
"authors": {
"name": "Anders Åberg",
"email": "anders@passwordless.dev"
},
"repository": "/passwordless-docs",
"scripts": {
"dev": "vuepress dev src",
"build": "vuepress build src"
},
"license": "MIT",
"devDependencies": {
"vuepress": "^1.5.3"
"build": "vuepress build src",
"validate": "vuepress check-md src"
},
"dependencies": {
"vuepress-plugin-code-switcher": "^1.1.0"
},
"devDependencies": {
"vuepress": "^1.5.3",
"vuepress-plugin-check-md": "^0.0.3"
}
}
}
5 changes: 3 additions & 2 deletions src/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { description } = require('../../package')
const { description } = require("../../package");

module.exports = {
/**
Expand Down Expand Up @@ -105,6 +105,7 @@ module.exports = {
plugins: [
'@vuepress/plugin-back-to-top',
'@vuepress/plugin-medium-zoom',
'code-switcher'
'code-switcher',
'check-md'
]
}
40 changes: 38 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,14 @@
resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz"
integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==

"@sindresorhus/slugify@^0.8.0":
version "0.8.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/slugify/-/slugify-0.8.0.tgz#5550b7fa064f3a8a82651463ad635378054c72d0"
integrity sha512-Y+C3aG0JHmi4nCfixHgq0iAtqWCjMCliWghf6fXbemRKSGzpcrHdYxGZGDt8MeFg+gH7ounfMbz6WogqKCWvDg==
dependencies:
escape-string-regexp "^1.0.5"
lodash.deburr "^4.1.0"

"@szmarczak/http-timer@^1.1.2":
version "1.1.2"
resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz"
Expand Down Expand Up @@ -2110,6 +2118,17 @@ chalk@^3.0.0:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

check-md@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/check-md/-/check-md-1.0.0.tgz#6ba97cf4e061b23691b4132591afb168d4cd5910"
integrity sha512-H9LS+TDB6ix4QZQFiTp2TVIL+24zKutOKDqxIxAxnvkx3phpzrwPINaykD8RSeynxIVp3s0PecR2GEA3KLbziQ==
dependencies:
"@sindresorhus/slugify" "^0.8.0"
chalk "^2.4.2"
commander "^2.19.0"
diacritics "^1.3.0"
globby "^9.1.0"

chokidar@^2.0.3, chokidar@^2.1.8:
version "2.1.8"
resolved "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz"
Expand Down Expand Up @@ -2293,7 +2312,7 @@ commander@2.17.x:
resolved "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz"
integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==

commander@^2.20.0:
commander@^2.19.0, commander@^2.20.0:
version "2.20.3"
resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
Expand Down Expand Up @@ -2878,6 +2897,11 @@ detect-node@^2.0.4:
resolved "https://registry.npmjs.org/detect-node/-/detect-node-2.0.5.tgz"
integrity sha512-qi86tE6hRcFHy8jI1m2VG+LaPUR1LhqDa5G8tVjuUXmOrpuAgqsA1pN0+ldgr3aKUH+QLI9hCY/OcRYisERejw==

diacritics@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/diacritics/-/diacritics-1.3.0.tgz#3efa87323ebb863e6696cebb0082d48ff3d6f7a1"
integrity sha512-wlwEkqcsaxvPJML+rDh/2iS824jbREk6DUMUKkEaSlxdYHeS43cClJtsWglvw2RfeXGm6ohKDqsXteJ5sP5enA==

diffie-hellman@^5.0.0:
version "5.0.3"
resolved "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz"
Expand Down Expand Up @@ -3681,7 +3705,7 @@ globby@^7.1.1:
pify "^3.0.0"
slash "^1.0.0"

globby@^9.2.0:
globby@^9.1.0, globby@^9.2.0:
version "9.2.0"
resolved "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz"
integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==
Expand Down Expand Up @@ -4710,6 +4734,11 @@ lodash.debounce@^4.0.8:
resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz"
integrity "sha1-gteb/zCmfEAF/9XiUVMArZyk168= sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="

lodash.deburr@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/lodash.deburr/-/lodash.deburr-4.1.0.tgz#ddb1bbb3ef07458c0177ba07de14422cb033ff9b"
integrity sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==

lodash.kebabcase@^4.1.1:
version "4.1.1"
resolved "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz"
Expand Down Expand Up @@ -7573,6 +7602,13 @@ vuepress-html-webpack-plugin@^3.2.0:
toposort "^1.0.0"
util.promisify "1.0.0"

vuepress-plugin-check-md@^0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/vuepress-plugin-check-md/-/vuepress-plugin-check-md-0.0.3.tgz#2ded2db8383d091c7a4d0c2bc7716c843e82fbec"
integrity sha512-ov9lw0g/b4ZIxjr3dcwYNDwMpfxLaOBhgOsDLnehdphx1eqaeJQ8MZO8PODE6aQWUuIUBzHOM3xQ9Kuvps3X3g==
dependencies:
check-md "1.0.0"

vuepress-plugin-code-switcher@^1.1.0:
version "1.1.0"
resolved "https://registry.npmjs.org/vuepress-plugin-code-switcher/-/vuepress-plugin-code-switcher-1.1.0.tgz"
Expand Down

0 comments on commit 7360356

Please sign in to comment.