diff --git a/.changeset/footer-generated-preview-only.md b/.changeset/footer-generated-preview-only.md new file mode 100644 index 000000000..f990e71f9 --- /dev/null +++ b/.changeset/footer-generated-preview-only.md @@ -0,0 +1,5 @@ +--- +"@tabler/preview": patch +--- + +Updated the footer to show the version link everywhere and the `Generated` timestamp only on preview builds. diff --git a/shared/components/layout/Footer.astro b/shared/components/layout/Footer.astro index d447f2df0..7b552a0f8 100644 --- a/shared/components/layout/Footer.astro +++ b/shared/components/layout/Footer.astro @@ -3,11 +3,10 @@ import Icon from '@ui/Icon.astro' import { site } from '@shared/lib/site' import { formatUtcTimestamp } from '@shared/lib/date-format' -// Development build (unminified assets), same as BaseLayout. -const environment: string = 'development' +// Set to "preview" on the branch deploys, same as robots.txt and sitemap.xml. +const environment = process.env.NODE_ENV || 'production' const now = new Date() -const generatedAt = formatUtcTimestamp(now) --- @@ -44,12 +43,12 @@ const generatedAt = formatUtcTimestamp(now)