- Added a new route for comparison pages in routes.ts. - Introduced a TOOL_WORKFLOWS object in seoData.ts to define tool usage sequences. - Updated internal link generation to include workflow slugs. - Added Arabic, English, and French translations for comparison features and FAQs in respective i18n files. - Implemented the ComparisonPage component to display feature comparisons, advantages, verdicts, and related tools. - Enhanced sitemap generation script to include comparison pages.
52 lines
1.7 KiB
TypeScript
52 lines
1.7 KiB
TypeScript
/**
|
|
* Canonical route registry — single source of truth for all application routes.
|
|
*
|
|
* SAFETY RULE: Never remove a route from this list.
|
|
* New routes may only be appended. The route safety test
|
|
* (routes.test.ts) will fail if any existing route is deleted.
|
|
*
|
|
* Tool routes are now derived from the unified manifest (toolManifest.ts).
|
|
*/
|
|
|
|
import { getAllSeoLandingPaths } from '@/config/seoPages';
|
|
import { getManifestRoutePaths } from '@/config/toolManifest';
|
|
|
|
const STATIC_PAGE_ROUTES = [
|
|
'/',
|
|
'/about',
|
|
'/account',
|
|
'/forgot-password',
|
|
'/reset-password',
|
|
'/privacy',
|
|
'/terms',
|
|
'/contact',
|
|
'/pricing',
|
|
'/blog',
|
|
'/blog/:slug',
|
|
'/developers',
|
|
'/tools',
|
|
'/internal/admin',
|
|
'/pricing-transparency',
|
|
'/compare/:slug',
|
|
] as const;
|
|
|
|
const SEO_PAGE_ROUTES = getAllSeoLandingPaths();
|
|
|
|
// ─── Page routes ─────────────────────────────────────────────────
|
|
export const PAGE_ROUTES = [
|
|
...STATIC_PAGE_ROUTES,
|
|
...SEO_PAGE_ROUTES,
|
|
'/:slug',
|
|
'/ar/:slug',
|
|
] as const;
|
|
|
|
// ─── Tool routes (derived from manifest) ─────────────────────────
|
|
export const TOOL_ROUTES = getManifestRoutePaths() as unknown as readonly string[];
|
|
|
|
// ─── All routes combined ─────────────────────────────────────────
|
|
export const ALL_ROUTES = [...PAGE_ROUTES, ...TOOL_ROUTES] as const;
|
|
|
|
export type PageRoute = (typeof PAGE_ROUTES)[number];
|
|
export type ToolRoute = (typeof TOOL_ROUTES)[number];
|
|
export type AppRoute = (typeof ALL_ROUTES)[number];
|