docs: prerender for gh pages

This commit is contained in:
Eric Liu 2020-10-03 08:46:13 -07:00
commit f0b270b9bc
6 changed files with 13 additions and 11 deletions

View file

@ -19,12 +19,7 @@ async function scrape(page, url = "") {
function relativePaths(depth = 0) {
const asset_extension = new RegExp(/.(js|css|ico)$/);
let relative_path =
depth > 0
? Array.from({ length: depth }, (_, i) => "../")
.join("")
.slice(0, -1)
: ".";
let relative_path = "";
return (tree) => {
tree.match(