diff --git a/package.json b/package.json index 0a86277..6726336 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ "rehype-katex": "^6.0.3", "remark-math": "^5.1.1", "sass": "^1.62.1", - "sitemap": "^7.1.1", "typescript": "^5.0.4", "unist-util-visit": "^4.1.2", "vite-svg-loader": "^4.0.0" diff --git a/server/routes/sitemap.xml.ts b/server/routes/sitemap.xml.ts deleted file mode 100644 index 6133f7c..0000000 --- a/server/routes/sitemap.xml.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { serverQueryContent } from "#content/server"; -import { SitemapStream, streamToPromise } from "sitemap"; - -export default defineEventHandler(async (event) => { - // Fetch all documents - const docs = await serverQueryContent(event).find(); - const sitemap = new SitemapStream({ hostname: "https://eggworld.me" }); - for (const doc of docs) { - sitemap.write({ url: doc._path, changefreq: "monthly" }); - } - sitemap.end(); - return streamToPromise(sitemap); -}); diff --git a/yarn.lock b/yarn.lock index 91497bb..b78c63f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1197,11 +1197,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== -"@types/node@^17.0.5": - version "17.0.45" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" - integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== - "@types/node@^20.2.5": version "20.2.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.2.5.tgz#26d295f3570323b2837d322180dfbf1ba156fefb" @@ -1222,7 +1217,7 @@ resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== -"@types/sax@^1.2.0", "@types/sax@^1.2.1": +"@types/sax@^1.2.0": version "1.2.4" resolved "https://registry.yarnpkg.com/@types/sax/-/sax-1.2.4.tgz#8221affa7f4f3cb21abd22f244cfabfa63e6a69e" integrity sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw== @@ -1643,7 +1638,7 @@ arg@^4.1.1: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -arg@^5.0.0, arg@^5.0.2: +arg@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== @@ -6062,16 +6057,6 @@ sitemap@^4.1.1: sax "^1.2.4" xmlbuilder "^13.0.0" -sitemap@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-7.1.1.tgz#eeed9ad6d95499161a3eadc60f8c6dce4bea2bef" - integrity sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg== - dependencies: - "@types/node" "^17.0.5" - "@types/sax" "^1.2.1" - arg "^5.0.0" - sax "^1.2.4" - slash@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7"