Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 1.02 KB

README.md

File metadata and controls

65 lines (50 loc) · 1.02 KB

Robots

It creates simplified robots.txt.

Example output

User-agent: *

Allow: /

Sitemap: https://www.mydomain.com/sitemap.xml

or

User-agent: *

Disallow: /

Quick start

  1. Go to angular.json
{
  ...,
  "projects": {
    "your-project-name": { // project will be different
      ...,
      "architect": {
        ...,
        "robots": { // name can be different if you want
          "builder": "ngx-devkit-builders:robots",
          "options": {
            "sitemap": "https://www.mydomain.com/sitemap.xml",
            "verbose": false // or true
          },
          "configurations": {
            "production": { // name can be different if you want
              "allow": true // or true
            },
            "development": { // name can be different if you want
              "allow": false // or true
            }
          }
        }
      }
  }
}
  1. Run command
ng run your-project-name:robots:production

or

ng run your-project-name:robots:development