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
url_prefix=DOCS_URL_PREFIX, # Optional
).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
Close
Hashes for canonicalwebteam.discourse_docs-0.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03a06b964a371edcfa6b0c82e0b0994e23d5fc93dcfd4978e7456bd6ca7b95ed |
|
MD5 | b25c34a6b83414bcbc8264a0ec22bd0b |
|
BLAKE2b-256 | 062aac5eb863dce7ff0b17dedd457eaf0709dbcc053f3f6e043ca630c6fcfc03 |
Close
Hashes for canonicalwebteam.discourse_docs-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 411825f6b86b3e0013b73f8f38d1a630861b9fed16dcb2b3932dfe842ed80894 |
|
MD5 | 351357d61d8c34d8699c1a6bc42c7eb9 |
|
BLAKE2b-256 | 834e40d0a478ae5e7146161f07e97e5f3750d3e05868d47b5b3d4b2b9dc73b14 |