From b77c3a705310746380b8292fd4b518864863e5ac Mon Sep 17 00:00:00 2001 From: Daniele Polencic Date: Sun, 13 Oct 2019 19:45:37 +0800 Subject: [PATCH] fixed robots.txt --- robots.txt | 2 +- src/index.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/robots.txt b/robots.txt index 8421be4..4cc61f7 100644 --- a/robots.txt +++ b/robots.txt @@ -1,4 +1,4 @@ User-agent: * Sitemap: https://learnk8s.io/sitemap.xml -Disallow: /404/ \ No newline at end of file +Disallow: /404 diff --git a/src/index.tsx b/src/index.tsx index 8d127eb..f0b1497 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { writeFileSync, readFileSync, existsSync } from 'fs' +import { writeFileSync, readFileSync, existsSync, copyFileSync } from 'fs' import { resolve, extname, basename } from 'path' import { mkdir, cp } from 'shelljs' import { syncEvents } from './eventbrite' @@ -416,6 +416,7 @@ run({ })(Sitemap) writeFileSync('_site/sitemap.xml', runSiteMap(Sitemap, 'https://learnk8s.io')) +copyFileSync('robots.txt', resolve('_site', 'robots.txt')) function injectGoogleAnalytics({ $, gaId }: { gaId: string; $: Cheerio }): Cheerio { $.find('head').append(