From 77917e34c93668e9936768bed681696d78028748 Mon Sep 17 00:00:00 2001 From: Martin Staffa Date: Sun, 18 Feb 2018 20:32:04 +0100 Subject: [PATCH] chore(docs.angularjs.org): allow crawling of examples, don't deploy e2e test files --- Gruntfile.js | 2 +- docs/app/assets/robots.txt | 13 ++----------- scripts/docs.angularjs.org-firebase/firebase.json | 9 ++++++++- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index ba5efa0d8..70fd9d8a8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -341,7 +341,7 @@ module.exports = function(grunt) { }, { cwd: 'build/docs', - src: '**', + src: ['**', '!ptore2e/**'], dest: 'deploy/docs/', expand: true }, diff --git a/docs/app/assets/robots.txt b/docs/app/assets/robots.txt index 36b7daeca..898272b08 100644 --- a/docs/app/assets/robots.txt +++ b/docs/app/assets/robots.txt @@ -1,13 +1,4 @@ User-agent: * -Disallow: /examples/ -Disallow: /ptore2e/ -Disallow: /Error404.html - -# The js / map files in the root are used by the embedded examples, not by the app itself -Disallow: /*.js$ -Disallow: /*.map$ - -# (Javascript) crawlers need to access JS files -Allow: /components/*.js -Allow: /js/*.js +# The map files are not required by the app +Disallow: /*.map$ \ No newline at end of file diff --git a/scripts/docs.angularjs.org-firebase/firebase.json b/scripts/docs.angularjs.org-firebase/firebase.json index 9e112f2ff..a83409ed7 100644 --- a/scripts/docs.angularjs.org-firebase/firebase.json +++ b/scripts/docs.angularjs.org-firebase/firebase.json @@ -29,7 +29,14 @@ ], "headers": [ { - "source": "/partials/**", + "source": "/Error404.html", + "headers" : [{ + "key" : "X-Robots-Tag", + "value" : "noindex" + }] + }, + { + "source": "/@(partials|examples)/**", "headers" : [{ "key" : "X-Robots-Tag", "value" : "noindex"