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
    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


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.6.4.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: canonicalwebteam.discourse_docs-0.6.4.tar.gz
  • Upload date:
  • Size: 11.2 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.8.0 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for canonicalwebteam.discourse_docs-0.6.4.tar.gz
Algorithm Hash digest
SHA256 f024b4c0997001ce4f455e0daf9c0712899c35d64fa49a9437d2f79635e3eb3a
MD5 9a870166d510f6413b9cbd33f1f127a2
BLAKE2b-256 59e4b540c242c0bae850a1c0b72afef1db7e1c16f4588d774b1b66f327e1f4a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: canonicalwebteam.discourse_docs-0.6.4-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

File hashes

Hashes for canonicalwebteam.discourse_docs-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 aefe5a1d8c87e4826a8a5be99454f94669664b51aa031de86e343ffa08111eea
MD5 b834f4188172f9ac8051c80bc26f3f11
BLAKE2b-256 e34eaa046fbb295ba59e1e960520d8d5adbfc646d3c9b635d54789907759c4a0

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