mirror of
https://github.com/anotherhadi/iknowyou.git
synced 2026-04-12 00:47:26 +02:00
init
This commit is contained in:
52
front/astro.config.mjs
Normal file
52
front/astro.config.mjs
Normal file
@@ -0,0 +1,52 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from "astro/config";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import svelte from "@astrojs/svelte";
|
||||
import remarkGithubBlockquoteAlert from "remark-github-blockquote-alert";
|
||||
import { EventEmitter } from "events";
|
||||
|
||||
EventEmitter.defaultMaxListeners = 25;
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: "https://iky.hadi.icu",
|
||||
output: "static",
|
||||
vite: {
|
||||
resolve: {
|
||||
noExternal: ["@lucide/svelte"],
|
||||
},
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
{
|
||||
name: "shell-rewrite",
|
||||
configureServer(server) {
|
||||
server.middlewares.use((req, _res, next) => {
|
||||
if (/^\/tools\/[^/]+\/?(\?.*)?$/.test(req.url)) req.url = "/tools/_";
|
||||
if (/^\/search\/[^/]+\/?(\?.*)?$/.test(req.url)) req.url = "/search/_";
|
||||
next();
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": "http://localhost:8080",
|
||||
},
|
||||
},
|
||||
},
|
||||
integrations: [svelte()],
|
||||
markdown: {
|
||||
remarkPlugins: [remarkGithubBlockquoteAlert],
|
||||
shikiConfig: {
|
||||
theme: "github-dark",
|
||||
transformers: [
|
||||
{
|
||||
name: "code-block-meta",
|
||||
pre(node) {
|
||||
node.properties["data-lang"] = this.options.lang || "text";
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user