micrometer-metrics / micrometer

An application observability facade for the most popular observability tools. Think SLF4J, but for observability.
https://micrometer.io
Apache License 2.0
4.45k stars 981 forks source link

Publish recent documentation under a fixed version number #5152

Closed philwebb closed 3 months ago

philwebb commented 4 months ago

Please describe the feature request. Currently micrometer publishes the most recent documentation under https://docs.micrometer.io/micrometer/reference but does not offer a version that includes the version number. This makes it impossible to link to a specific release.

For example, at the time of raising this issue to link to v1.12 you can use https://docs.micrometer.io/micrometer/reference/1.12/index.html but trying to link to v1.13 using https://docs.micrometer.io/micrometer/reference/1.13/index.html results in a 404.

Links to https://docs.micrometer.io/micrometer/reference/ will currently return v1.13, but only whist v1.14 is not out.

Rationale I want to link to the correct version of the docs

Additional context https://github.com/spring-projects/spring-boot/issues/40916 https://github.com/micrometer-metrics/tracing/issues/731

jonatan-ivanov commented 3 months ago

I think this is happening because Micrometer's docs site is hosted on GH Pages and Antora is not able to generate html files for redirection right now.

philwebb commented 3 months ago

I wonder if https://docs.antora.org/antora/latest/playbook/urls-redirect-facility/#static might work?

shakuzen commented 3 months ago

@philwebb thanks for the pointer. That sounded like it would do what we need, and I tried it but unfortunately, it did not do what we want. I think it only creates static redirects for explicitly defined page aliases. This open Antora issue looks to be the feature request for the behavior we want. Unfortunately, I think that leaves us needing to write an Antora extension to get the behavior we want.

jonatan-ivanov commented 3 months ago

Based on recommendations from @trevormarshall, I set up a redirect rule for Micrometer docs in CloudFlare (I will do the rest if it works fine).

@philwebb Could you please check some of the links you want to use against 1.13? All of these should work: