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:
from canonicalwebteam.discourse_docs import DiscourseDocs, DiscourseAPI
app = Flask("myapp")
DISCOURSE_BASE_URL = "https://forum.example.com/"
DOCS_INDEX_TOPIC = 321
DOCS_CATEGORY_ID = 21
DOCS_URL_PREFIX = '/docs'
DOCS_TEMPLATE_PATH = "docs/document.html"
DiscourseDocs(
api=DiscourseAPI(base_url=DISCOURSE_BASE_URL),
index_topic_id=DOCS_INDEX_TOPIC,
category_id=DOCS_CATEGORY_ID,
document_template=DOCS_TEMPLATE_PATH, # Optional
).init_app(
app,
url_prefix=DOCS_URL_PREFIX, # Optional
)
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
Close
Hashes for canonicalwebteam.discourse_docs-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2dfebe4e12abf2ba8d7a65dc6850a8249d6e4fce7d603f5c622ff59ae0d25aa |
|
MD5 | a58877aebf4b1a60c0a88a1799aed24f |
|
BLAKE2b-256 | 5f335cf62e389d332f0b72faca91a7795f66b65e0af802e24e2783b4b240dab6 |