sitemap.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. import { MetadataRoute } from "next/types";
  2. export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
  3. const baseUrl = "https://www.workout.cool";
  4. const currentDate = new Date().toISOString();
  5. // Static routes with locale support
  6. const staticRoutes = [
  7. // Home pages
  8. {
  9. url: baseUrl,
  10. lastModified: currentDate,
  11. changeFrequency: "daily" as const,
  12. priority: 1.0,
  13. },
  14. {
  15. url: `${baseUrl}/fr`,
  16. lastModified: currentDate,
  17. changeFrequency: "daily" as const,
  18. priority: 1.0,
  19. },
  20. {
  21. url: `${baseUrl}/en`,
  22. lastModified: currentDate,
  23. changeFrequency: "daily" as const,
  24. priority: 1.0,
  25. },
  26. // Auth pages (lower priority as they're functional pages)
  27. {
  28. url: `${baseUrl}/auth/signin`,
  29. lastModified: currentDate,
  30. changeFrequency: "monthly" as const,
  31. priority: 0.3,
  32. },
  33. {
  34. url: `${baseUrl}/auth/signup`,
  35. lastModified: currentDate,
  36. changeFrequency: "monthly" as const,
  37. priority: 0.3,
  38. },
  39. // About pages
  40. {
  41. url: `${baseUrl}/about`,
  42. lastModified: currentDate,
  43. changeFrequency: "monthly" as const,
  44. priority: 0.7,
  45. },
  46. {
  47. url: `${baseUrl}/fr/about`,
  48. lastModified: currentDate,
  49. changeFrequency: "monthly" as const,
  50. priority: 0.7,
  51. },
  52. {
  53. url: `${baseUrl}/en/about`,
  54. lastModified: currentDate,
  55. changeFrequency: "monthly" as const,
  56. priority: 0.7,
  57. },
  58. // Legal pages
  59. {
  60. url: `${baseUrl}/legal/privacy`,
  61. lastModified: currentDate,
  62. changeFrequency: "yearly" as const,
  63. priority: 0.2,
  64. },
  65. {
  66. url: `${baseUrl}/legal/terms`,
  67. lastModified: currentDate,
  68. changeFrequency: "yearly" as const,
  69. priority: 0.2,
  70. },
  71. {
  72. url: `${baseUrl}/legal/sales-terms`,
  73. lastModified: currentDate,
  74. changeFrequency: "yearly" as const,
  75. priority: 0.2,
  76. },
  77. {
  78. url: `${baseUrl}/fr/legal/privacy`,
  79. lastModified: currentDate,
  80. changeFrequency: "yearly" as const,
  81. priority: 0.2,
  82. },
  83. {
  84. url: `${baseUrl}/fr/legal/terms`,
  85. lastModified: currentDate,
  86. changeFrequency: "yearly" as const,
  87. priority: 0.2,
  88. },
  89. {
  90. url: `${baseUrl}/fr/legal/sales-terms`,
  91. lastModified: currentDate,
  92. changeFrequency: "yearly" as const,
  93. priority: 0.2,
  94. },
  95. {
  96. url: `${baseUrl}/en/legal/privacy`,
  97. lastModified: currentDate,
  98. changeFrequency: "yearly" as const,
  99. priority: 0.2,
  100. },
  101. {
  102. url: `${baseUrl}/en/legal/terms`,
  103. lastModified: currentDate,
  104. changeFrequency: "yearly" as const,
  105. priority: 0.2,
  106. },
  107. {
  108. url: `${baseUrl}/en/legal/sales-terms`,
  109. lastModified: currentDate,
  110. changeFrequency: "yearly" as const,
  111. priority: 0.2,
  112. },
  113. ];
  114. return staticRoutes;
  115. }