added build date to docusaurus footer

This commit is contained in:
Quinn Dougherty 2022-08-01 18:17:13 -04:00
parent e31707ebed
commit ba402a8e6a
3 changed files with 4 additions and 2 deletions

View File

@ -18,3 +18,4 @@
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
date.js

View File

@ -7,6 +7,7 @@ const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula"); const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const langPackageJson = require("../squiggle-lang/package.json"); const langPackageJson = require("../squiggle-lang/package.json");
const componentsPackageJson = require("../components/package.json"); const componentsPackageJson = require("../components/package.json");
const date = require("./date");
/** @type {import('@docusaurus/types').Config} */ /** @type {import('@docusaurus/types').Config} */
const config = { const config = {
@ -116,7 +117,7 @@ const config = {
width: 150, width: 150,
height: 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: { prism: {
theme: lightCodeTheme, theme: lightCodeTheme,

View File

@ -5,7 +5,7 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"start": "docusaurus start", "start": "docusaurus start",
"build": "docusaurus build", "build": "(echo \"module.exports = '$(date)'\" > date.js) && docusaurus build",
"clean": "docusaurus clear", "clean": "docusaurus clear",
"all": "yarn build", "all": "yarn build",
"lint": "prettier --check .", "lint": "prettier --check .",