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 as follows, replacing, at least, base_url
and index_topic_id
with your own settings:
import talisker.requests
from canonicalwebteam.discourse_docs import DiscourseDocs, DiscourseAPI
app = Flask("myapp")
session = talisker.requests.get_session()
discourse_docs = DiscourseDocs(
parser=DocParser(
api=DiscourseAPI(
base_url="https://forum.example.com/", session=session
),
index_topic_id=321,
url_prefix="/docs",
),
document_template="docs/document.html",
url_prefix="/docs",
)
discourse_docs.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-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a2e01c270f935dd528c9495e8a77693b3593765b0497a7d77473e9f0d7a458b |
|
MD5 | 9663cf6caf1e1c39d0367651121f13f9 |
|
BLAKE2b-256 | 9fd281f72070bf435459a885120f5f36f563777eb7c7cb8eb4eca95b64c41a20 |
Close
Hashes for canonicalwebteam.discourse_docs-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 063e58b89332e086315e081e8eb6149a4da716ae10f2cefc76089a01713da487 |
|
MD5 | 7791467d455acdcac8f3caf8fdd5a56e |
|
BLAKE2b-256 | e3de643b15d9b6e4f57c13674d2746673ccd7420c899f83a3740a0f65c08be5b |