Metadata-Version: 2.1
Name: canonicalwebteam.discourse-docs
Version: 1.0.0
Summary: Flask extension to integrate discourse content generated to docs to your website.
Home-page: https://github.com/canonical-webteam/canonicalwebteam.docs
Author: Canonical webteam
Author-email: webteam@canonical.com
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: Flask (>=1.0.2)
Requires-Dist: beautifulsoup4
Requires-Dist: humanize
Requires-Dist: python-dateutil
Requires-Dist: validators

# canonicalwebteam.discourse_docs

Flask extension to integrate discourse content generated to docs to your website.

## Install

Install the project with pip: `pip install canonicalwebteam.discourse_docs`

You can add the extension on your project as follows, replacing, at least, `base_url` and `index_topic_id` with your own settings:

```python
import talisker.requests
from canonicalwebteam.discourse_docs import DiscourseDocs, DiscourseAPI

app = Flask("myapp")
session = talisker.requests.get_session()

discourse_docs = DiscourseDocs(
    parser=DocParser(
        api=DiscourseAPI(
            base_url="https://forum.example.com/", session=session
        ),
        index_topic_id=321,
        url_prefix="/docs",
    ),
    document_template="docs/document.html",
    url_prefix="/docs",
)
discourse_docs.init_app(app)
```

Once this is added you will need to add the file `document.html` to your template folder.


