Index
joshstock.in
/
57d36c9
Source for serving and static templating/compiling of https://joshstock.in.
Download
|
Refs
|
Commit Log
|
Files
|
README
|
LICENSE
Latest Commit
{#}
Time
Hash
Subject
Author
#
(+)
(-)
GPG?
73
20 Jan 2020 21:49
9b4a3f1
Begin gitpager rewrite
Josh Stockin
1
11
0
N
Blob @
joshstock.in
/
gitpager
/
src
/
templates.js
application/javascript
278 bytes
download raw
1
const
fs
=
require
(
'fs'
);
2
const
pathFix
=
require
(
'./pathFix'
);
3
const
config
=
require
(
'./config'
);
4
5
module
.
exports
=
function
(
template
,
keys
) {
6
for
(
key
in
keys
) {
7
value
=
keys
[
key
];
8
template
=
template
.
replace
(
new
RegExp
(
"
\\
$"
+
key
,
"g"
),
value
);
9
}
10
return
template
;
11
}
12