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.4.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db23252d51386f315d2aad7ec01b50eb5fc480db982cbf0d5b6780bdcbf273f |
|
MD5 | 19c873f72f8e96c92e23597c49067d2e |
|
BLAKE2b-256 | 05b93ec443a4563c349c995acc1e3de06fe18911385324b7444d295e8594b638 |
Close
Hashes for canonicalwebteam.discourse_docs-0.4.1-py3.6.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38f3c051e9280972497bb0456f8206068da21fbaccdea4169d4862702779a647 |
|
MD5 | 495684e1b229f0e744a8f601b8331e5d |
|
BLAKE2b-256 | 619c9c748c7eb98cff29657b0a437d561962437b686f1ceb0d9fb5be5070b1b5 |