Skip to content

Commit

Permalink
docs: add version to footer
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed May 27, 2021
1 parent d9fece5 commit 23848f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/docs/docs/components/_index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function Example() {
<CategoricalColor value={row.shirtSize} color="red" />
<DateLabel value={row.birthday} />
<UpSetLine value={row.hobbies} sets={['running', 'reading', 'cooking']} />
<HeatMap1D value={row.runningTimes} />
<HeatMap1D value={row.runningTimes} scale={normalize(0, 50)} />
</div>
);
}
Expand Down
7 changes: 6 additions & 1 deletion packages/docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -15,6 +17,7 @@ module.exports = {
projectName: 'lineup-lite', // Usually your repo name.
customFields: {
branch: resolveGitBranch(),
version: pkg.version,
},
themeConfig: {
hideableSidebar: true,
Expand Down Expand Up @@ -116,7 +119,9 @@ module.exports = {
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} <a href="https://www.sgratzl.com">Samuel Gratzl</a>. All rights reserved. Built with Docusaurus.`,
copyright: `<a href="https://github.com/sgratzl/lineup-lite/releases/v${pkg.version}">v${
pkg.version
}</a>. Copyright © ${new Date().getFullYear()} <a href="https://www.sgratzl.com">Samuel Gratzl</a>. All rights reserved. Built with Docusaurus.`,
},
algolia: {
apiKey: '85bfa6629a04cc69c9d91c95db0df80f',
Expand Down

0 comments on commit 23848f3

Please sign in to comment.