diff --git a/src/_data/build.js b/src/_data/build.js new file mode 100644 index 00000000..55cf1ba6 --- /dev/null +++ b/src/_data/build.js @@ -0,0 +1,25 @@ +const { execSync } = require('child_process'); + +module.exports = () => { + const now = new Date(); + + // Format the date: "Jan 26, 2026, 07:51 AM" + const timestamp = now.toLocaleString('en-US', { + dateStyle: 'medium', + timeStyle: 'short', + }); + + let gitHash = 'development'; + try { + // Get the short git hash (first 7 characters) + gitHash = execSync('git rev-parse --short HEAD').toString().trim(); + } catch (e) { + console.warn("Could not fetch git hash, defaulting to 'development'"); + } + + return { + timestamp, + hash: gitHash, + repoUrl: "https://github.com/NextCommunity/NextCommunity.github.io" + }; +}; diff --git a/src/_includes/bio.njk b/src/_includes/bio.njk index 1633a4d4..bb1c86ed 100644 --- a/src/_includes/bio.njk +++ b/src/_includes/bio.njk @@ -115,6 +115,8 @@ + {% include "footer.njk" %} +