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.6.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01653071a3f12a2508749d82b22afe0184ee668d057fbdaddb0209c4f9f18ce4 |
|
MD5 | f564c7f49eca1913cd5c6335506cd0b2 |
|
BLAKE2b-256 | ef0d48b9ac50401569acb1c1f13bd46af265cafc6e1d0f33d2f6f15dc55a5e67 |
Close
Hashes for canonicalwebteam.discourse_docs-0.6.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f328dc6a3f05db655d44daaef9b6591a0c5c12caea81f4e9b10b97e659f6f10a |
|
MD5 | 7e60d314755fd812a0cf74993ef8c5fa |
|
BLAKE2b-256 | 53c66dadfa8c70af092fcdf690b740640e8744535a52a23d4fa4dfd1f5bc6346 |