diff --git a/site/index.html b/site/index.html index 758c347fad..ac18266dcd 100644 --- a/site/index.html +++ b/site/index.html @@ -16,6 +16,7 @@ + { + // Build info is injected by the Coder server into the HTML document. + const buildInfo = document.querySelector("meta[property=build-info]") + if (buildInfo) { + const rawContent = buildInfo.getAttribute("content") + try { + return JSON.parse(rawContent as string) + } catch (ex) { + // Ignore this and fetch as normal! + } + } + + return API.getBuildInfo() + }, }, actions: { assignBuildInfo: assign({