Skip to content

Commit

Permalink
Merge pull request #292 from HoomanDigital/dharamveer
Browse files Browse the repository at this point in the history
chore: Remove astro-robots-txt integration and update astro.config.mjs
  • Loading branch information
Hooman Digital authored Jun 28, 2024
2 parents 19a3734 + 0cf4190 commit 181a5da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 0 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { defineConfig } from "astro/config";
import remark from "remark-directive";
import { customAsidePlugin } from "./src/lib/aside/customAsidePlugin";

import robotsTxt from "astro-robots-txt";

// https://astro.build/config
export default defineConfig({
// experimental: {
Expand Down Expand Up @@ -48,7 +46,6 @@ export default defineConfig({
},
}),
mdx(),
robotsTxt(),
],
site: "https://akash.network",
});
16 changes: 16 additions & 0 deletions src/pages/robots.txt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { APIRoute } from "astro";

const robotsTxt = `
User-agent: *
Allow: /
Sitemap: ${new URL("sitemap-0.xml", import.meta.env.SITE).href}
`.trim();

export const GET: APIRoute = () => {
return new Response(robotsTxt, {
headers: {
"Content-Type": "text/plain; charset=utf-8",
},
});
};

0 comments on commit 181a5da

Please sign in to comment.