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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9a4f7adf32c5edb870cc548f309c8b7f34f642c8b7e6dc44f4bf353667bebee |
|
MD5 | 32eefa125233440fc5752fd4de7a1593 |
|
BLAKE2b-256 | 6465ba4011ad1440833f595baabf26544cff09147e530434f3de2f393af2c594 |
Close
Hashes for canonicalwebteam.discourse_docs-0.10.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66c80545d67856696d5e27541be1116f4cbbcb91b715a7b4a611c29be65c7187 |
|
MD5 | 0f1ae90aa86356611772c9f79df37cb8 |
|
BLAKE2b-256 | 3add91525398b278bb3ed60256b914b74395576cfcdce48189dfffbb3fb79f4c |