diff --git a/.gitignore b/.gitignore index 59075df..6d7621a 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,4 @@ next-env.d.ts # Velite .velite -public/static \ No newline at end of file +public/static/posts \ No newline at end of file diff --git a/_routes.json b/_routes.json new file mode 100644 index 0000000..a5187cf --- /dev/null +++ b/_routes.json @@ -0,0 +1,4 @@ +{ + "version": 1, + "exclude": ["/static/*", "/favicon.ico", "/apple-icon.png", "/icon.png"] +} \ No newline at end of file diff --git a/app/[lang]/layout.tsx b/app/[lang]/layout.tsx index 158bd52..81e7a8d 100644 --- a/app/[lang]/layout.tsx +++ b/app/[lang]/layout.tsx @@ -2,7 +2,7 @@ import "../../styles/globals.css"; import { Metadata } from "next"; import Image from "next/image"; -import avatar from "../../public/avatar.png"; +import avatar from "../../public/static/avatar.png"; import Link from "next/link"; import { dictionaryKeys, getDictionary } from "../../dictionaries"; @@ -32,14 +32,14 @@ export async function generateMetadata({ title: dictionary.meta.websiteName, description: dictionary.meta.motto, siteName: dictionary.meta.websiteName, - images: "/banner.png", + images: "/static/banner.png", }, twitter: { title: dictionary.meta.websiteName, description: dictionary.meta.motto, site: "@noobnooc", card: "summary_large_image", - images: "/banner.png", + images: "/static/banner.png", }, alternates: { languages: Object.fromEntries(langEntries), diff --git a/app/[lang]/posts/[...slug]/page.tsx b/app/[lang]/posts/[...slug]/page.tsx index e38fb26..a97b448 100644 --- a/app/[lang]/posts/[...slug]/page.tsx +++ b/app/[lang]/posts/[...slug]/page.tsx @@ -35,14 +35,14 @@ export async function generateMetadata({ openGraph: { title: post.title, description: post.title, - images: "/banner.png", + images: "/static/banner.png", }, twitter: { title: post.title, description: post.title, site: "@noobnooc", card: "summary_large_image", - images: "/banner.png", + images: "/static/banner.png", }, }; } diff --git a/components/profile-card.tsx b/components/profile-card.tsx index 72eab75..4307971 100644 --- a/components/profile-card.tsx +++ b/components/profile-card.tsx @@ -3,7 +3,7 @@ import Card from "./card"; import Image from "next/image"; import { ArrowPathRoundedSquareIcon } from "@heroicons/react/24/solid"; -import avatar from "../public/avatar.png"; +import avatar from "../public/static/avatar.png"; import FlippableCard from "./flippable-card"; import { useCallback, useState } from "react"; import classNames from "classnames"; diff --git a/dictionaries/en.ts b/dictionaries/en.ts index 43e2027..87b5459 100644 --- a/dictionaries/en.ts +++ b/dictionaries/en.ts @@ -9,24 +9,24 @@ import { SiX, } from "@icons-pack/react-simple-icons"; -import avatar from "../public/avatar.png"; -import blankAvatar from "../public/avatars/blank.jpeg"; -import jiaZombieAvatar from "../public/avatars/jiazombie.png"; -import liunengAvatar from "../public/avatars/liuneng.jpg"; -import pilotAvatar from "../public/avatars/pilot.jpg"; -import gartnerAvatar from "../public/avatars/gartner.jpg"; -import anonymousAvatar from "../public/avatars/anonymous.jpeg"; -import xiaochengAvatar from "../public/avatars/xiaocheng.jpg"; -import changefengAvatar from "../public/avatars/changfeng.jpg"; -import yinAvatar from "../public/avatars/yin.jpg"; -import kuiziAvatar from "../public/avatars/kuizi.jpeg"; -import xiaoshuiAvatar from "../public/avatars/xiaoshui.jpg"; +import avatar from "../public/static/avatar.png"; +import blankAvatar from "../public/static/avatars/blank.jpeg"; +import jiaZombieAvatar from "../public/static/avatars/jiazombie.png"; +import liunengAvatar from "../public/static/avatars/liuneng.jpg"; +import pilotAvatar from "../public/static/avatars/pilot.jpg"; +import gartnerAvatar from "../public/static/avatars/gartner.jpg"; +import anonymousAvatar from "../public/static/avatars/anonymous.jpeg"; +import xiaochengAvatar from "../public/static/avatars/xiaocheng.jpg"; +import changefengAvatar from "../public/static/avatars/changfeng.jpg"; +import yinAvatar from "../public/static/avatars/yin.jpg"; +import kuiziAvatar from "../public/static/avatars/kuizi.jpeg"; +import xiaoshuiAvatar from "../public/static/avatars/xiaoshui.jpg"; -import AssisChat from "../public/assischat.png"; -import lofyee from "../public/lofyee.png"; -import subnooc from "../public/subnooc.png"; -import youminco from "../public/youminco.png"; -import SparkMemosLogo from '../public/sparkmemos.webp'; +import AssisChat from "../public/static/assischat.png"; +import lofyee from "../public/static/lofyee.png"; +import subnooc from "../public/static/subnooc.png"; +import youminco from "../public/static/youminco.png"; +import SparkMemosLogo from '../public/static/sparkmemos.webp'; const dictionary = { meta: { diff --git a/dictionaries/zh.ts b/dictionaries/zh.ts index f15f41f..39dc0a9 100644 --- a/dictionaries/zh.ts +++ b/dictionaries/zh.ts @@ -9,24 +9,24 @@ import { SiX, } from "@icons-pack/react-simple-icons"; -import avatar from "../public/avatar.png"; -import blankAvatar from "../public/avatars/blank.jpeg"; -import jiaZombieAvatar from "../public/avatars/jiazombie.png"; -import liunengAvatar from "../public/avatars/liuneng.jpg"; -import pilotAvatar from "../public/avatars/pilot.jpg"; -import gartnerAvatar from "../public/avatars/gartner.jpg"; -import anonymousAvatar from "../public/avatars/anonymous.jpeg"; -import xiaochengAvatar from "../public/avatars/xiaocheng.jpg"; -import changefengAvatar from "../public/avatars/changfeng.jpg"; -import yinAvatar from "../public/avatars/yin.jpg"; -import kuiziAvatar from "../public/avatars/kuizi.jpeg"; -import xiaoshuiAvatar from "../public/avatars/xiaoshui.jpg"; +import avatar from "../public/static/avatar.png"; +import blankAvatar from "../public/static/avatars/blank.jpeg"; +import jiaZombieAvatar from "../public/static/avatars/jiazombie.png"; +import liunengAvatar from "../public/static/avatars/liuneng.jpg"; +import pilotAvatar from "../public/static/avatars/pilot.jpg"; +import gartnerAvatar from "../public/static/avatars/gartner.jpg"; +import anonymousAvatar from "../public/static/avatars/anonymous.jpeg"; +import xiaochengAvatar from "../public/static/avatars/xiaocheng.jpg"; +import changefengAvatar from "../public/static/avatars/changfeng.jpg"; +import yinAvatar from "../public/static/avatars/yin.jpg"; +import kuiziAvatar from "../public/static/avatars/kuizi.jpeg"; +import xiaoshuiAvatar from "../public/static/avatars/xiaoshui.jpg"; -import AssisChat from "../public/assischat.png"; -import lofyee from "../public/lofyee.png"; -import subnooc from "../public/subnooc.png"; -import youminco from "../public/youminco.png"; -import SparkMemosLogo from '../public/sparkmemos.webp'; +import AssisChat from "../public/static/assischat.png"; +import lofyee from "../public/static/lofyee.png"; +import subnooc from "../public/static/subnooc.png"; +import youminco from "../public/static/youminco.png"; +import SparkMemosLogo from '../public/static/sparkmemos.webp'; const dictionary = { meta: { diff --git a/public/assischat.png b/public/static/assischat.png similarity index 100% rename from public/assischat.png rename to public/static/assischat.png diff --git a/public/avatar.png b/public/static/avatar.png similarity index 100% rename from public/avatar.png rename to public/static/avatar.png diff --git a/public/avatars/anonymous.jpeg b/public/static/avatars/anonymous.jpeg similarity index 100% rename from public/avatars/anonymous.jpeg rename to public/static/avatars/anonymous.jpeg diff --git a/public/avatars/blank.jpeg b/public/static/avatars/blank.jpeg similarity index 100% rename from public/avatars/blank.jpeg rename to public/static/avatars/blank.jpeg diff --git a/public/avatars/changfeng.jpg b/public/static/avatars/changfeng.jpg similarity index 100% rename from public/avatars/changfeng.jpg rename to public/static/avatars/changfeng.jpg diff --git a/public/avatars/gartner.jpg b/public/static/avatars/gartner.jpg similarity index 100% rename from public/avatars/gartner.jpg rename to public/static/avatars/gartner.jpg diff --git a/public/avatars/jiazombie.png b/public/static/avatars/jiazombie.png similarity index 100% rename from public/avatars/jiazombie.png rename to public/static/avatars/jiazombie.png diff --git a/public/avatars/kuizi.jpeg b/public/static/avatars/kuizi.jpeg similarity index 100% rename from public/avatars/kuizi.jpeg rename to public/static/avatars/kuizi.jpeg diff --git a/public/avatars/liuneng.jpg b/public/static/avatars/liuneng.jpg similarity index 100% rename from public/avatars/liuneng.jpg rename to public/static/avatars/liuneng.jpg diff --git a/public/avatars/pilot.jpg b/public/static/avatars/pilot.jpg similarity index 100% rename from public/avatars/pilot.jpg rename to public/static/avatars/pilot.jpg diff --git a/public/avatars/xiaocheng.jpg b/public/static/avatars/xiaocheng.jpg similarity index 100% rename from public/avatars/xiaocheng.jpg rename to public/static/avatars/xiaocheng.jpg diff --git a/public/avatars/xiaoshui.jpg b/public/static/avatars/xiaoshui.jpg similarity index 100% rename from public/avatars/xiaoshui.jpg rename to public/static/avatars/xiaoshui.jpg diff --git a/public/avatars/yin.jpg b/public/static/avatars/yin.jpg similarity index 100% rename from public/avatars/yin.jpg rename to public/static/avatars/yin.jpg diff --git a/public/banner.png b/public/static/banner.png similarity index 100% rename from public/banner.png rename to public/static/banner.png diff --git a/public/kosto.png b/public/static/kosto.png similarity index 100% rename from public/kosto.png rename to public/static/kosto.png diff --git a/public/lofyee.png b/public/static/lofyee.png similarity index 100% rename from public/lofyee.png rename to public/static/lofyee.png diff --git a/public/sparkmemos.webp b/public/static/sparkmemos.webp similarity index 100% rename from public/sparkmemos.webp rename to public/static/sparkmemos.webp diff --git a/public/subnooc.png b/public/static/subnooc.png similarity index 100% rename from public/subnooc.png rename to public/static/subnooc.png diff --git a/public/youminco.png b/public/static/youminco.png similarity index 100% rename from public/youminco.png rename to public/static/youminco.png diff --git a/velite.config.ts b/velite.config.ts index bc2bd7d..1f8bcb8 100644 --- a/velite.config.ts +++ b/velite.config.ts @@ -96,8 +96,8 @@ export default defineConfig({ root: "content", output: { data: ".velite", - assets: "public/static", - base: "/static/", + assets: "public/static/posts", + base: "/static/posts/", name: "[name]-[hash:6].[ext]", clean: true, },