Skip to content

Commit

Permalink
Update slugifier for apostrophes, add ID to new source log (segmentio…
Browse files Browse the repository at this point in the history
  • Loading branch information
markzegarelli authored Jul 26, 2023
1 parent 3faa858 commit 04c5e4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/catalog/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const slugify = (displayName, type) => {
.replace('-&-', '-')
.replace('/', '-')
.replace(/[\(\)]/g, '')
.replace('.', '-');
.replace('.', '-')
.replace(/'/g, '');

let overrides = "";
if (type == "sources") {
Expand Down Expand Up @@ -128,7 +129,7 @@ const doesCatalogItemExist = (item) => {
const docsPath = `src/${item.url}`;

if (!fs.existsSync(docsPath)) {
console.log(`${item.slug} does not exist: ${docsPath}`);
console.log(`${item.slug} (id: ${item.id}) does not exist: ${docsPath}`);
let content = `---\ntitle: '${item.display_name} Source'\nhidden: true\n---`;

if (!docsPath.includes('/sources/')) {
Expand Down

0 comments on commit 04c5e4d

Please sign in to comment.