chore: links + grammar

This commit is contained in:
Cory Dransfeldt 2023-08-23 15:48:44 -07:00
parent 88aae3f2e3
commit 8e93412d7a
No known key found for this signature in database
8 changed files with 31 additions and 33 deletions

View file

@ -1,24 +0,0 @@
const fs = require('fs')
const fetch = require('node-fetch')
module.exports = async function () {
const sourceUrl = 'https://cdn.usefathom.com/script.js'
fetch(sourceUrl)
.then((response) => response.text())
.then((sourceContent) => {
if (!sourceContent.includes('fathomScript.src.indexOf("cdn.usefathom.com")'))
throw new Error('Fathom script changed!')
const modifiedContent = sourceContent.replace(
'fathomScript.src.indexOf("cdn.usefathom.com")',
'fathomScript.src.indexOf("coryd.dev")'
)
const newFilePath = './_site/script.js'
fs.writeFile(newFilePath, modifiedContent, (err) => {
if (err) console.log(err)
})
})
.catch((err) => {
console.error('Error downloading the file:', err)
})
}

View file

@ -12,7 +12,9 @@ module.exports = async function () {
activity.posts.push({
id: entry.url,
title: entry.title,
url: entry.url,
url: entry.url.includes('coryd.dev')
? `${entry.url}?utm_campaign=syndication&utm_source=follow`
: entry.url,
content_html: entry.content || '',
date_published: entry.published,
})