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"
discourse_api = DiscourseAPI(
base_url=DISCOURSE_BASE_URL
)
discourse_parser = DocParser(
discourse_api,
DOCS_CATEGORY_ID,
discourse_index_id,
url_prefix
)
DiscourseDocs(
parser=discourse_parser,
index_topic_id=DOCS_INDEX_TOPIC,
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.11.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce48d97444b58bd4d8bc4e23844fcd6d16a8bd9de470d93b8a1bad67fe6bb764 |
|
MD5 | 481c061460883f4a64aaa7ea551a0213 |
|
BLAKE2b-256 | 7ea311da961cbf06455f15f64800105aa2ba4b49705fa4120b7a982806635820 |
Close
Hashes for canonicalwebteam.discourse_docs-0.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea47db549ce92856b55fff3800b19acc363536915bcf85f41d129dc19659e651 |
|
MD5 | 5d18118c9b683ddb034a2732848563f7 |
|
BLAKE2b-256 | 3805cc371cf95157c986ae261293c4e096bcca6eb7b235dce5a9e39957d31f56 |