Skip to content

Commit 2bc6e1b

Browse files
committed
feat: add build date + commit sha to site footer
1 parent 5332033 commit 2bc6e1b

File tree

5 files changed

+15
-18
lines changed

5 files changed

+15
-18
lines changed

docusaurus.config.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
import { execSync } from 'child_process';
2+
3+
function getCommitSha() {
4+
try {
5+
return execSync('git rev-parse --short HEAD').toString().trim();
6+
} catch (e) {
7+
return 'unknown';
8+
}
9+
}
10+
111
module.exports = {
212
title: 'Wokwi Docs',
313
tagline: 'Online Arduino & Electronics Simulator',
@@ -94,13 +104,16 @@ module.exports = {
94104
],
95105
},
96106
],
97-
copyright: `Copyright © ${new Date().getFullYear()} CodeMagic LTD. Built with Docusaurus.`,
107+
copyright: `
108+
Copyright © 2021-${new Date().getFullYear()} CodeMagic LTD.
109+
<small>Built with Docusaurus at ${new Date().toISOString()}, commit sha ${getCommitSha()}.</small>
110+
`,
98111
},
99112
algolia: {
100113
appId: 'VNOAE1ADJ6',
101114
apiKey: 'cf8c02a00fa23ba42725ac0fc3a10a3d',
102115
indexName: 'wokwi',
103-
},
116+
},
104117
prism: {
105118
additionalLanguages: ['rust'],
106119
},

i18n/de-DE/docusaurus-theme-classic/footer.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,5 @@
3434
"link.item.label.GitHub": {
3535
"message": "GitHub",
3636
"description": "The label of footer link with label=GitHub linking to https://github.com/wokwi/wokwi-docs"
37-
},
38-
"copyright": {
39-
"message": "Copyright © 2021-2023 CodeMagic LTD. Erstellt mit Docusaurus.",
40-
"description": "The footer copyright"
4137
}
4238
}

i18n/en/docusaurus-theme-classic/footer.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,5 @@
3434
"link.item.label.GitHub": {
3535
"message": "GitHub",
3636
"description": "The label of footer link with label=GitHub linking to https://github.com/wokwi/wokwi-docs"
37-
},
38-
"copyright": {
39-
"message": "Copyright © 2021-2023 CodeMagic LTD. Built with Docusaurus.",
40-
"description": "The footer copyright"
4137
}
4238
}

i18n/pt-BR/docusaurus-theme-classic/footer.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,5 @@
3434
"link.item.label.GitHub": {
3535
"message": "GitHub",
3636
"description": "O rótulo do link do rodapé com rótulo=GitHub com link para https://github.com/wokwi/wokwi-docs"
37-
},
38-
"copyright": {
39-
"message": "Copyright © 2021-2023 CodeMagic LTD. Construído com Docusaurus.",
40-
"description": "Os direitos autorais do rodapé"
4137
}
4238
}

i18n/zh-CN/docusaurus-theme-classic/footer.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,5 @@
3434
"link.item.label.GitHub": {
3535
"message": "GitHub",
3636
"description": "The label of footer link with label=GitHub linking to https://github.com/wokwi/wokwi-docs"
37-
},
38-
"copyright": {
39-
"message": "Copyright © 2021 CodeMagic LTD. Built with Docusaurus.",
40-
"description": "The footer copyright"
4137
}
4238
}

0 commit comments

Comments
 (0)