Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
koyuawsmbrtn committed Jul 11, 2023
1 parent 7247709 commit f999fd9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@astrojs/mdx": "^0.19.7",
"@astrojs/rss": "^2.4.3",
"astro-icon": "^0.8.1",
"astro-seo": "^0.7.4",
"astro-seo": "^0.7.5",
"husky-init": "^8.0.0",
"jquery": "^3.7.0",
"request": "^2.88.2",
Expand Down
7 changes: 6 additions & 1 deletion tasks/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const removeSub = (s) => {
return d;
}

console.log("Cleaning up logos...");

fs.readFile("src/json/instances.json", 'utf8', (err, data) => {
if (err) {
console.log(err);
Expand All @@ -23,7 +25,10 @@ fs.readFile("src/json/instances.json", 'utf8', (err, data) => {
var logo = instance.logo;
if (logo.startsWith("http://") || logo.startsWith("https://")) {
var extension = logo.split("/")[logo.split("/").length - 1].split(".")[1] == undefined || logo.split("/")[logo.split("/").length - 1].split(".")[1].startsWith("com") ? "png" : logo.split("/")[logo.split("/").length - 1].split(".")[1];
fs.rm(`public/fedilist/${removeSub(instance.instance).replace(".", "")}.${extension}`, () => {});
var filename = `public/fedilist/${removeSub(instance.instance).replace(".", "")}.${extension}`;
fs.rm(filename, () => {
console.log(`Deleted ${filename}`);
});
}
});
});
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1004,10 +1004,10 @@ astro-icon@^0.8.1:
resolve-pkg "^2.0.0"
svgo "^2.8.0"

astro-seo@^0.7.4:
version "0.7.4"
resolved "https://registry.yarnpkg.com/astro-seo/-/astro-seo-0.7.4.tgz#0c2788b97ec3944390be2dd39a8ad9a6aec294b0"
integrity sha512-E+wJmxOnvBRjgzVctdGk/VdwoEqeQ6Q/KgVW2wRBXZWJVDgOweB32Da/UiH0/FpGncPzo2daOrc08DNn5wTanw==
astro-seo@^0.7.5:
version "0.7.5"
resolved "https://registry.yarnpkg.com/astro-seo/-/astro-seo-0.7.5.tgz#0ce29afe4b979da343315de4e4381a2ee44ce242"
integrity sha512-bo5PiB4Y30PP9QS6OnYcVOr1fKDE52mvJys/3HgeiM2h+/hS7jESUHZMx6VX7yRid1yMGHsp2OyVTA9DrdPyPg==

astro@^2.8.0:
version "2.8.0"
Expand Down

0 comments on commit f999fd9

Please sign in to comment.