diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 00000000..61807fae Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/favicon.png b/docs/favicon.png new file mode 100644 index 00000000..50712630 Binary files /dev/null and b/docs/favicon.png differ diff --git a/docs/generate.js b/docs/generate.js index 63628a72..ef3ce424 100644 --- a/docs/generate.js +++ b/docs/generate.js @@ -66,8 +66,9 @@ function generate(pathname) { fs.writeFileSync("./dist/" + outputFilename.replace(/^docs\//, ""), html, "utf-8") } else if (!pathname.match(/lint|generate/)) { - fs.writeFileSync("./dist/archive/v" + version + "/" + pathname.replace(/^docs\//, ""), fs.readFileSync(pathname, "utf-8"), "utf-8") - fs.writeFileSync("./dist/" + pathname.replace(/^docs\//, ""), fs.readFileSync(pathname, "utf-8"), "utf-8") + var encoding = (/\.(ico|png)$/i).test(path.extname(pathname)) ? "binary" : "utf-8"; + fs.writeFileSync("./dist/archive/v" + version + "/" + pathname.replace(/^docs\//, ""), fs.readFileSync(pathname, encoding), encoding) + fs.writeFileSync("./dist/" + pathname.replace(/^docs\//, ""), fs.readFileSync(pathname, encoding), encoding) } } } diff --git a/docs/layout.html b/docs/layout.html index fffa4f37..110a890b 100644 --- a/docs/layout.html +++ b/docs/layout.html @@ -4,6 +4,7 @@