Skip to content

Commit 4d162e8

Browse files
authored
Add build identifier meta tags (#168)
1 parent bbb7387 commit 4d162e8

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

config/custom-environment-variables.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# This file allows us to define custom environment variables that can be used to override parts of the config. This
22
# provides a convenient mechanism for specifying different config values in different environments.
33

4+
# App-wide settings
5+
app:
6+
# The SHA1 of the commit which resulted in this application
7+
buildVersion: CIRCLE_SHA1
8+
49
# Google Analytics tracking config
510
googleAnalytics:
611
trackingID: CONFIG_GOOGLE_ANALYTICS_TRACKING_ID

docusaurus.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ const siteUrl = cfg.has("siteUrl")
2424
? process.env["DEPLOY_URL"]
2525
: "http://localhost:3000"
2626

27+
const buildVersion = cfg.has("app.buildVersion")
28+
? cfg.get("app.buildVersion")
29+
: "N/A"
30+
2731
const plugins = ["plugin-image-zoom"]
2832

2933
if (enablePosthog) {
@@ -257,6 +261,10 @@ const config = {
257261
appUrl: posthogConfig.appUrl,
258262
}
259263
: undefined,
264+
metadata: [
265+
{ name: "buildVersion", content: buildVersion },
266+
{ name: "buildTime", content: new Date().toString() },
267+
],
260268
}),
261269
}
262270

0 commit comments

Comments
 (0)