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.10.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 545c7eb59a048298b7e68b4a2ccb3ad87ee086a30ba615d5cd5ede54260595aa |
|
MD5 | c49d5e363d8626b70b6eca8edf4aad36 |
|
BLAKE2b-256 | 6e0d39be9c97200657322189d7c30f0f5d2dd31a6cca9ac34edf557d02cc32ad |
Close
Hashes for canonicalwebteam.discourse_docs-0.10.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5e62127c27291bf20dd6d83e7b5e6883997819f99632b382b8d778aa5c67e59 |
|
MD5 | e6b385da195be38d273d8b29315e3cd7 |
|
BLAKE2b-256 | 657a518907e60bb866ab7712a32b8f23d95836c47746da9b9f1b00ab38e4f81d |