Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] More control over the URL routes the module handles #125

Open
bartaz opened this issue Mar 10, 2022 · 1 comment
Open

[Feature] More control over the URL routes the module handles #125

bartaz opened this issue Mar 10, 2022 · 1 comment
Assignees

Comments

@bartaz
Copy link
Member

bartaz commented Mar 10, 2022

Currently discourse module is configured by passing a urlPrefix to it and ALL URLs under this prefix are served from discourse.

For Vanilla docs where we have part of docs served from discourse and part from Flask webapp, we'd like to have more control on what URLs are handled by discourse.

In our case we'd like to keep current URL structure of /docs/patterns/notification being served by Flask, and only a design guidelines subpage /docs/patterns/notification/design to be fetched from discourse.

Our current workaround is to have a /design prefix for discourse, so having URLs of /design/patterns/notification alongside /docs/patterns/notification, but this is not ideal.

Would it be possible to have more control over which routes are handled by discourse module and not assign whole URL prefix to it?

It would be nice if we can make it in a way that just works with Flask routes. Something like:

@app.route("/docs/<path:pattern_path>/design")
def get_design_guidelines(pattern_path):
    # get content from discourse based on the path
@sowasred2012
Copy link
Contributor

sowasred2012 commented Mar 18, 2022

To be discussed in the infra guild meeting on the 28th of March.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants