Skip to content

Commit cb7edb7

Browse files
committed
Update the git rendering and include it again in the layout.
1 parent a1484f3 commit cb7edb7

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Diff for: _data/git.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ module.exports = async function() {
55
commitsha: await git.short,
66
curbranch: await git.branch,
77
commitdate: await git.date,
8-
repo: "ChrisSpiegl.com"
8+
origin: await git.origin,
99
}
1010
}

Diff for: _includes/layout.pug

+10-5
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,16 @@ body
105105
li: a(href="/uncopyright") Uncopyrighted
106106
li: a(href="/privacy-policy") Privacy Policy
107107
li: a(href="/legal-disclosure") Legal Disclosure
108-
//- li: a#sha(title=`Last changed ${global.dateReadable(git.commitdate)}` href=`https://github.com/chrisspiegl/${git.repo}/blob/master${page.inputPath.slice(1)}`)
109-
//- if (git.curbranch != 'HEAD')
110-
//- = git.curbranch
111-
//- = ' '
112-
//- = git.commitsha
108+
ul
109+
li Last updated:
110+
= ' '
111+
a#sha(title=`Last updated ${global.dateReadable(git.commitdate)}` href=`${git.origin.replace('git@github.com:', 'https://github.com/').replace('.git', '')}/blob/${git.curbranch}${page.inputPath.slice(1)}`)
112+
= global.dateReadableShort(git.commitdate)
113+
= ' '
114+
if (git.curbranch != 'HEAD')
115+
= git.curbranch
116+
= ' '
117+
= git.commitsha
113118
ul
114119
li(style='text-align: center')
115120
a(href="/chrisspiegl.asc") PGP Public Key

0 commit comments

Comments
 (0)