coreos/fedora-coreos-docs

Provide slider for choosing a stream for examples.

Opened this issue · 2 comments

Born from this PR discussion.

We have {stable-version} throughout a few of our docs pages that gets substituted with the current value of stable-version from antora.yml:

stable-version: 35.20220313.3.1

This means that examples can be copy/pasted directly and the user is using the latest stable version at that point in time. The problem is, what if the user wants to use a different stream? Some of our docs pages have the user choose by setting a STREAM= env var and then downloading/choosing artifacts that way and then setting an FCOS_VERSION env var that can be used for later operations.

I propose that we either give the user some slider to be able to auto update examples for copy/pasting or we maybe do away with the {stable-version} substitution. The problem with the slider is that I don't know how we would pull that off with the current tooling that we have for generating the docs.

The slider can just be some site-wide JavaScript that knows how to do the substitution. Antora shouldn't need to know about it.

The {stable-version} substitution was added as a fix for a worse problem, which was that we tended to hardcode whatever version number happened to be current whenever a particular doc was written.

The slider can just be some site-wide JavaScript that knows how to do the substitution. Antora shouldn't need to know about it.

👍 - Unfortunately I know nothing about web development, so really don't know how easy or hard things are. I assumed this would be hard because we're using some tools to generate the site and wasn't sure how hard it would be to go outside their normal feature set.

The {stable-version} substitution was added as a fix for a worse problem, which was that we tended to hardcode whatever version number happened to be current whenever a particular doc was written.

Thanks for the context.