lektor-website/content/docs/api/project/discover/contents.lr

23 lines
523 B
Plaintext
Raw Normal View History

2015-12-19 14:52:17 +01:00
title: discover
---
type: method
---
signature: base=None
---
summary: Auto-discovers a project from a folder or the current working directory.
---
body:
This is the way Lektor by defaults discovers project files. It will start
out with the current path (of a given base path) and search upwards until it
finds a folder with a single project file in and then loads this. If none
of that leads to a file then `None` is returned.
## Example
```python
from lektor.project import Project
project = Project.discover()
```