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

Versioned docs do not redirect all links correctly #977

Closed
ml-evs opened this issue Oct 18, 2021 · 4 comments
Closed

Versioned docs do not redirect all links correctly #977

ml-evs opened this issue Oct 18, 2021 · 4 comments
Labels
docs Issues pertaining to documentation.

Comments

@ml-evs
Copy link
Member

ml-evs commented Oct 18, 2021

In a few places we have linked to e.g. https://optimade.org/optimade-python-tools/CHANGELOG, which currentl 404s.

I would like this to be redirected to https://optimade.org/optimade-python-tools/latest/CHANGELOG, in the same way that the base URL is.

Tagging @CasperWA but can also take a look at this myself when I get time.

@ml-evs ml-evs added the docs Issues pertaining to documentation. label Oct 18, 2021
@ml-evs ml-evs changed the title Versioned docs do not redirect all links Versioned docs do not redirect all links correctly Oct 18, 2021
@ml-evs
Copy link
Member Author

ml-evs commented Oct 18, 2021

NB: this affects all absolute links in the README - we could try to change these to relative links but then they would fail in the actual GitHub rendering of the README

@CasperWA
Copy link
Member

NB: this affects all absolute links in the README - we could try to change these to relative links but then they would fail in the actual GitHub rendering of the README

"This can be solved in post" ...

Meaning, I've set up in other repo's another pre-commit hook that copies over the README.md file to docs/index.md, updating various things under the way, meaning the README.md file becomes the truth/source, but the repo will be slightly larger (instead of having a symlink, it'll be an almost identical copy in the docs folder).

It's a solution - it's not extremely elegant, but it works. And then the hook only runs if the README.md file is changed :)

@CasperWA
Copy link
Member

Relevant links:

pre-commit hook: https://github.com/Materials-Consortia/optimade-gateway/blob/main/.pre-commit-config.yaml#L55-L62
actual invoke task doing the job: https://github.com/Materials-Consortia/optimade-gateway/blob/main/tasks.py#L181-L199

And then it needs to be run (the invoke task) in the docs release workflows whenever the create-api-reference task is also run, essentially. And the docs/index.md file should be added to some bash if-sentences.

@ml-evs
Copy link
Member Author

ml-evs commented Nov 21, 2021

This seems to be resolved, or at least I can't spot any broken links anymore (maybe this was fixed within mike/mkdocs?)

@ml-evs ml-evs closed this as completed Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Issues pertaining to documentation.
Projects
None yet
Development

No branches or pull requests

2 participants