Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]

jobs:
ci:
test:
runs-on: ubuntu-latest

steps:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ yarn-error.log*
.vercel

# AI
.claude/*
.claude/*

# Auto-generated files (generated during deployment)
/public/sitemap.xml
18 changes: 18 additions & 0 deletions api/sitemap.xml.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Vercel API Route: /api/sitemap.xml
export default function handler(req, res) {
const baseUrl = 'https://circassimilate.com';
const lastmod = new Date().toISOString().split('T')[0];

const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>${baseUrl}</loc>
<lastmod>${lastmod}</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
</urlset>`;

res.setHeader('Content-Type', 'text/xml');
res.status(200).send(sitemap);
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && eslint src --ext .ts,.tsx,.js,.jsx && vite build",
"build:production": "tsc && eslint src --ext .ts,.tsx,.js,.jsx && node scripts/generate-sitemap.js && vite build",
"preview": "vite preview",
"test": "jest",
"test:ci": "jest --coverage --watchAll=false",
Expand Down
9 changes: 0 additions & 9 deletions public/sitemap.xml

This file was deleted.

37 changes: 37 additions & 0 deletions scripts/generate-sitemap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env node

import { writeFileSync } from 'fs';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';

const __dirname = dirname(fileURLToPath(import.meta.url));

const generateSitemap = () => {
const baseUrl = 'https://circassimilate.com';
const lastmod = new Date().toISOString().split('T')[0];

const pages = [
{
url: '',
lastmod,
changefreq: 'monthly',
priority: '1.0'
}
];

const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${pages.map(page => ` <url>
<loc>${baseUrl}${page.url}</loc>
<lastmod>${page.lastmod}</lastmod>
<changefreq>${page.changefreq}</changefreq>
<priority>${page.priority}</priority>
</url>`).join('\n')}
</urlset>`;

const sitemapPath = join(__dirname, '../public/sitemap.xml');
writeFileSync(sitemapPath, sitemap);
console.log('✅ Sitemap generated successfully');
};

generateSitemap();
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"buildCommand": "pnpm run build",
"buildCommand": "pnpm run build:production",
"outputDirectory": "build",
"installCommand": "pnpm install --frozen-lockfile",
"framework": "vite",
Expand Down