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"

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


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

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: canonicalwebteam.discourse_docs-0.11.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for canonicalwebteam.discourse_docs-0.11.1.tar.gz
Algorithm Hash digest
SHA256 81c8395e74a01e6d926b003b26346448429459a58ab4467fee424c8e7c5dc312
MD5 35b6b986a68ea53a04f53f7eb28e69d6
BLAKE2b-256 b74bf5bdd09ec1bd6392999355513d16fbf04dfce5fd76e04dc5747392fd0cc5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: canonicalwebteam.discourse_docs-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 18.8 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/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for canonicalwebteam.discourse_docs-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da55ac92052e30b9e8c73bb5405c8d24b3615b86427c4e52b6a3dfc0afc87b7e
MD5 3cc541268113d4896a123712ddbdcf70
BLAKE2b-256 5b4b342140c311e2812c8faed831c2ea723af67205e14a1631dce9e54c99dc7a

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