Compare commits
No commits in common. "b4c224b368e87eb3d4d2ca8757d9d4ccaf0204c4" and "874a2db85326c3de220d033417acb9c19fa80c26" have entirely different histories.
b4c224b368
...
874a2db853
4 changed files with 1 additions and 57 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -24,7 +24,3 @@ storybook-static
|
||||||
|
|
||||||
# Clerk migration export — contains password hashes, never commit
|
# Clerk migration export — contains password hashes, never commit
|
||||||
exported_users.csv
|
exported_users.csv
|
||||||
|
|
||||||
# Generated at build time by scripts/generate-sitemap.mjs
|
|
||||||
/public/sitemap.xml
|
|
||||||
/public/sitemap.xml.gz
|
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,8 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run sitemap && npm run build:remix && npm run build:server",
|
"build": "npm run build:remix && npm run build:server",
|
||||||
"build:remix": "react-router build",
|
"build:remix": "react-router build",
|
||||||
"sitemap": "node scripts/generate-sitemap.mjs",
|
|
||||||
"build:server": "node scripts/build-server.mjs",
|
"build:server": "node scripts/build-server.mjs",
|
||||||
"db:generate": "dotenv -- drizzle-kit generate",
|
"db:generate": "dotenv -- drizzle-kit generate",
|
||||||
"db:migrate": "dotenv -- drizzle-kit migrate",
|
"db:migrate": "dotenv -- drizzle-kit migrate",
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
User-agent: *
|
|
||||||
Allow: /
|
|
||||||
|
|
||||||
Disallow: /admin/
|
|
||||||
Disallow: /api/
|
|
||||||
Disallow: /leagues/
|
|
||||||
Disallow: /onboarding
|
|
||||||
Disallow: /settings
|
|
||||||
Disallow: /user-profile
|
|
||||||
|
|
||||||
Sitemap: https://brackt.com/sitemap.xml
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
import { gzipSync } from "zlib";
|
|
||||||
import { writeFileSync } from "fs";
|
|
||||||
import { join, dirname } from "path";
|
|
||||||
import { fileURLToPath } from "url";
|
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
||||||
const publicDir = join(__dirname, "..", "public");
|
|
||||||
|
|
||||||
const BASE_URL = "https://brackt.com";
|
|
||||||
|
|
||||||
const urls = [
|
|
||||||
{ loc: "/", changefreq: "weekly", priority: "1.0" },
|
|
||||||
{ loc: "/how-to-play", changefreq: "monthly", priority: "0.8" },
|
|
||||||
{ loc: "/rules", changefreq: "monthly", priority: "0.8" },
|
|
||||||
{ loc: "/sports", changefreq: "weekly", priority: "0.8" },
|
|
||||||
{ loc: "/support", changefreq: "monthly", priority: "0.6" },
|
|
||||||
{ loc: "/privacy-policy", changefreq: "yearly", priority: "0.4" },
|
|
||||||
];
|
|
||||||
|
|
||||||
const today = new Date().toISOString().split("T")[0];
|
|
||||||
|
|
||||||
const xml = `<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
||||||
${urls
|
|
||||||
.map(
|
|
||||||
({ loc, changefreq, priority }) => ` <url>
|
|
||||||
<loc>${BASE_URL}${loc}</loc>
|
|
||||||
<lastmod>${today}</lastmod>
|
|
||||||
<changefreq>${changefreq}</changefreq>
|
|
||||||
<priority>${priority}</priority>
|
|
||||||
</url>`
|
|
||||||
)
|
|
||||||
.join("\n")}
|
|
||||||
</urlset>
|
|
||||||
`;
|
|
||||||
|
|
||||||
writeFileSync(join(publicDir, "sitemap.xml"), xml);
|
|
||||||
writeFileSync(join(publicDir, "sitemap.xml.gz"), gzipSync(xml));
|
|
||||||
|
|
||||||
console.log(`Sitemap generated: ${urls.length} URLs`);
|
|
||||||
Loading…
Add table
Reference in a new issue