@matrixage/picpic
Version:
A awesome image bed by github pages and github actions.
22 lines (19 loc) • 375 B
JavaScript
const { getFileTree } = require('../utils')
module.exports = async str => {
const tree = await getFileTree()
return str.replace(
`
<head>
<title>PicPic</title>
</head>
`,
`
<head>
<title>PicPic</title>
<script>
window.img_paths=${JSON.stringify(tree)}
</script>
</head>
`
)
}