mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
Show the version in the footer on preview.tabler.io (#3025)
This commit is contained in:
1 parent
670d63eb1a
commit
9efa76a334
3 files changed
+34
-83
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@tabler/preview": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixed the footer on `preview.tabler.io` to show the version link instead of the `Generated` build stamp.
|
||||||
@@ -3,8 +3,10 @@ import Icon from '@ui/Icon.astro'
|
|||||||
import { site } from '@shared/lib/site'
|
import { site } from '@shared/lib/site'
|
||||||
import { formatUtcTimestamp } from '@shared/lib/date-format'
|
import { formatUtcTimestamp } from '@shared/lib/date-format'
|
||||||
|
|
||||||
// Set to "preview" on the branch deploys, same as robots.txt and sitemap.xml.
|
// Vercel sets VERCEL_ENV to "production" on preview.tabler.io and to "preview"
|
||||||
const environment = process.env.NODE_ENV || 'production'
|
// on branch deploys. Only branch deploys get the build stamp next to the
|
||||||
|
// version; production and local/packaged builds stay byte-stable.
|
||||||
|
const isBranchDeploy = process.env.VERCEL_ENV === 'preview'
|
||||||
|
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
---
|
---
|
||||||
@@ -41,16 +43,11 @@ const now = new Date()
|
|||||||
<a href="." class="link-secondary">{site.title}</a>. All rights reserved.
|
<a href="." class="link-secondary">{site.title}</a>. All rights reserved.
|
||||||
</li>
|
</li>
|
||||||
<li class="list-inline-item">
|
<li class="list-inline-item">
|
||||||
{
|
<a href="./changelog.html" class="link-secondary" rel="noopener">
|
||||||
environment === 'preview' ? (
|
v{site.version}
|
||||||
`Generated ${formatUtcTimestamp(now)}`
|
</a>
|
||||||
) : (
|
|
||||||
<a href="./changelog.html" class="link-secondary" rel="noopener">
|
|
||||||
v{site.version}
|
|
||||||
</a>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</li>
|
</li>
|
||||||
|
{isBranchDeploy && <li class="list-inline-item">Generated {formatUtcTimestamp(now)}</li>}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+21
-72
@@ -1,62 +1,28 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://turbo.build/schema.json",
|
"$schema": "https://turbo.build/schema.json",
|
||||||
"globalEnv": [
|
"globalEnv": ["NODE_ENV", "VERCEL_ENV", "NEXT_PUBLIC_POSTHOG_KEY", "NEXT_PUBLIC_POSTHOG_HOST", "DOCSEARCH_API_KEY", "DOCSEARCH_APP_ID", "DOCSEARCH_INDEX_NAME"],
|
||||||
"NODE_ENV",
|
|
||||||
"NEXT_PUBLIC_POSTHOG_KEY",
|
|
||||||
"NEXT_PUBLIC_POSTHOG_HOST",
|
|
||||||
"DOCSEARCH_API_KEY",
|
|
||||||
"DOCSEARCH_APP_ID",
|
|
||||||
"DOCSEARCH_INDEX_NAME"
|
|
||||||
],
|
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"build": {
|
"build": {
|
||||||
"dependsOn": [
|
"dependsOn": ["^build"],
|
||||||
"^build"
|
"outputs": ["dist/**"],
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
"dist/**"
|
|
||||||
],
|
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"@tabler/preview#build": {
|
"@tabler/preview#build": {
|
||||||
"dependsOn": [
|
"dependsOn": ["^build"],
|
||||||
"^build"
|
"inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/shared/**"],
|
||||||
],
|
"outputs": ["dist/**", "tmp-assets/**"],
|
||||||
"inputs": [
|
|
||||||
"$TURBO_DEFAULT$",
|
|
||||||
"$TURBO_ROOT$/shared/**"
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
"dist/**",
|
|
||||||
"tmp-assets/**"
|
|
||||||
],
|
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"@tabler/docs#build": {
|
"@tabler/docs#build": {
|
||||||
"dependsOn": [
|
"dependsOn": ["^build"],
|
||||||
"^build"
|
"inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/shared/**"],
|
||||||
],
|
"outputs": ["dist/**", "tmp-assets/**"],
|
||||||
"inputs": [
|
|
||||||
"$TURBO_DEFAULT$",
|
|
||||||
"$TURBO_ROOT$/shared/**"
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
"dist/**",
|
|
||||||
"tmp-assets/**"
|
|
||||||
],
|
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"@tabler/screenshots#build": {
|
"@tabler/screenshots#build": {
|
||||||
"dependsOn": [
|
"dependsOn": ["^build"],
|
||||||
"^build"
|
"inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/shared/**"],
|
||||||
],
|
"outputs": ["dist/**"],
|
||||||
"inputs": [
|
|
||||||
"$TURBO_DEFAULT$",
|
|
||||||
"$TURBO_ROOT$/shared/**"
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
"dist/**"
|
|
||||||
],
|
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
@@ -67,56 +33,39 @@
|
|||||||
"cache": false
|
"cache": false
|
||||||
},
|
},
|
||||||
"@tabler/preview#dev:prepare": {
|
"@tabler/preview#dev:prepare": {
|
||||||
"dependsOn": [
|
"dependsOn": ["@tabler/core#dev:prepare"],
|
||||||
"@tabler/core#dev:prepare"
|
|
||||||
],
|
|
||||||
"cache": false
|
"cache": false
|
||||||
},
|
},
|
||||||
"@tabler/core#dev": {
|
"@tabler/core#dev": {
|
||||||
"dependsOn": [
|
"dependsOn": ["@tabler/core#dev:prepare"],
|
||||||
"@tabler/core#dev:prepare"
|
|
||||||
],
|
|
||||||
"cache": false,
|
"cache": false,
|
||||||
"persistent": true
|
"persistent": true
|
||||||
},
|
},
|
||||||
"@tabler/preview#dev": {
|
"@tabler/preview#dev": {
|
||||||
"dependsOn": [
|
"dependsOn": ["@tabler/preview#dev:prepare"],
|
||||||
"@tabler/preview#dev:prepare"
|
|
||||||
],
|
|
||||||
"cache": false,
|
"cache": false,
|
||||||
"persistent": true
|
"persistent": true
|
||||||
},
|
},
|
||||||
"@tabler/screenshots#dev": {
|
"@tabler/screenshots#dev": {
|
||||||
"dependsOn": [
|
"dependsOn": ["@tabler/core#dev:prepare"],
|
||||||
"@tabler/core#dev:prepare"
|
|
||||||
],
|
|
||||||
"cache": false,
|
"cache": false,
|
||||||
"persistent": true
|
"persistent": true
|
||||||
},
|
},
|
||||||
"@tabler/docs#dev": {
|
"@tabler/docs#dev": {
|
||||||
"dependsOn": [
|
"dependsOn": ["@tabler/core#dev:prepare", "@tabler/preview#dev:prepare"],
|
||||||
"@tabler/core#dev:prepare",
|
|
||||||
"@tabler/preview#dev:prepare"
|
|
||||||
],
|
|
||||||
"cache": false,
|
"cache": false,
|
||||||
"persistent": true
|
"persistent": true
|
||||||
},
|
},
|
||||||
"clean": {
|
"clean": {
|
||||||
"dependsOn": [
|
"dependsOn": ["^clean"],
|
||||||
"^clean"
|
|
||||||
],
|
|
||||||
"cache": false
|
"cache": false
|
||||||
},
|
},
|
||||||
"bundlewatch": {
|
"bundlewatch": {
|
||||||
"dependsOn": [
|
"dependsOn": ["build"],
|
||||||
"build"
|
|
||||||
],
|
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"type-check": {
|
"type-check": {
|
||||||
"dependsOn": [
|
"dependsOn": ["^type-check"],
|
||||||
"^type-check"
|
|
||||||
],
|
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
@@ -130,4 +79,4 @@
|
|||||||
"cache": false
|
"cache": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user