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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2759a59a0f3893ab105ed87ee3690c5d1d28e7eb902881dfe3180fb1f6b250a7 |
|
MD5 | 436c1a76900c393a1747624aa02d0a7d |
|
BLAKE2b-256 | d0035ea570634f7c0a1cf7820853792e2ea638a54084a34b74abca77a06bf04d |
Close
Hashes for canonicalwebteam.discourse_docs-0.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 372ea8cdb0156e5f5bce43a23aa30524020b107dbbfe284ece9edd6728341ec7 |
|
MD5 | 2db509858db48a97943af3768e4e8caa |
|
BLAKE2b-256 | 3b13a4a58842d7d3753f120bc5bca37e2de6552d58d356740803282951b3975b |