Flask extension to integrate discourse content generated to docs to your website.
Project description
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:
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file canonicalwebteam.discourse_docs-1.0.1.tar.gz
.
File metadata
- Download URL: canonicalwebteam.discourse_docs-1.0.1.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6a40ed76cb829252ba6d1b5b881f20d7344d12b9546b375597c018d16f549fd |
|
MD5 | bfea4a3a4d6229e36abd47db43e146cd |
|
BLAKE2b-256 | 74cc3da168c2a538af812ef67c546cb7ee6e9e2b585cd46d7c1465288a205019 |
File details
Details for the file canonicalwebteam.discourse_docs-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: canonicalwebteam.discourse_docs-1.0.1-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 618fb6f7bdd2002b5dd73d54ab4e7c063e12af27b87abe48efd0fe34f74ef685 |
|
MD5 | c7c3dd8d3b5c6fe4db7322dd4920db97 |
|
BLAKE2b-256 | 3479b52fe100ffa5e0fe56d844d973b648d4bff51b5b98978e4429070a7ba732 |