askap-vast / vast-pipeline

This repository holds the code of the Radio Transient detection pipeline for the VAST project.
https://vast-survey.org/vast-pipeline/
MIT License
7 stars 3 forks source link

Documentation update and versioning #627

Closed ajstewart closed 2 years ago

ajstewart commented 2 years ago

This brings the documentation up-to-date in using the latest mkdocs-material release. It also adds docs versioning so the docs can be viewed for each release, in addition to the dev version.

Note:

Before Merging

Fixes #486.

Screen Shot 2022-02-18 at 19 14 59 Screen Shot 2022-02-18 at 19 15 17
ajstewart commented 2 years ago

After testing the deployment there are two errors that need tracking down:

The v1.0.0 docs are using quite an old version of mkdocs-material so that might also complicate things.

I've converted to a draft while I investigate.

ajstewart commented 2 years ago

After testing the deployment there are two errors that need tracking down:

  • Outdated banner does not construct the link correctly, as base_url contains the full path.
  • 8.2.1 should allow 'switch to current page' and fall back to the homepage if pages are missing. However currently these 404.

The v1.0.0 docs are using quite an old version of mkdocs-material so that might also complicate things.

I've converted to a draft while I investigate.

@marxide if you want a puzzle...

Everything here appears to be working expect for the banner links and page diverting when changing versions. But it is only breaking when the initial page load is on the homepage. If you visit the docs from any other page directly, e.g.

localhost:8008/dev/developing/intro/

Then you can browse around the website the outdated banner has the correct link and any new pages that don't exist in the old docs redirect to the homepage as expected.

If you start directly on the homepage then all the links muck up. Which is really strange as the base_url parameter seems to work correctly in the announcement bar message for that link, but not in the outdated block which is right below it.

I tested a brand new simple mkdocs-material project, put all our overrides in and I could not replicate the error so I must be missing something somewhere.

p.s. I test it by deploying the same version twice with a different tag, i.e.:

mike deploy v1.0
mike deploy v2.0
ajstewart commented 2 years ago

A new release of mkdocs-material should fix the above problems.

Will wait for a release based off the fix mentioned here: https://github.com/squidfunk/mkdocs-material/issues/3653.

ajstewart commented 2 years ago

@marxide this is now ready with the release of mkdocs-material 8.2.4.

So it doesn't break everything as it's on an old version, I manually made it so the v1.0.0 release docs could be built on the latest docs versions (i.e. this branch). This will result in some of the code reference being a bit dodgy, but all the fixes from this one will be present in the next release. The v1.0.0 docs will never have to be touched again.

I have deployed this version as is along with the mentioned v1.0.0: https://www.vast-survey.org/vast-pipeline/ everything should be working!

The git actions will just have to be tested after this is merged and correct any mistakes then.