Skip to content

Commit 7c12d87

Browse files
authored
Update README.md
1 parent 76a385f commit 7c12d87

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,39 @@
1-
# robots
1+
# Robots
22
:wrench: Robots generator component
3+
4+
## Introduction
5+
6+
This componenet automaticaly generates robots from parameters in configuration.
7+
8+
## Dependencies
9+
10+
- [nepttune/base-requirements](https://github.com/nepttune/base-requirements)
11+
- [nepttune/base-components](https://github.com/nepttune/base-components)
12+
13+
## How to use
14+
15+
- Register `\Nepttune\Component\IRobotsFactory` as service in cofiguration file, inject it into presenter, write `createComponent` method and use macro `{control}` in template file.
16+
- Just as any other component.
17+
- You need to pass robots configuration to factory service.
18+
- You might also want to change mime type to `text/plain`.
19+
- Modify parameters to accomplish your needs.
20+
21+
## Example configuration
22+
23+
```
24+
services:
25+
robotsFactory:
26+
implement: Nepttune\Component\IRobotsFactory
27+
arguments:
28+
- '%robots%'
29+
parameters:
30+
robots:
31+
all:
32+
name: '*'
33+
disallow:
34+
google:
35+
name 'GoogleBot'
36+
disallow:
37+
- '/example'
38+
- '/example2'
39+
```

0 commit comments

Comments
 (0)