From 23848f308f69161a8e3d37fc26c5be65bf5cb909 Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Thu, 27 May 2021 08:18:01 -0400 Subject: [PATCH] docs: add version to footer --- packages/docs/docs/components/_index.mdx | 2 +- packages/docs/docusaurus.config.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/docs/docs/components/_index.mdx b/packages/docs/docs/components/_index.mdx index b8dccaa..bf6f205 100644 --- a/packages/docs/docs/components/_index.mdx +++ b/packages/docs/docs/components/_index.mdx @@ -39,7 +39,7 @@ function Example() { - + ); } diff --git a/packages/docs/docusaurus.config.js b/packages/docs/docusaurus.config.js index 91f17c8..3776e35 100644 --- a/packages/docs/docusaurus.config.js +++ b/packages/docs/docusaurus.config.js @@ -1,8 +1,10 @@ const exec = require('child_process').execSync; +const pkg = require('./package.json'); function resolveGitBranch() { return exec('git rev-parse --abbrev-ref HEAD').toString(); } + module.exports = { title: 'LineUp-lite', tagline: 'a LineUp implementation based on react-table', @@ -15,6 +17,7 @@ module.exports = { projectName: 'lineup-lite', // Usually your repo name. customFields: { branch: resolveGitBranch(), + version: pkg.version, }, themeConfig: { hideableSidebar: true, @@ -116,7 +119,9 @@ module.exports = { ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} Samuel Gratzl. All rights reserved. Built with Docusaurus.`, + copyright: `v${ + pkg.version + }. Copyright © ${new Date().getFullYear()} Samuel Gratzl. All rights reserved. Built with Docusaurus.`, }, algolia: { apiKey: '85bfa6629a04cc69c9d91c95db0df80f',