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*
yarn-debug.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 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,

View File

@ -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 .",