diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 1810c98..b8a46a8 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,25 +1,35 @@ --- +import { execSync } from "child_process"; +import FormattedDate from "./FormattedDate.astro"; + +const cmd = `git log -1 --pretty="%cn&&%cd&&%s&&%h" --date=iso`; +const git_info = execSync(cmd).toString().trim().split("&&"); +const [ author, date, message, hash ] = git_info; + const links = [ - {name: "git", url: "https://github.com/skovati"}, - {name: "mail", url: "mailto:mail@skovati.dev"}, - {name: "pgp", url: "/pgp"} + { name: "git", url: "https://github.com/skovati" }, + { name: "mail", url: "mailto:mail@skovati.dev" }, + { name: "pgp", url: "/pgp" } ] ---

- the content for this site is CC-BY-NC-ND + last modified: {`(${hash}) ${author} - ${message} - `} + +

+ +

+ the content for this site is CC-BY-NC-ND

- the source code is MIT + the source code is MIT

-{ - links.map(e => - {e.name} - ) -} + {links.map(e => + {`${e.name} `} + )}