Skip to content

Commit 79d30f8

Browse files
author
Jimmy Chu
authored
Enable running check-links locally with web3f/link-checker (polkadot-developers#594)
* Enable running check-links locally with web3f/link-checker * update
1 parent 4780a50 commit 79d30f8

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Diff for: Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Q: What is this dockerfile for?
22
# A: https://docusaurus.io/docs/en/docker
33

4-
FROM node:8.11.4
4+
# Unify with our CI test image node version
5+
FROM node:10.15.2
56

67
WORKDIR /app/website
78

Diff for: docker-compose.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
version: "3"
22

33
services:
4-
docusaurus:
4+
link-checker:
5+
image: web3f/link-checker:v1.0.1
6+
command: /bin/bash -c "sleep 20 && linkchecker --ignore-url=\"^(?:(?!\/en\/).)*$$\" --check-extern http://main:3000/"
7+
depends_on:
8+
- main
9+
10+
main:
511
build: .
612
ports:
713
- 3000:3000

Diff for: website/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"rename-version": "docusaurus-rename-version",
1010
"crowdin-upload": "crowdin --config ../crowdin.yaml upload sources --auto-update -b master",
1111
"crowdin-download": "crowdin --config ../crowdin.yaml download -b master",
12-
"check-links": "yarn blc http://localhost:3000 -ro --exclude \"http://localhost:3000/docs/ru\" --exclude \"http://localhost:3000/docs/zh-CN\" --exclude \"https://playground.substrate.dev/\" --exclude \"https://player.twitch.tv/?channel=paritylivecoding\" --exclude \"http://localhost:8000/\""
12+
"check-links": "yarn check-links-cleanup && docker-compose up",
13+
"check-links-cleanup": "docker-compose down --remove-orphans"
1314
},
1415
"devDependencies": {
1516
"broken-link-checker": "^0.7.8",

0 commit comments

Comments
 (0)