You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by bz...@apache.org on 2021/09/08 12:59:10 UTC
[apisix-website] branch master updated: fix: improve link checker
availability (#571)
This is an automated email from the ASF dual-hosted git repository.
bzp2010 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git
The following commit(s) were added to refs/heads/master by this push:
new 815dfc8 fix: improve link checker availability (#571)
815dfc8 is described below
commit 815dfc841cd8beedbf20ebae49909a794b382241
Author: bzp2010 <bz...@apache.org>
AuthorDate: Wed Sep 8 07:59:02 2021 -0500
fix: improve link checker availability (#571)
---
.github/workflows/link-check.yml | 2 +-
scripts/link-checker.js | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml
index 675c0e6..bd5601b 100644
--- a/.github/workflows/link-check.yml
+++ b/.github/workflows/link-check.yml
@@ -46,5 +46,5 @@ jobs:
if: always()
with:
name: broken-links.json
- path: brokenLinks.json
+ path: scripts/brokenLinks.json
retention-days: 5
diff --git a/scripts/link-checker.js b/scripts/link-checker.js
index d1f3be5..d42c63e 100644
--- a/scripts/link-checker.js
+++ b/scripts/link-checker.js
@@ -3,11 +3,13 @@ const path = require("path");
const process = require("process");
const listr = require("listr");
+const axios = require("axios");
const common = require("./common.js");
-const axios = require("axios");
const {projects, languages, projectPaths} = common;
+axios.defaults.timeout = 5000;
+
const tasks = new listr([
{
title: "Start Link Checker",
@@ -181,8 +183,8 @@ const scanLinkInMDFile = (filePath, project) => {
}
const linkValidate = (link) => {
+ console.log("checking external link: ", link.url);
return new Promise((resolve) => {
- const axios = require("axios");
axios.get(link.url)
.then((res) => {
resolve({