Moved robots.txt generation into the gulp file.
This commit is contained in:
parent
87369e98fb
commit
8606f1de11
|
@ -92,5 +92,6 @@ gulp.task('html', ['hugo', 'css', 'images'], () => (
|
||||||
|
|
||||||
gulp.task('deploy', ['hugo', 'css', 'images', 'html'], () => {
|
gulp.task('deploy', ['hugo', 'css', 'images', 'html'], () => {
|
||||||
require('fs').writeFileSync(`${distPath}/CNAME`, `${cname}`);
|
require('fs').writeFileSync(`${distPath}/CNAME`, `${cname}`);
|
||||||
|
require('fs').writeFileSync(`${distPath}/robots.txt`, `Sitemap: https://${cname}/sitemap.xml\n\nUser-agent: *`);
|
||||||
return gulp.src(`${distPath}/**/*`).pipe(ghPages(deployOptions));
|
return gulp.src(`${distPath}/**/*`).pipe(ghPages(deployOptions));
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
Sitemap: {{ .Site.BaseURL }}sitemap.xml
|
|
||||||
|
|
||||||
User-agent: *
|
|
Reference in New Issue