File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @tabler/preview " : patch
3+ ---
4+
5+ Updated the footer to show the version link everywhere and the ` Generated ` timestamp only on preview builds.
Original file line number Diff line number Diff line change @@ -3,11 +3,10 @@ import Icon from '@ui/Icon.astro'
33import { site } from ' @shared/lib/site'
44import { formatUtcTimestamp } from ' @shared/lib/date-format'
55
6- // Development build (unminified assets) , same as BaseLayout .
7- const environment: string = ' development '
6+ // Set to "preview" on the branch deploys , same as robots.txt and sitemap.xml .
7+ const environment = process . env . NODE_ENV || ' production '
88
99const now = new Date ()
10- const generatedAt = formatUtcTimestamp (now )
1110---
1211
1312<!-- BEGIN FOOTER -->
@@ -44,12 +43,12 @@ const generatedAt = formatUtcTimestamp(now)
4443 </li >
4544 <li class =" list-inline-item" >
4645 {
47- environment === ' production' || environment === ' preview' ? (
46+ environment === ' preview' ? (
47+ ` Generated ${formatUtcTimestamp (now )} `
48+ ) : (
4849 <a href = " ./changelog.html" class = " link-secondary" rel = " noopener" >
4950 v{ site .version }
5051 </a >
51- ) : (
52- ` Generated ${generatedAt } `
5352 )
5453 }
5554 </li >
You can’t perform that action at this time.
0 commit comments