readthedocs / readthedocs.org

The source code that powers readthedocs.org
https://readthedocs.org/
MIT License
8.04k stars 3.58k forks source link

Enable DONT_OVERWRITE_SPHINX_CONTEXT for tapir-scala #8091

Closed adamw closed 3 years ago

adamw commented 3 years ago

I need to overwrite the conf_py_path context value, so that the "Edit on github" links are properly generated on https://tapir.softwaremill.com/en/latest/ - they currently point to the generated-doc directory, instead of the doc directory (there's an additional docs type-checking step during a release).

I've tried following https://docs.readthedocs.io/en/latest/guides/vcs.html and defining the html_contex as specified there - this works locally, but not on rtd:

html_context = {
    'display_github': True, # Integrate GitHub
    'github_user': 'softwaremill', # Username
    'github_repo': 'tapir', # Repo name
    'github_version': 'master', # Version
    'conf_py_path': '/doc/', # Path in the checkout to the docs root
}

I then found https://github.com/readthedocs/readthedocs.org/issues/2971, and as I understand, I need the DONT_OVERWRITE_SPHINX_CONTEXT feature flag enabled. I tried doing this by defining an environment variable, but this doesn't seem to work.

Can this feature be enabled for the tapir-scala project, or maybe there's a better way to adjust the "Edit on GitHub" link?

stsewd commented 3 years ago

I have added that feature flag to your project, it should link to the correct page no https://tapir.softwaremill.com/en/latest/

adamw commented 3 years ago

@stsewd Works, thank you very much! Sorry for not mentioning this outright, could you do the same for the sttp project? It uses the same mechanism.

stsewd commented 3 years ago

@adamw done!

adamw commented 3 years ago

@stsewd Thanks again! :)

ghostbuster91 commented 3 years ago

@stsewd Can I ask for the same for the https://github.com/softwaremill/diffx project? It uses the same mechanism.

humitos commented 3 years ago

@ghostbuster91 Hi! Please, send us an email to support@readthedocs.org and let us know the URL of your project under Read the Docs (not the GH, one). Thanks!

ghostbuster91 commented 3 years ago

@humitos I'll do that, thanks for the info :)