From 2a7cd6888ef0fefc95e81ea1c896245cbcb7f63d Mon Sep 17 00:00:00 2001 From: Ayo Date: Sun, 8 Oct 2023 00:18:32 +0200 Subject: [PATCH] feat: src/pages special directory --- nitro.config.ts | 2 +- {pages => src/pages}/about.html | 0 {pages => src/pages}/about/index.html | 0 {pages => src/pages}/about/me.html | 0 {pages => src/pages}/index.html | 0 utils/github.ts | 11 ----------- 6 files changed, 1 insertion(+), 12 deletions(-) rename {pages => src/pages}/about.html (100%) rename {pages => src/pages}/about/index.html (100%) rename {pages => src/pages}/about/me.html (100%) rename {pages => src/pages}/index.html (100%) delete mode 100644 utils/github.ts diff --git a/nitro.config.ts b/nitro.config.ts index 06e5262..c602585 100644 --- a/nitro.config.ts +++ b/nitro.config.ts @@ -3,7 +3,7 @@ export default defineNitroConfig({ serverAssets: [ { baseName: "pages", - dir: "./pages", + dir: "./src/pages", }, ], }); diff --git a/pages/about.html b/src/pages/about.html similarity index 100% rename from pages/about.html rename to src/pages/about.html diff --git a/pages/about/index.html b/src/pages/about/index.html similarity index 100% rename from pages/about/index.html rename to src/pages/about/index.html diff --git a/pages/about/me.html b/src/pages/about/me.html similarity index 100% rename from pages/about/me.html rename to src/pages/about/me.html diff --git a/pages/index.html b/src/pages/index.html similarity index 100% rename from pages/index.html rename to src/pages/index.html diff --git a/utils/github.ts b/utils/github.ts deleted file mode 100644 index 72cbb37..0000000 --- a/utils/github.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const cachedGHStars = cachedFunction( - async (repo: string) => { - const data: any = await $fetch(`https://api.github.com/repos/${repo}`); - return data.stargazers_count; - }, - { - maxAge: 60 * 60, - name: "ghStars", - getKey: (repo: string) => repo, - } -);