Skip to main content

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
).init_app(
    app,
    url_prefix=DOCS_URL_PREFIX,  # Optional
)

Once this is added you will need to add the file document.html to your template folder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

canonicalwebteam.discourse_docs-0.4.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file canonicalwebteam.discourse_docs-0.4.0.tar.gz.

File metadata

  • Download URL: canonicalwebteam.discourse_docs-0.4.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for canonicalwebteam.discourse_docs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 7b592ca66f3417e82bfc92dc4fa7b1ae9179733f93d487b45b2221c5043d9901
MD5 92aefde0d2f214e08d3b4161c8474754
BLAKE2b-256 5eecaaf0b542ca0ad6cb2dadbc229a303fe5e71eb8f69268a7074d4d5e4ec0b2

See more details on using hashes here.

File details

Details for the file canonicalwebteam.discourse_docs-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: canonicalwebteam.discourse_docs-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for canonicalwebteam.discourse_docs-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba1595be039898a1770c7b05b6206e464cc24ec4a8a62b8e25191161212ce989
MD5 33e7bf27bf1d6510b8742cbb1d805116
BLAKE2b-256 08df6cd99d0d912f20f9f0e8751ad6ffb5292f545c953f953bb385cb649b6088

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page