Electric-Coin-Company / tfl-book

A Trailing Finality Layer book for a proposed Zcash protocol change.
MIT License
5 stars 2 forks source link

Render both `main` and "the most recent release". #127

Open nathan-at-least opened 8 months ago

nathan-at-least commented 8 months ago

What is the problem?

It may be useful for people to refer to a "stable release" of the mdbook text, such as if they are linking from another site in a discussion where updates to the rendering would confuse the discussion.

Do you recommend a solution?

IMO, an ideal solution would have rendering tree like this:

<BASE URL>/<VERSION_OR_BRANCH>/<BOOK PATH>

Some examples:

Then, we can redirect the base url to either the latest release or the latest main.

I believe this is possible in the rendering automation by committing all of the version outputs into different build/html/<version> directories, then adding a redirect hack in build/html/index.html.

The <version> should either be the tag, if the revision corresponds exactly to a single well-known-formatted tag, or else the branch name.

Related, but distinct #126

nathan-at-least commented 8 months ago

This ideal solution would enable stable links to older versions, which may be useful for external discussions especially to identify important changes between versions.