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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b75971f9f3fe6e7c24bc1a27a4271118f236f42f1cd94c2a2870c347adbf42e |
|
MD5 | c0e985bcec84b78c84853316676c2a6d |
|
BLAKE2b-256 | 7159913958389c46cbb0496e250c2cf309a5bfe5e2324a007d14d69b82e759ad |
Close
Hashes for canonicalwebteam.discourse_docs-0.10.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9ad44469a938ee9cebaaeb2e883628034f0da87b6f0da7f7d9347263d555f9e |
|
MD5 | 908c815f6eb32a0b2d01b76ff6d4f2f7 |
|
BLAKE2b-256 | 41c64ee23f22d6aee3bbaf75d69ea25226a63efc48c5bb022fa2317ebfb67c83 |