diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-03-04 16:49:41 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-03-04 16:49:41 +0100 |
| commit | 4ed70beabc73dd9aa1d2e06ab5902ded0801c404 (patch) | |
| tree | 05fb731e5c937be885c6d03f31f40f1f9fd2cf8c /next-sitemap.js | |
| parent | 4378c4553b17d5435b08387d80377bce666dc838 (diff) | |
chore: use a different configuration depending on app env
It will be useful with Docker. Instead of cloning the project with a
different configuration, I can manage two different configuration
thanks to dotenv and some checking inside the app.
Diffstat (limited to 'next-sitemap.js')
| -rw-r--r-- | next-sitemap.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/next-sitemap.js b/next-sitemap.js index c9cd443..348ea0b 100644 --- a/next-sitemap.js +++ b/next-sitemap.js @@ -1,7 +1,11 @@ /** @type {import('next-sitemap').IConfig} */ +const isStaging = process.env.APP_ENV === 'staging'; + module.exports = { - siteUrl: `${process.env.NEXT_PUBLIC_APP_PROTOCOL}://${process.env.NEXT_PUBLIC_APP_DOMAIN}`, + siteUrl: isStaging + ? process.env.NEXT_PUBLIC_STAGING_APP_URL + : process.env.NEXT_PUBLIC_APP_URL, generateRobotsTxt: true, changefreq: null, priority: null, |
