mirror of
https://github.com/Xevion/dynamic-preauth.git
synced 2025-12-06 01:14:55 -06:00
Set proper site URL, preact devtools, sitemap, robots.txt
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
import tailwind from '@astrojs/tailwind';
|
||||
|
||||
import sitemap from '@astrojs/sitemap';
|
||||
|
||||
import preact from '@astrojs/preact';
|
||||
import { defineConfig } from "astro/config";
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
import sitemap from "@astrojs/sitemap";
|
||||
import preact from "@astrojs/preact";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [tailwind(), sitemap(), preact()]
|
||||
});
|
||||
site: process.env.DEV
|
||||
? "https://localhost:4321"
|
||||
: `https://${process.env.RAILWAY_PUBLIC_DOMAIN}`,
|
||||
integrations: [
|
||||
tailwind(),
|
||||
sitemap({
|
||||
changefreq: "monthly",
|
||||
priority: 1.0,
|
||||
// xslURL: "/sitemap.xsl",
|
||||
}),
|
||||
preact({
|
||||
devtools: process.env.DEV != undefined ? true : false,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<title>Astro Basics</title>
|
||||
</head>
|
||||
<body>
|
||||
<slot />
|
||||
</body>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<title>Dynamic Preauth</title>
|
||||
</head>
|
||||
<body>
|
||||
<slot />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
13
frontend/src/pages/robots.txt.ts
Normal file
13
frontend/src/pages/robots.txt.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { APIRoute } from "astro";
|
||||
|
||||
const getRobotsTxt = (sitemapURL: URL) => `
|
||||
User-agent: *
|
||||
Disallow: /download/
|
||||
|
||||
Sitemap: ${sitemapURL.href}
|
||||
`;
|
||||
|
||||
export const GET: APIRoute = ({ site }) => {
|
||||
const sitemapURL = new URL("sitemap-index.xml", site);
|
||||
return new Response(getRobotsTxt(sitemapURL));
|
||||
};
|
||||
Reference in New Issue
Block a user