Skip to content

Commit

Permalink
Disable prerender for a few days
Browse files Browse the repository at this point in the history
  • Loading branch information
adriaandotcom committed Feb 4, 2025
1 parent b49990d commit 7ee7942
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,33 @@ const locales = [
},
];

const prerender = [
const prerenderPages = [
"/",
"/nl",
"/de",
"/es",
"/fr",
"/it",
// "/pricing",
// "/nl/prijzen",
// "/es/precios",
// "/de/preise",
// "/it/prezzi",
// "/fr/tarifs",
"/ai",
"/resources",
"/glossaries",
"/utm-builder",
"/google-analytics-is-illegal-in-these-countries",
];

const blogPages = [
"/blog/why-simple-analytics-is-a-great-alternative-to-google-analytics",
"/blog/why-simple-analytics-is-a-great-alternative-to-matomo",
"/blog/why-simple-analytics-is-a-great-alternative-to-plausible",
"/blog/why-simple-analytics-is-a-great-alternative-to-cloudflare-web-analytics",
];

const stopCachingOfBlogPagesUntil = "2025-02-10";
const includeBlogPages = new Date() > new Date(stopCachingOfBlogPagesUntil);

const prerender = [
...prerenderPages,
...(includeBlogPages ? blogPages : []),
].reduce((acc, route) => {
acc[route] = { prerender: true };
return acc;
Expand Down Expand Up @@ -217,4 +222,4 @@ export default defineNuxtConfig({
},

compatibilityDate: "2024-11-07",
});
});

0 comments on commit 7ee7942

Please sign in to comment.