From 72b2d5c62230cf58ef4fbee04e8abdd3345f73f6 Mon Sep 17 00:00:00 2001 From: Oreoluwa Agunbiade Date: Fri, 4 Feb 2022 10:17:56 -0700 Subject: [PATCH] Add build identifier meta tags --- config/custom-environment-variables.yaml | 5 +++++ docusaurus.config.js | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/config/custom-environment-variables.yaml b/config/custom-environment-variables.yaml index 9711fd4421..55951dd77e 100644 --- a/config/custom-environment-variables.yaml +++ b/config/custom-environment-variables.yaml @@ -1,6 +1,11 @@ # This file allows us to define custom environment variables that can be used to override parts of the config. This # provides a convenient mechanism for specifying different config values in different environments. +# App-wide settings +app: + # The SHA1 of the commit which resulted in this application + buildVersion: CIRCLE_SHA1 + # Google Analytics tracking config googleAnalytics: trackingID: CONFIG_GOOGLE_ANALYTICS_TRACKING_ID diff --git a/docusaurus.config.js b/docusaurus.config.js index 29b5336290..dbc453ea48 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -24,6 +24,10 @@ const siteUrl = cfg.has("siteUrl") ? process.env["DEPLOY_URL"] : "http://localhost:3000" +const buildVersion = cfg.has("app.buildVersion") + ? cfg.get("app.buildVersion") + : "N/A" + const plugins = ["plugin-image-zoom"] if (enablePosthog) { @@ -256,6 +260,10 @@ const config = { appUrl: posthogConfig.appUrl, } : undefined, + metadata: [ + { name: "buildVersion", content: buildVersion }, + { name: "buildTime", content: new Date().toString() }, + ], }), }