Skip to content

Commit

Permalink
fix(robots): remove /search from robots.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed May 17, 2024
1 parent 4fcadd2 commit f844aab
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tool/build-robots-txt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ Disallow: /
`;

export async function runBuildRobotsTxt(outfile: string) {
let content = ALWAYS_ALLOW_ROBOTS ? ALLOW_TEXT : DISALLOW_TEXT;
if (ALWAYS_ALLOW_ROBOTS) {
// Append extra lines specifically when we do allow robots.
for (const locale of VALID_LOCALES.values()) {
content += `Disallow: /${locale}/search\n`;
}
}
const content = ALWAYS_ALLOW_ROBOTS ? ALLOW_TEXT : DISALLOW_TEXT;
fs.writeFileSync(outfile, `${content.trim()}\n`, "utf-8");
}

0 comments on commit f844aab

Please sign in to comment.