mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 06:16:42 +00:00
Adicionou robots.txt e sitemap
X-Lovable-Edit-ID: edt-66436287-9a49-4479-ac26-cdaa1d8e451a Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
commit
5451b09916
3 changed files with 87 additions and 0 deletions
10
public/robots.txt
Normal file
10
public/robots.txt
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
|
Disallow: /painel
|
||||||
|
Disallow: /admin
|
||||||
|
Disallow: /checkout
|
||||||
|
Disallow: /bem-vindo
|
||||||
|
Disallow: /redefinir-senha
|
||||||
|
Disallow: /recuperar-senha
|
||||||
|
|
||||||
|
Sitemap: https://mika.domco.ai/sitemap.xml
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
import { Route as rootRouteImport } from './routes/__root'
|
import { Route as rootRouteImport } from './routes/__root'
|
||||||
import { Route as TermosRouteImport } from './routes/termos'
|
import { Route as TermosRouteImport } from './routes/termos'
|
||||||
|
import { Route as SitemapDotxmlRouteImport } from './routes/sitemap[.]xml'
|
||||||
import { Route as SignupRouteImport } from './routes/signup'
|
import { Route as SignupRouteImport } from './routes/signup'
|
||||||
import { Route as ReembolsoRouteImport } from './routes/reembolso'
|
import { Route as ReembolsoRouteImport } from './routes/reembolso'
|
||||||
import { Route as RedefinirSenhaRouteImport } from './routes/redefinir-senha'
|
import { Route as RedefinirSenhaRouteImport } from './routes/redefinir-senha'
|
||||||
|
|
@ -43,6 +44,11 @@ const TermosRoute = TermosRouteImport.update({
|
||||||
path: '/termos',
|
path: '/termos',
|
||||||
getParentRoute: () => rootRouteImport,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
|
const SitemapDotxmlRoute = SitemapDotxmlRouteImport.update({
|
||||||
|
id: '/sitemap.xml',
|
||||||
|
path: '/sitemap.xml',
|
||||||
|
getParentRoute: () => rootRouteImport,
|
||||||
|
} as any)
|
||||||
const SignupRoute = SignupRouteImport.update({
|
const SignupRoute = SignupRouteImport.update({
|
||||||
id: '/signup',
|
id: '/signup',
|
||||||
path: '/signup',
|
path: '/signup',
|
||||||
|
|
@ -190,6 +196,7 @@ export interface FileRoutesByFullPath {
|
||||||
'/redefinir-senha': typeof RedefinirSenhaRoute
|
'/redefinir-senha': typeof RedefinirSenhaRoute
|
||||||
'/reembolso': typeof ReembolsoRoute
|
'/reembolso': typeof ReembolsoRoute
|
||||||
'/signup': typeof SignupRoute
|
'/signup': typeof SignupRoute
|
||||||
|
'/sitemap.xml': typeof SitemapDotxmlRoute
|
||||||
'/termos': typeof TermosRoute
|
'/termos': typeof TermosRoute
|
||||||
'/checkout/sucesso': typeof CheckoutSucessoRoute
|
'/checkout/sucesso': typeof CheckoutSucessoRoute
|
||||||
'/painel/agente': typeof PainelAgenteRoute
|
'/painel/agente': typeof PainelAgenteRoute
|
||||||
|
|
@ -218,6 +225,7 @@ export interface FileRoutesByTo {
|
||||||
'/redefinir-senha': typeof RedefinirSenhaRoute
|
'/redefinir-senha': typeof RedefinirSenhaRoute
|
||||||
'/reembolso': typeof ReembolsoRoute
|
'/reembolso': typeof ReembolsoRoute
|
||||||
'/signup': typeof SignupRoute
|
'/signup': typeof SignupRoute
|
||||||
|
'/sitemap.xml': typeof SitemapDotxmlRoute
|
||||||
'/termos': typeof TermosRoute
|
'/termos': typeof TermosRoute
|
||||||
'/checkout/sucesso': typeof CheckoutSucessoRoute
|
'/checkout/sucesso': typeof CheckoutSucessoRoute
|
||||||
'/painel/agente': typeof PainelAgenteRoute
|
'/painel/agente': typeof PainelAgenteRoute
|
||||||
|
|
@ -248,6 +256,7 @@ export interface FileRoutesById {
|
||||||
'/redefinir-senha': typeof RedefinirSenhaRoute
|
'/redefinir-senha': typeof RedefinirSenhaRoute
|
||||||
'/reembolso': typeof ReembolsoRoute
|
'/reembolso': typeof ReembolsoRoute
|
||||||
'/signup': typeof SignupRoute
|
'/signup': typeof SignupRoute
|
||||||
|
'/sitemap.xml': typeof SitemapDotxmlRoute
|
||||||
'/termos': typeof TermosRoute
|
'/termos': typeof TermosRoute
|
||||||
'/checkout/sucesso': typeof CheckoutSucessoRoute
|
'/checkout/sucesso': typeof CheckoutSucessoRoute
|
||||||
'/painel/agente': typeof PainelAgenteRoute
|
'/painel/agente': typeof PainelAgenteRoute
|
||||||
|
|
@ -280,6 +289,7 @@ export interface FileRouteTypes {
|
||||||
| '/redefinir-senha'
|
| '/redefinir-senha'
|
||||||
| '/reembolso'
|
| '/reembolso'
|
||||||
| '/signup'
|
| '/signup'
|
||||||
|
| '/sitemap.xml'
|
||||||
| '/termos'
|
| '/termos'
|
||||||
| '/checkout/sucesso'
|
| '/checkout/sucesso'
|
||||||
| '/painel/agente'
|
| '/painel/agente'
|
||||||
|
|
@ -308,6 +318,7 @@ export interface FileRouteTypes {
|
||||||
| '/redefinir-senha'
|
| '/redefinir-senha'
|
||||||
| '/reembolso'
|
| '/reembolso'
|
||||||
| '/signup'
|
| '/signup'
|
||||||
|
| '/sitemap.xml'
|
||||||
| '/termos'
|
| '/termos'
|
||||||
| '/checkout/sucesso'
|
| '/checkout/sucesso'
|
||||||
| '/painel/agente'
|
| '/painel/agente'
|
||||||
|
|
@ -337,6 +348,7 @@ export interface FileRouteTypes {
|
||||||
| '/redefinir-senha'
|
| '/redefinir-senha'
|
||||||
| '/reembolso'
|
| '/reembolso'
|
||||||
| '/signup'
|
| '/signup'
|
||||||
|
| '/sitemap.xml'
|
||||||
| '/termos'
|
| '/termos'
|
||||||
| '/checkout/sucesso'
|
| '/checkout/sucesso'
|
||||||
| '/painel/agente'
|
| '/painel/agente'
|
||||||
|
|
@ -368,6 +380,7 @@ export interface RootRouteChildren {
|
||||||
RedefinirSenhaRoute: typeof RedefinirSenhaRoute
|
RedefinirSenhaRoute: typeof RedefinirSenhaRoute
|
||||||
ReembolsoRoute: typeof ReembolsoRoute
|
ReembolsoRoute: typeof ReembolsoRoute
|
||||||
SignupRoute: typeof SignupRoute
|
SignupRoute: typeof SignupRoute
|
||||||
|
SitemapDotxmlRoute: typeof SitemapDotxmlRoute
|
||||||
TermosRoute: typeof TermosRoute
|
TermosRoute: typeof TermosRoute
|
||||||
CheckoutSucessoRoute: typeof CheckoutSucessoRoute
|
CheckoutSucessoRoute: typeof CheckoutSucessoRoute
|
||||||
}
|
}
|
||||||
|
|
@ -381,6 +394,13 @@ declare module '@tanstack/react-router' {
|
||||||
preLoaderRoute: typeof TermosRouteImport
|
preLoaderRoute: typeof TermosRouteImport
|
||||||
parentRoute: typeof rootRouteImport
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
|
'/sitemap.xml': {
|
||||||
|
id: '/sitemap.xml'
|
||||||
|
path: '/sitemap.xml'
|
||||||
|
fullPath: '/sitemap.xml'
|
||||||
|
preLoaderRoute: typeof SitemapDotxmlRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
'/signup': {
|
'/signup': {
|
||||||
id: '/signup'
|
id: '/signup'
|
||||||
path: '/signup'
|
path: '/signup'
|
||||||
|
|
@ -643,6 +663,7 @@ const rootRouteChildren: RootRouteChildren = {
|
||||||
RedefinirSenhaRoute: RedefinirSenhaRoute,
|
RedefinirSenhaRoute: RedefinirSenhaRoute,
|
||||||
ReembolsoRoute: ReembolsoRoute,
|
ReembolsoRoute: ReembolsoRoute,
|
||||||
SignupRoute: SignupRoute,
|
SignupRoute: SignupRoute,
|
||||||
|
SitemapDotxmlRoute: SitemapDotxmlRoute,
|
||||||
TermosRoute: TermosRoute,
|
TermosRoute: TermosRoute,
|
||||||
CheckoutSucessoRoute: CheckoutSucessoRoute,
|
CheckoutSucessoRoute: CheckoutSucessoRoute,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
56
src/routes/sitemap[.]xml.ts
Normal file
56
src/routes/sitemap[.]xml.ts
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
import type {} from "@tanstack/react-start";
|
||||||
|
|
||||||
|
const BASE_URL = "https://mika.domco.ai";
|
||||||
|
|
||||||
|
interface SitemapEntry {
|
||||||
|
path: string;
|
||||||
|
lastmod?: string;
|
||||||
|
changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never";
|
||||||
|
priority?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const Route = createFileRoute("/sitemap.xml")({
|
||||||
|
server: {
|
||||||
|
handlers: {
|
||||||
|
GET: async () => {
|
||||||
|
const today = new Date().toISOString().split("T")[0];
|
||||||
|
const entries: SitemapEntry[] = [
|
||||||
|
{ path: "/", lastmod: today, changefreq: "weekly", priority: "1.0" },
|
||||||
|
{ path: "/login", lastmod: today, changefreq: "monthly", priority: "0.5" },
|
||||||
|
{ path: "/signup", lastmod: today, changefreq: "monthly", priority: "0.7" },
|
||||||
|
{ path: "/termos", lastmod: today, changefreq: "yearly", priority: "0.3" },
|
||||||
|
{ path: "/privacidade", lastmod: today, changefreq: "yearly", priority: "0.3" },
|
||||||
|
{ path: "/reembolso", lastmod: today, changefreq: "yearly", priority: "0.3" },
|
||||||
|
];
|
||||||
|
|
||||||
|
const urls = entries.map((e) =>
|
||||||
|
[
|
||||||
|
` <url>`,
|
||||||
|
` <loc>${BASE_URL}${e.path}</loc>`,
|
||||||
|
e.lastmod ? ` <lastmod>${e.lastmod}</lastmod>` : null,
|
||||||
|
e.changefreq ? ` <changefreq>${e.changefreq}</changefreq>` : null,
|
||||||
|
e.priority ? ` <priority>${e.priority}</priority>` : null,
|
||||||
|
` </url>`,
|
||||||
|
]
|
||||||
|
.filter(Boolean)
|
||||||
|
.join("\n"),
|
||||||
|
);
|
||||||
|
|
||||||
|
const xml = [
|
||||||
|
`<?xml version="1.0" encoding="UTF-8"?>`,
|
||||||
|
`<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">`,
|
||||||
|
...urls,
|
||||||
|
`</urlset>`,
|
||||||
|
].join("\n");
|
||||||
|
|
||||||
|
return new Response(xml, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/xml",
|
||||||
|
"Cache-Control": "public, max-age=3600",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue