diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..d2e47fb --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,3 @@ +User-agent: * + +Sitemap: https://www.furrycons.cn/sitemap/index.xml diff --git a/src/components/announcementSlider/index.tsx b/src/components/announcementSlider/index.tsx index ac670dd..7cfc15e 100644 --- a/src/components/announcementSlider/index.tsx +++ b/src/components/announcementSlider/index.tsx @@ -39,18 +39,6 @@ function AnnouncementSlider() { 复制群号。 - -
- 由于不可抗力,兽人控游戏库的网址变更为 - - srk.games - - 。 -
); diff --git a/src/pages/robots.txt.ts b/src/pages/robots.txt.ts deleted file mode 100644 index 30a0fd2..0000000 --- a/src/pages/robots.txt.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { GetServerSidePropsContext } from "next"; - -const URL = process.env.NEXT_PUBLIC_WEBSITE_URL; - -const sitemap = `# * -User-agent: * -Allow: / - -# Host -Host: https://${URL} - -# Sitemaps -Sitemap: https://${URL}/sitemap/index.xml`; - -function Robots() {} - -export async function getServerSideProps(context: GetServerSidePropsContext) { - const { res } = context; - - res.setHeader("Content-Type", "text/plain"); - - res.write(sitemap); - res.end(); - - return { - props: {}, - }; -} - -export default Robots;