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.8.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42a8592dffc63a50fff5d6e09fdd468dc9b32f118e0bda65a0d89f38a2f7841b |
|
MD5 | d280187e8a8739eaa995282407703914 |
|
BLAKE2b-256 | 46c5ccb1de88709109e210123bf1d0d651c7edd8e0f531d7414194532716ca7d |
Close
Hashes for canonicalwebteam.discourse_docs-0.8.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bc2a58abfa64dc2a8beb29194ea9680c6cb52579b08cc0fb63a16f9b02f6c11 |
|
MD5 | 882d4f5ae4b80e04898dcba478f9b7e8 |
|
BLAKE2b-256 | 38b2682e9bf7bb8080c5776145a955340cff35162fd360e1dc1e77026d6ff687 |