angular / angular/angular-cli

ng add @angular/seo

未关闭
#12,120 23 条评论 30 个 reaction 已指派 0 人 在 GitHub 查看
area: @schematics/angular feature feature: under consideration
主要语言
TypeScript
星标
27k
派生
11.8k
平均合并
14 小时 23 分钟
30 天内合并 PR
162

描述

_From @IgorMinar on April 18, 2018 10:7_

### Bug Report or Feature Request (mark with an `x`)
```
- [ ] bug report -> please search issues before submitting
- [x] feature request
```

### Area
```
- [ ] devkit
- [x] schematics
```

### Versions
v6

### Desired functionality
I'd like to be able to invoke `ng add @angular/seo` and have the CLI make my application search engine friendly. Initially I'd like to see the following feature provided by the schematics:

- generate robots.txt with no rules but a simple instructions/link on how to setup blacklist rules
- generate sitemap.xml with similar documentation/links as in robots.txt
- add code that would feature detect and conditionally load polyfills needed by the crawlers
- setup error logging via global error handler with an option to redirect the output to a remote server
- provide facilities to easily add and remove the `noindex` metadata to emulate the HTTP 404 and 500 status codes

### Mention any other details that might be useful

_Copied from original issue: angular/devkit#729_

贡献指南

打开贡献指南

调研方向

首先检查 Angular CLI schematics 区域以及 issue 中描述的 `ng add` 流程。将请求拆分为列出的 SEO 功能—robots.txt、sitemap.xml、crawler polyfills、错误日志记录和 noindex 处理—并在进行任何更改之前明确范围和验收标准;未指定文件或测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
cli, tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。