diff --git a/checkLink.ts b/checkLink.ts index fbf2c30..69aedb5 100644 --- a/checkLink.ts +++ b/checkLink.ts @@ -2,8 +2,22 @@ const axios = require("axios"); // Return true if link is broken export async function checkLink(link: string): Promise { - const ignoredCodes: Set = new Set([999, 429, 403, 401]); - const ignoredURLs: Set = new Set(['example.com']); + const ignoredCodes: Set = new Set([ + 999, + 429, + 403, + 401 + ]); + + const ignoredURLs: Set = new Set([ + 'example.com', + 'www.example.com', + 'example.org', + 'www.example.org', + 'goo.gl', + 'fonts.googleapis.com', + 'fonts.gstatic.com' + ]); const url = new URL(link); if (ignoredURLs.has(url.host)) {