feat: add motion design pipeline and restore Korean showcase corpus
This commit is contained in:
parent
b5f59ca87a
commit
047df4d08b
63 changed files with 2181 additions and 919 deletions
|
|
@ -1,9 +1,50 @@
|
|||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import url from "node:url";
|
||||
import { defineConfig } from "astro/config";
|
||||
|
||||
const publicDir = path.resolve(path.dirname(url.fileURLToPath(import.meta.url)), "public");
|
||||
|
||||
export default defineConfig({
|
||||
site: "https://designpaca.chanpaca.net",
|
||||
// 정적 출력 — Cloudflare Pages 로 그대로 올린다
|
||||
output: "static",
|
||||
build: { format: "directory" },
|
||||
devToolbar: { enabled: false },
|
||||
vite: {
|
||||
server: {
|
||||
watch: {
|
||||
ignored: ["**/.astro/**"],
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
name: "public-dir-index",
|
||||
configureServer(server) {
|
||||
server.middlewares.use((req, res, next) => {
|
||||
if (req.url) {
|
||||
const [pathname, search = ""] = req.url.split("?");
|
||||
if (pathname && pathname.startsWith("/work/")) {
|
||||
if (pathname.endsWith("/")) {
|
||||
const candidate = path.join(publicDir, pathname, "index.html");
|
||||
if (fs.existsSync(candidate)) {
|
||||
req.url = `${pathname}index.html${search ? `?${search}` : ""}`;
|
||||
}
|
||||
} else if (!path.extname(pathname)) {
|
||||
const candidate = path.join(publicDir, pathname, "index.html");
|
||||
if (fs.existsSync(candidate)) {
|
||||
res.statusCode = 302;
|
||||
res.setHeader("Location", `${pathname}/${search ? `?${search}` : ""}`);
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
next();
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue