From ba402a8e6a07ecb61624920ca7a43feffbef3c2d Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Mon, 1 Aug 2022 18:17:13 -0400 Subject: [PATCH] added build date to docusaurus footer --- packages/website/.gitignore | 1 + packages/website/docusaurus.config.js | 3 ++- packages/website/package.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/website/.gitignore b/packages/website/.gitignore index b2d6de30..749e1b67 100644 --- a/packages/website/.gitignore +++ b/packages/website/.gitignore @@ -18,3 +18,4 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +date.js diff --git a/packages/website/docusaurus.config.js b/packages/website/docusaurus.config.js index 5dbb21d9..96f76136 100644 --- a/packages/website/docusaurus.config.js +++ b/packages/website/docusaurus.config.js @@ -7,6 +7,7 @@ const lightCodeTheme = require("prism-react-renderer/themes/github"); const darkCodeTheme = require("prism-react-renderer/themes/dracula"); const langPackageJson = require("../squiggle-lang/package.json"); const componentsPackageJson = require("../components/package.json"); +const date = require("./date"); /** @type {import('@docusaurus/types').Config} */ const config = { @@ -116,7 +117,7 @@ const config = { width: 150, height: 150, }, - copyright: `Rescript language package v${langPackageJson.version} | React components package v${componentsPackageJson.version}`, + copyright: `Rescript language package v${langPackageJson.version} | React components package v${componentsPackageJson.version} | Built at ${date}`, }, prism: { theme: lightCodeTheme, diff --git a/packages/website/package.json b/packages/website/package.json index 9f21ad98..d2f1e93c 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -5,7 +5,7 @@ "license": "MIT", "scripts": { "start": "docusaurus start", - "build": "docusaurus build", + "build": "(echo \"module.exports = '$(date)'\" > date.js) && docusaurus build", "clean": "docusaurus clear", "all": "yarn build", "lint": "prettier --check .",