diff --git a/documentation/scripts/postbuild.js b/documentation/scripts/postbuild.js index 8417abc3b7..07346e54b0 100644 --- a/documentation/scripts/postbuild.js +++ b/documentation/scripts/postbuild.js @@ -64,6 +64,14 @@ fs.writeFileSync(versionTextPath, hash) // robots txt generator const documentationDirectory = path.join(__dirname, ".."); // /git/starsky/documentation - without docs +function readFile(rootPath, from) { + const filename = path.join(rootPath, from); + if (fs.existsSync(filename) === false) { + return null; + } + return fs.readFileSync(filename, { encoding: "utf8" }); +} + function replaceRobotsTxt() { let robots = readFile(documentationDirectory, path.join("static", "robots.template")); console.log(robots.length >= 1 ? "robots.template contains content" : "robots.template is empty"); diff --git a/documentation/scripts/prestart.js b/documentation/scripts/prestart.js index 91969e8185..3e6abd500c 100644 --- a/documentation/scripts/prestart.js +++ b/documentation/scripts/prestart.js @@ -50,14 +50,6 @@ function writeFile(to, content) { fs.writeFileSync(filename, content); } -function readFile(rootPath, from) { - const filename = path.join(rootPath, from); - if (fs.existsSync(filename) === false) { - return null; - } - return fs.readFileSync(filename, { encoding: "utf8" }); -} - copyFileSync("history.md", "advanced-options/history.md"); copyFileSync("starsky/telemetry.md", "advanced-options/starsky/telemetry.md");