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.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4c5d3229851ab36244c6fca809f88ce228d520157ba145856eb3f530fa36d9c |
|
MD5 | b609edc20ec5421f90905028a24dbda0 |
|
BLAKE2b-256 | 2b4b26c9ca425c5682e79d593c0b06088358f34fc2f9f845b5ebc951ae2f386a |
Close
Hashes for canonicalwebteam.discourse_docs-0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00de52b01104b097daf45aa54b7ff2909cba6027d69797585c0d49f997672989 |
|
MD5 | 0f3c1369b523b8b73295ae20a3a3a7c4 |
|
BLAKE2b-256 | e1d4d51f8217b25a88c16a77b19f0c145257f7dfacdcff46ffcf3957e90d29d5 |