lektor-website/content/docs/api/environment/add-publisher/contents.lr

27 lines
543 B
Plaintext
Raw Normal View History

2015-12-24 20:54:55 +01:00
title: add_publisher
---
type: method
---
signature: scheme, publisher
---
summary: Registers a publisher class with the environment.
---
body:
This method can be used to register a new publisher for a given URL scheme
with Lektor. This allows plugins to provide custom deployment methods. For
more information on implementing these see [Publisher :ref](../../publisher/).
## Example
```python
from lektor.publisher import Publisher
class MyPublisher(Publisher):
pass
env.add_publisher('my', MyPublisher)
```
---
version_added: 2.0