Skip to content

Commit

Permalink
Change WOT-terms to keridoc
Browse files Browse the repository at this point in the history
  • Loading branch information
kordwarshuis committed Jul 15, 2024
1 parent 743cf8b commit 5c07753
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions maintenance/findBrokenLinks.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file This file checks all links on the WOT-terms site and reports broken links. It also creates a GitHub issue with the broken links.
* The script should be run from the root of the WOT-terms repository.
* @file This file checks all links on the Keridoc site and reports broken links. It also creates a GitHub issue with the broken links.
* The script should be run from the root of the Keridoc repository.
* Environment: NodeJS
* Usage:
* $ node findBrokenLinks.js
Expand All @@ -23,6 +23,7 @@ const path = require('path');

const siteUrl = 'https://weboftrust.github.io/keridoc';
const baseUrl = 'https://weboftrust.github.io';
const repoName = 'keridoc';

const outputDirectory = path.join(__dirname, '../logs');
const outputFileName = 'brokenLinks.md';
Expand Down Expand Up @@ -124,7 +125,7 @@ const siteChecker = new SiteChecker({

octokit.request('POST /repos/WebOfTrustkeridocissues', {
owner: 'WebOfTrust',
repo: 'WOT-terms',
repo: repoName,
title: issueData.title,
body: issueData.body,
// labels: [
Expand Down
2 changes: 1 addition & 1 deletion src/components/createDictionary/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ termsData.forEach(term => {
// console.log(definition.definition);
// In definition.definition find every <a> tag that has a href attribute that does not contain 'http' or 'https' and add to the href attribute value the string '/docs/glossary/'.
// This is because the WebOfTrust definitions do not contain the full URL, but only the relative path.
definition.definition = definition.definition.replace(/<a href="((?!http|https)[^"]*)">/g, '<a href="/WOT-terms/docs/glossary/$1">');
definition.definition = definition.definition.replace(/<a href="((?!http|https)[^"]*)">/g, '<a href="/keridoc/docs/glossary/$1">');
}
});
});
Expand Down

0 comments on commit 5c07753

Please sign in to comment.