InstituteforDiseaseModeling / covasim

COVID-19 Agent-based Simulator (Covasim): a model for exploring coronavirus dynamics and interventions
https://covasim.org
MIT License
250 stars 223 forks source link

Links in disclaimer in compiled docs resolve to 404 errors #177

Closed JSchripsema-IDM closed 4 years ago

JSchripsema-IDM commented 4 years ago

I initially set up sharing from the primary README so that it pulled in only installation and usage to be compiled by Sphinx. The docs have been reconfigured to pull in the entire README. This is causing 404 broken links in the disclaimer as well as the link to the web app README in the repo structure section. https://institutefordiseasemodeling.github.io/covasim-docs/index.html#disclaimer

JSchripsema-IDM commented 4 years ago

I see similar issues here: https://institutefordiseasemodeling.github.io/covasim-docs/contributing.html#getting-started

You should verify that all links to READMEs in the compiled text don't use relative paths.

ckerr-IDM commented 4 years ago

Could we have as part of the docs build script something that replaces .rst links with correct docs ones? I see also there are some hard-coded URLs that shouldn't be there.

JSchripsema-IDM commented 4 years ago

Sphinx uses the syntax :doc:file_name to compile links that will not break (and will automatically update the link text) within the docset. However, hard-coded URLs are required if the READMEs are to be used as both plain text resources for users and source for compiled Sphinx docs and functional in both places. @lgeorge-idm has the most experience customizing the Sphinx doc build. I'm not sure there is an easy workable solution.

ckerr-IDM commented 4 years ago

Not sure if it would be easy, but it's doable: https://stackoverflow.com/questions/39150774/sphinx-substitution-in-url

JSchripsema-IDM commented 4 years ago

This appears to be a way to configure Sphinx to compile :doc: links differently, but not how to turn a hard-coded URL that will work in a plain text README into something that Sphinx can compile differently.

cliffckerr commented 4 years ago

Cursory attempt at removing broken links here: https://github.com/InstituteforDiseaseModeling/covasim/pull/171

cliffckerr commented 4 years ago

Closed by #171