Migrate some scripts to Alpine and add 18+ icon
This commit is contained in:
parent
dcbf094a0e
commit
328e84ccc7
20 changed files with 220 additions and 174 deletions
|
|
@ -6,39 +6,35 @@ import htaccessIntegration from "astro-htaccess";
|
|||
import pagefindIntegration from "astro-pagefind";
|
||||
import { AI_BOTS } from "./src/data/ai_bots";
|
||||
|
||||
import alpinejs from "@astrojs/alpinejs";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: "https://gallery.badmanners.xyz",
|
||||
integrations: [
|
||||
tailwindIntegration({
|
||||
applyBaseStyles: false,
|
||||
}),
|
||||
markdownIntegration(),
|
||||
mdxIntegration(),
|
||||
htaccessIntegration({
|
||||
generateHtaccessFile: import.meta.env.APACHE_CONFIG === "true",
|
||||
customRules: [
|
||||
// Block AI bots
|
||||
"<IfModule mod_rewrite.c>",
|
||||
" RewriteEngine on",
|
||||
" RewriteBase /",
|
||||
` RewriteCond %{HTTP_USER_AGENT} ${AI_BOTS.map((bot) => `^${bot}$`).join("|")} [NC]`,
|
||||
" RewriteRule ^ – [F]",
|
||||
"</IfModule>",
|
||||
],
|
||||
redirects: [
|
||||
{
|
||||
match: "/story/",
|
||||
url: "/stories/",
|
||||
},
|
||||
{
|
||||
match: "/game/",
|
||||
url: "/games/",
|
||||
},
|
||||
],
|
||||
}),
|
||||
pagefindIntegration(),
|
||||
],
|
||||
integrations: [tailwindIntegration({
|
||||
applyBaseStyles: false,
|
||||
}), markdownIntegration(), mdxIntegration(), htaccessIntegration({
|
||||
generateHtaccessFile: import.meta.env.APACHE_CONFIG === "true",
|
||||
customRules: [
|
||||
// Block AI bots
|
||||
"<IfModule mod_rewrite.c>",
|
||||
" RewriteEngine on",
|
||||
" RewriteBase /",
|
||||
` RewriteCond %{HTTP_USER_AGENT} ${AI_BOTS.map((bot) => `^${bot}$`).join("|")} [NC]`,
|
||||
" RewriteRule ^ – [F]",
|
||||
"</IfModule>",
|
||||
],
|
||||
redirects: [
|
||||
{
|
||||
match: "/story/",
|
||||
url: "/stories/",
|
||||
},
|
||||
{
|
||||
match: "/game/",
|
||||
url: "/games/",
|
||||
},
|
||||
],
|
||||
}), pagefindIntegration(), alpinejs()],
|
||||
markdown: {
|
||||
smartypants: false,
|
||||
shikiConfig: {
|
||||
|
|
@ -67,4 +63,4 @@ export default defineConfig({
|
|||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue